home
·
contact
·
privacy
projects
/
plomrogue2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70b12aa
)
Minor refactor.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Nov 2020 23:23:06 +0000
(
00:23
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 17 Nov 2020 23:23:06 +0000
(
00:23
+0100)
plomrogue/commands.py
patch
|
blob
|
history
diff --git
a/plomrogue/commands.py
b/plomrogue/commands.py
index e40f5306585ad0541811fb89ff137be389672ff7..ed7d3ddeb2b041181a14fdd3ef29f09d50d9b3f1 100644
(file)
--- a/
plomrogue/commands.py
+++ b/
plomrogue/commands.py
@@
-194,7
+194,7
@@
cmd_MAP_CONTROL_PW.argtypes = 'char string'
def cmd_THING(game, yx, thing_type, thing_id):
if not thing_type in game.thing_types:
raise GameError('illegal thing type %s' % thing_type)
- if
yx.y < 0 or yx.x < 0 or yx.y >= game.map.size.y or yx.x >= game.map.size.x
:
+ if
not game.map.inside(yx)
:
raise GameError('illegal position %s' % yx)
t_old = None
if thing_id > 0: