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:
a70d391
)
Fix bug in standing_on_food() (returned True on items in inventory).
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 14 Mar 2015 03:09:39 +0000
(
04:09
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 14 Mar 2015 03:09:39 +0000
(
04:09
+0100)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index b72b9f530b950dd8200a5f870c4c0c2f2a901cb9..c5b50db90d44aa18fece591748ca8435623383c2 100755
(executable)
--- a/
roguelike-server
+++ b/
roguelike-server
@@
-1300,6
+1300,7
@@
def get_dir_to_target(t, filter):
def standing_on_food(t):
"""Return True/False whether t is standing on a consumable."""
for id in [id for id in world_db["Things"] if world_db["Things"][id] != t
+ if not world_db["Things"][id]["carried"]
if world_db["Things"][id]["T_POSY"] == t["T_POSY"]
if world_db["Things"][id]["T_POSX"] == t["T_POSX"]
if world_db["ThingTypes"][world_db["Things"][id]["T_TYPE"]]