From b3b4cee8b7088a4a2c575ffb4f08c12dd408846d Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 8 Mar 2015 00:42:08 +0100 Subject: [PATCH] Server/py: Fix buggy logging in actor_use(). --- plomrogue-server.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plomrogue-server.py b/plomrogue-server.py index 2b65287..2d53bb5 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -668,13 +668,15 @@ def actor_use(t): t["T_CARRIES"].remove(id) del world_db["Things"][id] t["T_SATIATION"] += world_db["ThingTypes"][type]["TT_CONSUMABLE"] - strong_write(io_db["file_out"], "LOG You consume this object.\n") - else: - strong_write(io_db["file_out"], "LOG You try to use this object," + - "but fail.\n") - else: - strong_write(io_db["file_out"], "LOG You try to use an object, but " + - "you own none.\n") + if t == world_db["Things"][0]: + strong_write(io_db["file_out"], + "LOG You consume this object.\n") + elif t == world_db["Things"][0]: + strong_write(io_db["file_out"], + "LOG You try to use this object, but fail.\n") + elif t == world_db["Things"][0]: + strong_write(io_db["file_out"], + "LOG You try to use an object, but you own none.\n") def thingproliferation(t): -- 2.30.2