From 6026cd49c189b4de35d340dbf5f952485e3d145c Mon Sep 17 00:00:00 2001 From: Owen Feldman Date: Mon, 20 Apr 2026 17:27:56 -0400 Subject: [PATCH] fixed absurd amount of decimals in check on cat, fixed desktop loading saves (oops, it broke in past commits), and load error and success message for desktop --- game.py | 11 ++++++++++- systems/world.py | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/game.py b/game.py index 142542c..f377177 100644 --- a/game.py +++ b/game.py @@ -120,7 +120,16 @@ class Game: save = "saves/" + ui.select( "Please choose a savefile to load", os.listdir("saves") ) - self.cat = data.save.load(save) + try: + self.cat = data.save.load(save) + except: + print("The savefile you selected was unable to load, it may be corrupt.") + return False + else: + print( + f"Savefile loaded successfully! Continuing save with {self.cat.name}." + ) + return True def run(self): title() diff --git a/systems/world.py b/systems/world.py index 9b5dc3f..d5ed404 100644 --- a/systems/world.py +++ b/systems/world.py @@ -185,8 +185,8 @@ def house(cat: Cat): print( f"{cat.name} - a {cat.traits["size"]} {cat.traits["color"]} with {cat.traits["eyes"]} eyes." ) - print(f"Happiness level: {cat.happiness}") - print(f"Fullness: {cat.fullness}/100") + print(f"Happiness level: {round(cat.happiness,1)}") + print(f"Fullness: {round(cat.fullness,1)}/100") print(f"You have ${cat.money}.") case "Pet your cat": pet(cat)