X-Git-Url: https://plomlompom.com/repos/do_day?a=blobdiff_plain;f=plomrogue%2Fcommands.py;h=a2f98ed1bf989d3195096cf84456815e7da8fc0d;hb=800aca691b359f448599160ba3d8aef28174596d;hp=a9bd7938facafcdff695608567b9bd28ac4cf3c8;hpb=7c8e4b41c019affacda141989fe532ec10af86e7;p=plomrogue2 diff --git a/plomrogue/commands.py b/plomrogue/commands.py index a9bd793..a2f98ed 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -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'