X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=rogue_chat.py;h=8aaf1a6a702cc658691141ad209a658f233dbc75;hb=7ef70c5adfd5f1b4a4736199c78ee8209b10805b;hp=948f698c5949a3b87eea501dad06aecd82e8d09b;hpb=ddeb515b38d9265dd68631895172b00b79d8f629;p=plomrogue2
diff --git a/rogue_chat.py b/rogue_chat.py
index 948f698..8aaf1a6 100755
--- a/rogue_chat.py
+++ b/rogue_chat.py
@@ -2,13 +2,15 @@
from plomrogue.game import Game
from plomrogue.io_websocket import PlomWebSocketServer
from plomrogue.io_tcp import PlomTCPServer
-from plomrogue.commands import (cmd_ALL, cmd_LOGIN, cmd_NICK, cmd_QUERY, cmd_PING,
+from plomrogue.commands import (cmd_ALL, cmd_LOGIN, cmd_NICK, cmd_PING, cmd_THING,
cmd_MAP, cmd_TURN, cmd_MAP_LINE, cmd_GET_ANNOTATION,
cmd_ANNOTATE, cmd_PORTAL, cmd_GET_GAMESTATE,
cmd_TASKS, cmd_MAP_CONTROL_LINE, cmd_MAP_CONTROL_PW,
- cmd_GOD_ANNOTATE, cmd_GOD_PORTAL)
-from plomrogue.tasks import (Task_WAIT, Task_MOVE, Task_WRITE,
- Task_FLATTEN_SURROUNDINGS)
+ cmd_GOD_ANNOTATE, cmd_GOD_PORTAL, cmd_THING_TYPES,
+ 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_Item, Thing_Furniture
import sys
if len(sys.argv) != 2:
@@ -20,7 +22,6 @@ game.register_command(cmd_PING)
game.register_command(cmd_ALL)
game.register_command(cmd_LOGIN)
game.register_command(cmd_NICK)
-game.register_command(cmd_QUERY)
game.register_command(cmd_TURN)
game.register_command(cmd_MAP)
game.register_command(cmd_MAP_LINE)
@@ -33,10 +34,19 @@ game.register_command(cmd_GOD_ANNOTATE)
game.register_command(cmd_GOD_PORTAL)
game.register_command(cmd_GET_GAMESTATE)
game.register_command(cmd_TASKS)
+game.register_command(cmd_THING_TYPES)
+game.register_command(cmd_TERRAINS)
+game.register_command(cmd_THING)
+game.register_command(cmd_THING_NAME)
game.register_task(Task_WAIT)
game.register_task(Task_MOVE)
game.register_task(Task_WRITE)
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_Item)
+game.register_thing_type(Thing_Furniture)
game.read_savefile()
game.io.start_loop()
game.io.start_server(8000, PlomWebSocketServer)