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:
010036f
)
get_nventory_slot_to_consume(t): Eat anything if deep in the red.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 8 Sep 2015 12:00:11 +0000
(14:00 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 8 Sep 2015 12:00:11 +0000
(14:00 +0200)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index ac4f6e8fd86ef206e9e8fc5867acfb009f927723..c6e096e0591332fd40332c6e4cf58835ea6b3e04 100755
(executable)
--- 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