Fix hash debug menu+bypass hash in debug+new debug config system+shop+base for inventory system+what am i forgetting

This commit is contained in:
2026-04-13 17:45:29 -04:00
parent c92699888e
commit 4df79550ea
8 changed files with 118 additions and 20 deletions

View File

@@ -1,8 +1,10 @@
class Cat:
def __init__(self, name, traits):
def __init__(self, name, traits, food, money, inventory):
self.name = name
self.traits = traits
self.food = 3
self.food = 0
self.money = 25
self.inventory = {}
def to_dict(self):
return vars(self)

View File

@@ -74,7 +74,7 @@ def save(cat):
json.dump(currentjson, f)
def load(filepath):
def load(filepath, bypass_tamper_check=False, force_punish=False):
punished = False
data_dir = get_data_dir()
hash_path = os.path.join(data_dir, "dont hurt cats.json")
@@ -97,6 +97,7 @@ def load(filepath):
with open(filepath) as f:
raw = json.load(f)
cat = Cat(**raw)
if punished:
punish(cat)
if punished or force_punish:
if not bypass_tamper_check:
punish(cat)
return cat

View File

@@ -29,3 +29,8 @@ CAT_PERSONALITIES = [
"just wants to be somewhere else",
]
CAT_EYE_COLORS = ["green", "yellow", "blue", "orange"]
SHOP_ITEMS = {"Food": 5}
BYPASS_TAMPER_CHECK_MESSAGE = "I truly understand that this is cheating and that it is ONLY for development and nothing else. I understand that it is mean to mess with my cat savefile and I apologize to my cat."