X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;f=plomrogue%2Fcommands.py;h=fc087fbe7434a4cc6966b773f123da07425909d4;hb=e91c0688ee0d273d7f106e837e1ad52009d79350;hp=c25740bd98f93d174b6f4312147abfa448761052;hpb=6cb3a857a09ae974bf0f510dfa94fb19fba2ce31;p=plomrogue2 diff --git a/plomrogue/commands.py b/plomrogue/commands.py index c25740b..fc087fb 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -310,3 +310,14 @@ def cmd_GOD_THING_PROTECTION(game, thing_id, protection_char): raise GameError('thing of ID %s not found' % thing_id) t.protection = protection_char cmd_GOD_THING_PROTECTION.argtypes = 'int:pos char' + +def cmd_THING_DOOR_CLOSED(game, thing_id): + t = game.get_thing(thing_id) + if not t: + raise GameError('thing of ID %s not found' % thing_id) + if not t.type_ == 'Door': + raise GameError('thing of ID %s not door' % thing_id) + t.blocking = True + t.portable = False + t.thing_char = '#' +cmd_THING_DOOR_CLOSED.argtypes = 'int:pos'