diff --git a/play.py b/play.py index 04b61ae..b654de3 100644 --- a/play.py +++ b/play.py @@ -97,9 +97,15 @@ def play_aidungeon_2(): tcflush(sys.stdin, TCIFLUSH) action = input("> ") if action == "restart": + rating = input("Please rate the story quality from 1-10: ") + rating_float = float(rating) + story_manager.story.rating = rating_float break elif action == "quit": + rating = input("Please rate the story quality from 1-10: ") + rating_float = float(rating) + story_manager.story.rating = rating_float exit() elif action == "nosaving": diff --git a/story/story_manager.py b/story/story_manager.py index 982ba4b..5cbca84 100644 --- a/story/story_manager.py +++ b/story/story_manager.py @@ -32,13 +32,10 @@ class Story(): def __del__(self): if self.upload_story: - rating = input("Please rate the story quality from 1-10: ") - try: - rating_float = float(rating) - self.rating = rating_float - self.save_to_storage() - except: - pass + self.save_to_storage() + console_print("Game saved.") + console_print("To load the game, type 'load' and enter the following ID: " + self.uuid) + def init_from_dict(self, story_dict): self.story_start = story_dict["story_start"]