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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user