home · contact · privacy
Add terrain editing access control via passwords.
[plomrogue2] / plomrogue / commands.py
index e75cbe9001f495a0177d65ee0859d148486e897f..f8c8e3aa5aa139d3ece7746abe37162ed7ad58f9 100644 (file)
@@ -105,3 +105,11 @@ def cmd_MAP(game, geometry, size):
     map_geometry_class = globals()['MapGeometry' + geometry]
     game.new_world(map_geometry_class(size))
 cmd_MAP.argtypes = 'string:map_geometry yx_tuple:pos'
+
+def cmd_MAP_CONTROL_LINE(game, y, line):
+    game.map_control.set_line(y, line)
+cmd_MAP_CONTROL_LINE.argtypes = 'int:nonneg string'
+
+def cmd_MAP_CONTROL_PW(game, tile_class, password):
+    game.map_control_passwords[tile_class] = password
+cmd_MAP_CONTROL_PW.argtypes = 'char string'