X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomrogue%2Fcommands.py;h=389b534da2bb7783dbd254a5ba16eb19f94289c0;hb=35a30b2b2579f5cac20ba94cd5e162d11fd283ee;hp=c2bcc0a4858076568f0f7609a4f69f1efa3528d4;hpb=9a54df0364d718dda3541044febbf01869f94b1d;p=plomrogue2
diff --git a/plomrogue/commands.py b/plomrogue/commands.py
index c2bcc0a..389b534 100644
--- a/plomrogue/commands.py
+++ b/plomrogue/commands.py
@@ -72,8 +72,8 @@ def cmd_TURN(game, n):
game.turn = n
cmd_TURN.argtypes = 'int:nonneg'
-def cmd_ANNOTATE(game, pw, yx, msg, connection_id):
- if connection_id and not game.can_do_tile_with_pw(yx, pw):
+def cmd_ANNOTATE(game, yx, msg, pw, connection_id):
+ if not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.annotations:
@@ -81,10 +81,10 @@ def cmd_ANNOTATE(game, pw, yx, msg, connection_id):
else:
game.annotations[yx] = msg
game.changed = True
-cmd_ANNOTATE.argtypes = 'string yx_tuple:nonneg string'
+cmd_ANNOTATE.argtypes = 'yx_tuple:nonneg string string'
-def cmd_PORTAL(game, pw, yx, msg, connection_id):
- if connection_id and not game.can_do_tile_with_pw(yx, pw):
+def cmd_PORTAL(game, yx, msg, pw, connection_id):
+ if not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.portals:
@@ -92,7 +92,17 @@ def cmd_PORTAL(game, pw, yx, msg, connection_id):
else:
game.portals[yx] = msg
game.changed = True
-cmd_PORTAL.argtypes = 'string yx_tuple:nonneg string'
+cmd_PORTAL.argtypes = 'yx_tuple:nonneg string string'
+
+def cmd_GOD_ANNOTATE(game, yx, msg):
+ game.annotations[yx] = msg
+ game.changed = True
+cmd_GOD_ANNOTATE.argtypes = 'yx_tuple:nonneg string'
+
+def cmd_GOD_PORTAL(game, yx, msg):
+ game.portals[yx] = msg
+ game.changed = True
+cmd_GOD_PORTAL.argtypes = 'yx_tuple:nonneg string'
def cmd_GET_ANNOTATION(game, yx, connection_id):
annotation = '(none)';