From: Christian Heller Date: Thu, 3 Mar 2016 02:17:51 +0000 (+0100) Subject: Server: Minor code simplification. X-Git-Tag: tce~97 X-Git-Url: https://plomlompom.com/repos/index.html?a=commitdiff_plain;h=273682ce18f635f121da5903272c366652470533;p=plomrogue Server: Minor code simplification. --- diff --git a/server/ai.py b/server/ai.py index db40625..21f7115 100644 --- a/server/ai.py +++ b/server/ai.py @@ -64,8 +64,7 @@ def get_dir_to_target(t, filter): return False def good_flee_target(m): - own_corpse_id = world_db["ThingTypes"][t["T_TYPE"]]["TT_CORPSE_ID"] - corpse_type = world_db["ThingTypes"][own_corpse_id] + corpse_type = world_db["ThingTypes"][tt["TT_CORPSE_ID"]] targetness = 0 if corpse_type["TT_TOOL"] != "food" \ else corpse_type["TT_TOOLPOWER"] type = world_db["ThingTypes"][m["T_TYPE"]]