X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=server%2Fconfig%2Fcommands.py;h=06e6f759cf1b5384957b1cabb89768db2d38fa22;hb=9b0bee2dc583ea369039f0869df0527fdc84f59a;hp=84ac8e298c32d79c381bd1278a4ba3f9e20f252a;hpb=009f06a7a2baef5af4474b18fd75b19c05befb4f;p=plomrogue
diff --git a/server/config/commands.py b/server/config/commands.py
index 84ac8e2..06e6f75 100644
--- a/server/config/commands.py
+++ b/server/config/commands.py
@@ -9,7 +9,8 @@ from server.commands import command_plugin, command_quit, command_ping, \
command_taname, command_ttid, command_ttname, command_tttool, \
command_ttsymbol, command_ttcorpseid, command_tid, command_tcommand, \
command_ttype, command_tcarries, command_tmemthing, setter_tpos, \
- play_wait, play_move, play_pickup, play_drop, play_use, command_ai
+ play_wait, play_move, play_pickup, play_drop, play_use, command_ai, \
+ command_ttlifepoints, command_taeffort
"""Commands database.
@@ -20,7 +21,7 @@ be ignored in replay mode if read from server input file), and ([2]) a function
to be called on it.
"""
commands_db = {
- "PLUGIN": (1, True, command_plugin),
+ "PLUGIN": (1, False, command_plugin),
"QUIT": (0, True, command_quit),
"PING": (0, True, command_ping),
"THINGS_HERE": (2, True, command_thingshere),
@@ -32,7 +33,7 @@ commands_db = {
"WORLD_ACTIVE": (1, False, command_worldactive),
"MAP": (2, False, setter_map("MAP")),
"TA_ID": (1, False, command_taid),
- "TA_EFFORT": (1, False, setter("ThingAction", "TA_EFFORT", 0, 255)),
+ "TA_EFFORT": (1, False, command_taeffort),
"TA_NAME": (1, False, command_taname),
"TT_ID": (1, False, command_ttid),
"TT_NAME": (1, False, command_ttname),
@@ -44,7 +45,7 @@ commands_db = {
0, 255)),
"TT_PROLIFERATE": (1, False, setter("ThingType", "TT_PROLIFERATE",
0, 65535)),
- "TT_LIFEPOINTS": (1, False, setter("ThingType", "TT_LIFEPOINTS", 0, 255)),
+ "TT_LIFEPOINTS": (1, False, command_ttlifepoints),
"T_ID": (1, False, command_tid),
"T_ARGUMENT": (1, False, setter("Thing", "T_ARGUMENT", 0, 255)),
"T_PROGRESS": (1, False, setter("Thing", "T_PROGRESS", 0, 255)),
@@ -66,3 +67,8 @@ commands_db = {
"ai": (0, False, command_ai)
}
# TODO: Unhandled cases: (Un-)killing animates (esp. player!) with T_LIFEPOINTS.
+
+command_worldactive_test_hook = lambda: True
+play_move_attempt_hook = lambda x, y, z: False
+play_use_attempt_hook = lambda x, y: None
+play_pickup_attempt_hook = lambda x: True