def save_and_quit(): io.output("Bye.") # Return from the system world if we are in it if hasattr(game, "currentworld") and game.currentworld: game.world = game.currentworld if game.playing and app.config["main.save_on_exit"]: filename = game.save() io.output("--- Your game has been saved. ---") app.config["main.last_game_save"] = filename app.quit()
def save(): game.save() io.output("Your game has been saved.")