From 7cd0ed7e2deb006eef71618c890d37a974cdf655 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 13 Mar 2016 12:11:51 +0100 Subject: [PATCH] TCE: Fix ai command mix up bug. --- plugins/server/TheCrawlingEater.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 898f102..9ef3aff 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -13,9 +13,11 @@ def command_help(str_int): def command_ai(): - if world_db["WORLD_ACTIVE"]: - world_db["ai"](world_db["Things"][0]) - world_db["turn_over"]() + if not (world_db["WORLD_ACTIVE"] + and world_db["Things"][0]["T_LIFEPOINTS"] > 0): + return + world_db["ai"](world_db["Things"][0]) + world_db["turn_over"]() def play_drink(): @@ -381,16 +383,6 @@ def turn_over(): world_db["turn_over"] = turn_over -def command_ai(): - """Call ai() on player Thing, then turn_over().""" - if not (world_db["WORLD_ACTIVE"] - and world_db["Things"][0]["T_LIFEPOINTS"] > 0): - return - from server.ai import ai - ai(world_db["Things"][0]) - world_db["turn_over"]() - - def set_command(action): """Set player's T_COMMAND, then call turn_over().""" tid = [x for x in world_db["ThingActions"] -- 2.30.2