More messages
This commit is contained in:
71
game.py
71
game.py
@@ -212,26 +212,18 @@ if __name__ == "__main__":
|
|||||||
print(
|
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."
|
"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."
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
if not result:
|
|
||||||
print(
|
|
||||||
"So, it seems the game managed to exit, without it meaning to exit, you found a bug! Great job! If you can, please tell me what happened. If you know my Gitea server link, create an issue on the Whiskerbound repository. Sorry, you gotta reload."
|
|
||||||
)
|
|
||||||
if os.path.exists("WEB_VERSION"):
|
if os.path.exists("WEB_VERSION"):
|
||||||
print(
|
print(
|
||||||
"I could try to give you your savefile, though it might not appear, here's what should be your current savefile:"
|
"I could try to give you your savefile, though it might not appear, here's what should be your current savefile:"
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
print(
|
print(
|
||||||
'"'
|
'"'
|
||||||
+ base64.b64encode(json.dumps(game.cat.to_dict()).encode()).decode()
|
+ base64.b64encode(json.dumps(game.cat.to_dict()).encode()).decode()
|
||||||
+ '"'
|
+ '"'
|
||||||
)
|
)
|
||||||
|
except:
|
||||||
|
print("Welp, the game broke too much :(.")
|
||||||
print(
|
print(
|
||||||
"It's above this message, if theres nothing, the game broke too much, sorry."
|
"It's above this message, if theres nothing, the game broke too much, sorry."
|
||||||
)
|
)
|
||||||
@@ -241,7 +233,64 @@ if __name__ == "__main__":
|
|||||||
print(
|
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 :)"
|
"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)
|
data.save.handle_uuid_stuff(game.cat)
|
||||||
|
except:
|
||||||
|
print("Yep, that did NOT go as planned.")
|
||||||
print(
|
print(
|
||||||
"If there's no errors above this, yay."
|
"If there's no errors above this, yay."
|
||||||
) # TODO: add crash saving for a exception crash.
|
) # 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(
|
||||||
|
"So, it seems the game managed to exit, without it meaning to exit, you found a bug! Great job! If you can, please tell me what happened. If you know my Gitea server link, create an issue on the Whiskerbound repository. Sorry, you gotta reload."
|
||||||
|
)
|
||||||
|
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 :)?"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user