This commit is contained in:
Josh Deprez 2021-08-25 16:50:50 +10:00
parent 01468798d4
commit ee687498fc
2 changed files with 9 additions and 0 deletions

Binary file not shown.

View file

@ -79,6 +79,15 @@ func repl(g *engine.Game) {
if err := s.Save(); err != nil {
log.Printf("Couldn't save %q: %v", id, err)
}
case "reload":
g.Disable()
g.Hide()
if err := g.Load(game.Assets); err != nil {
log.Printf("Couldn't load: %v", err)
}
g.Prepare()
g.Enable()
g.Show()
}
}
if err := sc.Err(); err != nil {