home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prohibit movement over non-dot map cells
[plomrogue2-experiments]
/
new2
/
plomrogue
/
parser.py
diff --git
a/new2/plomrogue/parser.py
b/new2/plomrogue/parser.py
index a56b5d1bb64bd8b07f2aecb101d88a4dc4ee91f3..f23a7aaacb58e8f89604f85ec1b525e0e0ac9d01 100644
(file)
--- a/
new2/plomrogue/parser.py
+++ b/
new2/plomrogue/parser.py
@@
-75,7
+75,11
@@
class Parser:
for i in range(len(tmpl_tokens)):
tmpl = tmpl_tokens[i]
arg = args_tokens[i]
for i in range(len(tmpl_tokens)):
tmpl = tmpl_tokens[i]
arg = args_tokens[i]
- if tmpl == string_string:
+ if tmpl == 'int:nonneg':
+ if not arg.isdigit():
+ raise ArgError('Argument must be non-negative integer.')
+ args += [int(arg)]
+ elif tmpl == string_string:
args += [arg]
elif tmpl[:len(string_string) + 1] == string_string + ':':
if not hasattr(self.game, 'get_string_options'):
args += [arg]
elif tmpl[:len(string_string) + 1] == string_string + ':':
if not hasattr(self.game, 'get_string_options'):