Added credits, release notes, quitting game bugfix

This commit is contained in:
2026-04-19 08:09:55 -04:00
parent 6834d2c1af
commit bbfed56c40
3 changed files with 31 additions and 16 deletions

40
game.py
View File

@@ -137,30 +137,37 @@ class Game:
print(f"{self.cat.name} says bye")
return
options = ["New Game"]
options = ["New Game", "Release Notes", "Credits"]
if os.path.exists("saves") and not os.path.exists("WEB_VERSION"):
options.insert(0, "Load Game")
if not os.path.exists("WEB_VERSION"):
options.append("Quit")
print(f"Welcome to {data.text.GAME_NAME}")
choice = ui.select("Please choose an option", choices=options)
while True:
choice = ui.select("Please choose an option", choices=options)
if choice == "New Game":
self.new_game()
elif choice == "Load Game":
save = "saves/" + ui.select(
"Please choose a savefile to load", os.listdir("saves")
)
self.cat = data.save.load(save)
self.game_loop()
elif choice == "Quit":
return
if choice == "New Game":
self.new_game()
elif choice == "Load Game":
save = "saves/" + ui.select(
"Please choose a savefile to load", os.listdir("saves")
)
self.cat = data.save.load(save)
self.game_loop()
elif choice == "Quit":
return True
elif choice == "Release Notes":
print()
with open("RELEASE_NOTES.txt", "r") as f:
release_notes = f.read()
print(release_notes.strip())
print()
if __name__ == "__main__":
try:
game = Game()
game.run()
result = game.run()
except: # horrible coding right here
print("Developer stuff incoming, if you can, tell me what this says:")
traceback.print_exc()
@@ -174,6 +181,7 @@ if __name__ == "__main__":
"Press any key to quit/do nothing if you're on the web version."
)
else:
print(
"I think you did CTRL+C? I said not to I think. Well, here you are! Great job, not following instructions, I said it for a reason."
)
if not result:
print(
"I think you did CTRL+C? I said not to I think. Well, here you are! Great job, not following instructions, I said it for a reason."
)