From: Christian Heller Date: Sat, 14 Mar 2015 03:32:29 +0000 (+0100) Subject: 7DRL: Only player may pick up non-food.(Or AI axe-blocks its inventory.) X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/pick_tasks?a=commitdiff_plain;h=f7fe49e9089c184002d455a71ed4ba81db4d98ad;p=plomrogue 7DRL: Only player may pick up non-food.(Or AI axe-blocks its inventory.) --- diff --git a/roguelike-server b/roguelike-server index 29fe119..b5468a5 100755 --- a/roguelike-server +++ b/roguelike-server @@ -903,6 +903,7 @@ def actor_pick_up(t): Define topmostness by how low the thing's type ID is. """ # 7DRL: Non-player picking up player-dropped consumable -> GOD_FAVOR gain. + # 7DRL: Only player picks up non-food. used_slots = len(t["T_CARRIES"]) # # if used_slots < world_db["ThingTypes"][t["T_TYPE"]]["TT_STORAGE"]: # # ids = [id for id in world_db["Things"] if world_db["Things"][id] != t @@ -914,6 +915,9 @@ def actor_pick_up(t): for iid in ids: tid = world_db["Things"][iid]["T_TYPE"] if lowest_tid == -1 or tid < lowest_tid: + if (t != world_db["Things"][0] and # # + world_db["ThingTypes"][tid]["TT_TOOL"] != "food"): + continue id = iid lowest_tid = tid world_db["Things"][id]["carried"] = True