From 366322b999ecfeea0b1a2c0d6f8d43795ae3e918 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 9 Mar 2016 22:53:55 +0100 Subject: [PATCH] Server: Don't hardcode possible action names in TA_NAME command. --- server/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/commands.py b/server/commands.py index b8216a0..df4f962 100644 --- a/server/commands.py +++ b/server/commands.py @@ -314,8 +314,8 @@ def command_taname(name): The name must match a valid thing action function. If after the name setting no ThingAction with name "wait" remains, call set_world_inactive(). """ - if name == "wait" or name == "move" or name == "use" or name == "drop" \ - or name == "pickup": + from server.config.commands import commands_db + if name in commands_db and name.islower(): world_db["ThingActions"][command_taid.id]["TA_NAME"] = name if 1 == world_db["WORLD_ACTIVE"]: for id in world_db["ThingActions"]: -- 2.30.2