X-Git-Url: https://plomlompom.com/repos/?p=plomrogue;a=blobdiff_plain;f=server%2Fai.py;h=0d1effce2262a6f0473d270e4a37ad3128cc19de;hp=a243aa4dfc9e49d20c096162089185576fd21e7f;hb=81f8bee1a21642c56b1fead9ba79afdad0c8b451;hpb=c94c0575b191d0162d8a1cbbbe4e59cca2e40324 diff --git a/server/ai.py b/server/ai.py index a243aa4..0d1effc 100644 --- a/server/ai.py +++ b/server/ai.py @@ -285,12 +285,13 @@ def ai(t): if get_dir_to_target(t, "f"): return sel = get_inventory_slot_to_consume(t) + from server.config.ai import ai_hook_pickup_test if -1 != sel: t["T_COMMAND"] = [id for id in world_db["ThingActions"] if world_db["ThingActions"][id]["TA_NAME"] == "use"][0] t["T_ARGUMENT"] = sel - elif standing_on_food(t): + elif standing_on_food(t) and ai_hook_pickup_test(t): t["T_COMMAND"] = [id for id in world_db["ThingActions"] if world_db["ThingActions"][id]["TA_NAME"] == "pickup"][0]