home · contact · privacy
Add terrain editing access control via passwords.
[plomrogue2] / plomrogue / parser.py
index 5782d695fe1f026d4dc2b00f422cda389fae9988..6a6aaaaa59087c2f5a240efbff92ec4025bbc752 100644 (file)
@@ -106,6 +106,12 @@ class Parser:
                 if not arg.isdigit():
                     raise ArgError('Argument must be non-negative integer.')
                 args += [int(arg)]
+            elif tmpl == 'char':
+                try:
+                    ord(arg)
+                except TypeError:
+                    raise ArgError('Argument must be single character.')
+                args += [arg]
             elif tmpl == 'yx_tuple:nonneg':
                 args += [self.parse_yx_tuple(arg, 'nonneg')]
             elif tmpl == 'yx_tuple:pos':