X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Fcommands.py;h=12389c653d9584da3f4260bf4f59dbb92ed19f85;hb=d5f31d8172456933650aee47f8fe730d98839181;hp=f6744aca92e037d132effc9ebd0b8dcae9e05d13;hpb=da3b93d7a4bd66aef5860bb5a7099e89ab18024c;p=plomrogue2 diff --git a/plomrogue/commands.py b/plomrogue/commands.py index f6744ac..12389c6 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -72,7 +72,7 @@ def cmd_TURN(game, n): game.turn = n cmd_TURN.argtypes = 'int:nonneg' -def cmd_ANNOTATE(game, pw, yx, msg, connection_id): +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 == ' ': @@ -81,9 +81,9 @@ 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): +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 == ' ': @@ -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_GOD_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)';