home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4327b75
)
Server: Don't hardcode possible action names in TA_NAME command.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 9 Mar 2016 21:53:55 +0000
(22:53 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 9 Mar 2016 21:53:55 +0000
(22:53 +0100)
server/commands.py
patch
|
blob
|
history
diff --git
a/server/commands.py
b/server/commands.py
index b8216a0fec6433699401b6eefc9cfa4bf41a7080..df4f962ab2ddbe9ca504f49ba58d3c8812046b8a 100644
(file)
--- 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().
"""
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"]:
world_db["ThingActions"][command_taid.id]["TA_NAME"] = name
if 1 == world_db["WORLD_ACTIVE"]:
for id in world_db["ThingActions"]: