home · contact · privacy
Fix bug in standing_on_food() (returned True on items in inventory).
[plomrogue] / roguelike-server
index 462a3428331d01a1f58f7f23659e0e1e371c8eab..e102fbfd6fa3d2b0ade530e9ab4d9f890e952af3 100755 (executable)
@@ -971,6 +971,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"]]