home · contact · privacy
Add thing name editing.
[plomrogue2] / plomrogue / commands.py
index a9bd7938facafcdff695608567b9bd28ac4cf3c8..a2f98ed1bf989d3195096cf84456815e7da8fc0d 100644 (file)
@@ -269,9 +269,17 @@ def cmd_THING(game, big_yx, little_yx, thing_type, thing_id):
     game.changed = True
 cmd_THING.argtypes = 'yx_tuple yx_tuple:nonneg string:thing_type int:nonneg'
 
-def cmd_THING_NAME(game, thing_id, name):
+def cmd_THING_NAME(game, thing_id, name, connection_id):
     t = game.get_thing(thing_id)
     if not t:
         raise GameError('thing of ID %s not found' % thing_id)
     t.name = name
+    game.changed = True
 cmd_THING_NAME.argtypes = 'int:pos string'
+
+def cmd_GOD_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_GOD_THING_NAME.argtypes = 'int:pos string'