From: Christian Heller Date: Sat, 14 Mar 2015 03:09:39 +0000 (+0100) Subject: Fix bug in standing_on_food() (returned True on items in inventory). X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/all?a=commitdiff_plain;h=9330c75f9ad159f7695e0e890e0ec07f3b12b260;p=plomrogue Fix bug in standing_on_food() (returned True on items in inventory). --- diff --git a/roguelike-server b/roguelike-server index b72b9f5..c5b50db 100755 --- 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"]]