From: Christian Heller Date: Wed, 9 Mar 2016 21:53:55 +0000 (+0100) Subject: Server: Don't hardcode possible action names in TA_NAME command. X-Git-Tag: tce~61 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D?a=commitdiff_plain;h=366322b999ecfeea0b1a2c0d6f8d43795ae3e918;p=plomrogue Server: Don't hardcode possible action names in TA_NAME command. --- 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"]: