From: Christian Heller Date: Sat, 14 Mar 2015 05:36:16 +0000 (+0100) Subject: get_inventory_slot_to_consume(t): Eat anything if deep in the red. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D?a=commitdiff_plain;h=78431782fa8cfd7131044419d7a6d7b9718eb31f;p=plomrogue get_inventory_slot_to_consume(t): Eat anything if deep in the red. --- diff --git a/roguelike-server b/roguelike-server index 63fd016..2a987fd 100755 --- a/roguelike-server +++ b/roguelike-server @@ -1305,6 +1305,7 @@ def get_inventory_slot_to_consume(t): nutvalue = world_db["ThingTypes"][type]["TT_TOOLPOWER"] tmp_cmp = abs(t["T_SATIATION"] + nutvalue - consume_hungering) if (cmp_food < 0 and tmp_cmp < abs(t["T_SATIATION"])) \ + or (cmp_food < 0 and 0 > t["T_SATIATION"] + nutvalue) \ or tmp_cmp < cmp_food: cmp_food = tmp_cmp selection = i