fixes
This commit is contained in:
@@ -21,13 +21,13 @@ def reconcile(cat, now):
|
||||
elapsed_hours = (now - cat.last_updated) / 3600
|
||||
if elapsed_hours <= 0:
|
||||
return
|
||||
cat.hunger -= content.HUNGER_DECAY_PER_HOUR * elapsed_hours
|
||||
if cat.hunger < 0:
|
||||
cat.hunger = 0
|
||||
cat.fullness -= content.HUNGER_DECAY_PER_HOUR * elapsed_hours
|
||||
if cat.fullness < 0:
|
||||
cat.fullness = 0
|
||||
cat.last_updated = now
|
||||
|
||||
|
||||
def feed(cat, amount=100):
|
||||
cat.hunger += amount
|
||||
if cat.hunger > 100:
|
||||
cat.hunger = 100
|
||||
cat.fullness += amount
|
||||
if cat.fullness > 100:
|
||||
cat.fullnesss = 100
|
||||
|
||||
Reference in New Issue
Block a user