X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=rogue_chat.py;h=1f40913eae7b4c11fc7baf3624470e221c72eab8;hb=bdc9cfa20f92bb41749790ac4943ab2a11e39d9a;hp=0b1ea23197e0042049cbce0215c71ac783ab1adf;hpb=00167344ddc7cb47c344473e2bc3bbfef6b4fe41;p=plomrogue2
diff --git a/rogue_chat.py b/rogue_chat.py
index 0b1ea23..1f40913 100755
--- a/rogue_chat.py
+++ b/rogue_chat.py
@@ -2,11 +2,17 @@
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)
-from plomrogue.tasks import (Task_WAIT, Task_MOVE, Task_WRITE,
- Task_FLATTEN_SURROUNDINGS)
+ cmd_ANNOTATE, cmd_PORTAL, cmd_GET_GAMESTATE,
+ cmd_TASKS, cmd_MAP_CONTROL_LINE, cmd_MAP_CONTROL_PW,
+ cmd_GOD_ANNOTATE, cmd_GOD_PORTAL, cmd_THING_TYPES,
+ cmd_THING_NAME, cmd_TERRAINS, cmd_ADMIN_PASSWORD,
+ cmd_BECOME_ADMIN, cmd_SET_TILE_CONTROL,
+ cmd_SET_MAP_CONTROL_PASSWORD, cmd_SPAWN_POINT)
+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:
@@ -15,20 +21,39 @@ if len(sys.argv) != 2:
savefile = sys.argv[1]
game = Game(savefile)
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)
+game.register_command(cmd_MAP_CONTROL_LINE)
+game.register_command(cmd_MAP_CONTROL_PW)
game.register_command(cmd_GET_ANNOTATION)
game.register_command(cmd_ANNOTATE)
game.register_command(cmd_PORTAL)
+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_command(cmd_ADMIN_PASSWORD)
+game.register_command(cmd_SET_TILE_CONTROL)
+game.register_command(cmd_SET_MAP_CONTROL_PASSWORD)
+game.register_command(cmd_BECOME_ADMIN)
+game.register_command(cmd_SPAWN_POINT)
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)