home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
697b156
)
get_inventory_slot_to_consume(t): Eat anything if deep in the red.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 14 Mar 2015 05:36:16 +0000
(06:36 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 14 Mar 2015 05:36:16 +0000
(06:36 +0100)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index 63fd016e9f8f11aabcc5f61ad37ede9d08e84c9d..2a987fd88961d913844d1a3daa555209a59b80f8 100755
(executable)
--- 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