home · contact · privacy
Fix bug in standing_on_food() (returned True on items in inventory).
[plomrogue] / roguelike-server
index b72b9f530b950dd8200a5f870c4c0c2f2a901cb9..c5b50db90d44aa18fece591748ca8435623383c2 100755 (executable)
@@ -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"]]