X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=server%2Fai.py;h=0d1effce2262a6f0473d270e4a37ad3128cc19de;hb=fcae38c10fa1417b56086c59efffdda359632d3a;hp=a243aa4dfc9e49d20c096162089185576fd21e7f;hpb=5125831a6f58c986b71ac1cbd7125b88d1ad5c87;p=plomrogue 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]