From 273682ce18f635f121da5903272c366652470533 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 3 Mar 2016 03:17:51 +0100 Subject: [PATCH] Server: Minor code simplification. --- server/ai.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"]] -- 2.30.2