From 0f1f8071cd1a2839fd3a6ccf17bfd754edeb48ab Mon Sep 17 00:00:00 2001 From: Owen Feldman Date: Mon, 27 Apr 2026 19:01:32 -0400 Subject: [PATCH] More messages --- game.py | 73 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 12 deletions(-) diff --git a/game.py b/game.py index 0a4ff69..88f35ee 100644 --- a/game.py +++ b/game.py @@ -212,12 +212,44 @@ if __name__ == "__main__": print( "Welp, seems that the game crashed, idk why. A common cause of this is, as of now, IDK, because I fixed the CTRL issue (tell me if it crashed from CTRL+something). If you're on the desktop version, reopen it, if you're on the web version, reload.\nOtherwise, great job! You found an issue in the game! If you can, please tell me." ) - print( - "Take a moment to screenshot the error or write it down or something if you can send it to me, and:" - ) - ui.press_any_key_to_continue( - "Press any key to quit/do nothing if you're on the web version." - ) + if os.path.exists("WEB_VERSION"): + print( + "I could try to give you your savefile, though it might not appear, here's what should be your current savefile:" + ) + try: + print( + '"' + + base64.b64encode(json.dumps(game.cat.to_dict()).encode()).decode() + + '"' + ) + except: + print("Welp, the game broke too much :(.") + print( + "It's above this message, if theres nothing, the game broke too much, sorry." + ) + print( + "Copy it if you can, you paste it into the Load Game menu option when you select it BTW." + ) + print( + "I'm gonna try to do some other stuff to save RN, if there's a bunch of errors under here, it's PROBABLY fine :)" + ) + try: + data.save.handle_uuid_stuff(game.cat) + except: + print("Yep, that did NOT go as planned.") + print( + "If there's no errors above this, yay." + ) # TODO: add crash saving for a exception crash. + else: + if ui.confirm("Would you like me to attmept to run the save feature?"): + try: + data.save.save(game.cat) + except: + print("Sorry, the game is too broken to save :(") + print( + "Bye I guess, sorry about the crash, you can relaunch if you want :)?" + ) + else: if not result: print( @@ -227,11 +259,16 @@ if __name__ == "__main__": print( "I could try to give you your savefile, though it might not appear, here's what should be your current savefile:" ) - print( - '"' - + base64.b64encode(json.dumps(game.cat.to_dict()).encode()).decode() - + '"' - ) + try: + print( + '"' + + base64.b64encode( + json.dumps(game.cat.to_dict()).encode() + ).decode() + + '"' + ) + except: + print("Welp, the game broke too much :(.") print( "It's above this message, if theres nothing, the game broke too much, sorry." ) @@ -241,7 +278,19 @@ if __name__ == "__main__": print( "I'm gonna try to do some other stuff to save RN, if there's a bunch of errors under here, it's PROBABLY fine :)" ) - data.save.handle_uuid_stuff(game.cat) + try: + data.save.handle_uuid_stuff(game.cat) + except: + print("Yep, that did NOT go as planned.") print( "If there's no errors above this, yay." ) # TODO: add crash saving for a exception crash. + else: + if ui.confirm("Would you like me to attmept to run the save feature?"): + try: + data.save.save(game.cat) + except: + print("Sorry, the game is too broken to save :(") + print( + "Bye I guess, sorry about the crash, you can relaunch if you want :)?" + )