From: Christian Heller Date: Sat, 14 Nov 2020 01:49:33 +0000 (+0100) Subject: Expand terrain and thing content. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/static/edit?a=commitdiff_plain;h=73607030fbd5ae9ebb98ceaefa973c98924ce61b;p=plomrogue2 Expand terrain and thing content. --- diff --git a/plomrogue/game.py b/plomrogue/game.py index 1c72aaf..7eaa28b 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -52,7 +52,14 @@ class Game(GameBase): self.player_chars = string.digits + string.ascii_letters self.player_char_i = -1 self.terrains = { + '.': 'floor', 'X': 'wall', + '=': 'window', + '#': 'bed', + 'T': 'desk', + '8': 'cupboard', + '[': 'glass door', + 'o': 'sink', 'O': 'toilet' } if os.path.exists(self.io.save_file): diff --git a/plomrogue/things.py b/plomrogue/things.py index 98a5995..0a06601 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -35,8 +35,14 @@ class Thing(ThingBase): -class Thing_Stone(Thing): - symbol_hint = 'o' +class Thing_Item(Thing): + symbol_hint = 'i' + + + +class Thing_Furniture(Thing): + symbol_hint = 'h' + class ThingAnimate(Thing): diff --git a/rogue_chat.py b/rogue_chat.py index 77bc832..8aaf1a6 100755 --- a/rogue_chat.py +++ b/rogue_chat.py @@ -10,7 +10,7 @@ from plomrogue.commands import (cmd_ALL, cmd_LOGIN, cmd_NICK, cmd_PING, cmd_THIN cmd_THING_NAME, cmd_TERRAINS) from plomrogue.tasks import (Task_WAIT, Task_MOVE, Task_WRITE, Task_PICK_UP, Task_DROP, Task_FLATTEN_SURROUNDINGS) -from plomrogue.things import Thing_Player, Thing_Stone +from plomrogue.things import Thing_Player, Thing_Item, Thing_Furniture import sys if len(sys.argv) != 2: @@ -45,7 +45,8 @@ game.register_task(Task_FLATTEN_SURROUNDINGS) game.register_task(Task_PICK_UP) game.register_task(Task_DROP) game.register_thing_type(Thing_Player) -game.register_thing_type(Thing_Stone) +game.register_thing_type(Thing_Item) +game.register_thing_type(Thing_Furniture) game.read_savefile() game.io.start_loop() game.io.start_server(8000, PlomWebSocketServer)