From: Christian Heller Date: Tue, 8 Sep 2015 12:00:11 +0000 (+0200) Subject: get_nventory_slot_to_consume(t): Eat anything if deep in the red. X-Git-Tag: tce~282 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_data.id_%7D%7D?a=commitdiff_plain;h=a20d50bc371d1d2ccdeb6845cebf238ac0ab0ffd;p=plomrogue get_nventory_slot_to_consume(t): Eat anything if deep in the red. --- diff --git a/roguelike-server b/roguelike-server index ac4f6e8..c6e096e 100755 --- a/roguelike-server +++ b/roguelike-server @@ -997,6 +997,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