+
+def cmd_MAP_CONTROL_LINE(game, big_yx, y, line):
+ map_control = game.get_map(big_yx, 'control')
+ map_control.set_line(y, line)
+cmd_MAP_CONTROL_LINE.argtypes = 'yx_tuple 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'
+
+def cmd_THING(game, big_yx, little_yx, thing_type, thing_id):
+ if not thing_type in game.thing_types:
+ raise GameError('illegal thing type %s' % thing_type)
+ map_ = game.get_map(big_yx)
+ t_old = None
+ if thing_id > 0:
+ t_old = game.get_thing(thing_id)
+ t_new = game.thing_types[thing_type](game, id_=thing_id, position=(big_yx,
+ little_yx))
+ if t_old:
+ game.things[game.things.index(t_old)] = t_new
+ else:
+ game.things += [t_new]
+ game.changed = True
+cmd_THING.argtypes = 'yx_tuple yx_tuple:nonneg string:thing_type int:nonneg'
+
+def cmd_THING_NAME(game, thing_id, name):
+ t = game.get_thing(thing_id)
+ if not t:
+ raise GameError('thing of ID %s not found' % thing_id)
+ t.name = name
+cmd_THING_NAME.argtypes = 'int:pos string'