X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=rogue_chat_curses.py;h=6a30f746f8cdc86e7fc787dfc676c1f3955a59e1;hb=51addf32b5a876c47325fb55756aacaea65ed0da;hp=b7590381055dc93123178b82bf80811e0844e019;hpb=b42a49ec09d08e8f37ea52ad6b74fb10c5c5b01d;p=plomrogue2 diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index b759038..6a30f74 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -291,6 +291,10 @@ def cmd_THING_TYPE(game, thing_type, symbol_hint): game.thing_types[thing_type] = symbol_hint cmd_THING_TYPE.argtypes = 'string char' +def cmd_THING_CARRYING(game, thing_id): + game.get_thing(thing_id).carrying = True +cmd_THING_CARRYING.argtypes = 'int:nonneg' + def cmd_TERRAIN(game, terrain_char, terrain_desc): game.terrains[terrain_char] = terrain_desc cmd_TERRAIN.argtypes = 'char string' @@ -325,6 +329,7 @@ class Game(GameBase): self.register_command(cmd_THING_TYPE) self.register_command(cmd_THING_NAME) self.register_command(cmd_THING_CHAR) + self.register_command(cmd_THING_CARRYING) self.register_command(cmd_TERRAIN) self.register_command(cmd_MAP) self.register_command(cmd_MAP_CONTROL) @@ -846,6 +851,8 @@ class TUI: meta_char = t.thing_char if t.position in used_positions: meta_char = '+' + if hasattr(t, 'carrying') and t.carrying: + meta_char = '$' map_lines_split[t.position.y][t.position.x] = symbol + meta_char used_positions += [t.position]