home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix arg order for passwords.
[plomrogue2]
/
plomrogue
/
commands.py
diff --git
a/plomrogue/commands.py
b/plomrogue/commands.py
index f6744aca92e037d132effc9ebd0b8dcae9e05d13..85ec5d31b2d4c3c40ae1bf0ee0a3f9e877e00167 100644
(file)
--- 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'
game.turn = n
cmd_TURN.argtypes = 'int:nonneg'
-def cmd_ANNOTATE(game,
pw, yx, msg, connection_id
):
- if not game.can_do_tile_with_pw(yx, pw):
+def cmd_ANNOTATE(game,
yx, msg, pw=None, connection_id=None
):
+ if
connection_id and
not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.annotations:
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
else:
game.annotations[yx] = msg
game.changed = True
-cmd_ANNOTATE.argtypes = '
string yx_tuple:nonne
g string'
+cmd_ANNOTATE.argtypes = '
yx_tuple:nonneg strin
g string'
-def cmd_PORTAL(game,
pw, yx, msg, connection_id
):
- if not game.can_do_tile_with_pw(yx, pw):
+def cmd_PORTAL(game,
yx, msg, pw=None, connection_id=None
):
+ if
connection_id and
not game.can_do_tile_with_pw(yx, pw):
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.portals:
raise GameError('wrong password for tile')
if msg == ' ':
if yx in game.portals:
@@
-92,7
+92,7
@@
def cmd_PORTAL(game, pw, yx, msg, connection_id):
else:
game.portals[yx] = msg
game.changed = True
else:
game.portals[yx] = msg
game.changed = True
-cmd_PORTAL.argtypes = '
string yx_tuple:nonne
g string'
+cmd_PORTAL.argtypes = '
yx_tuple:nonneg strin
g string'
def cmd_GET_ANNOTATION(game, yx, connection_id):
annotation = '(none)';
def cmd_GET_ANNOTATION(game, yx, connection_id):
annotation = '(none)';