2 from plomrogue.game import Game
3 from plomrogue.commands import (cmd_ALL, cmd_LOGIN, cmd_NICK, cmd_PING, cmd_THING,
4 cmd_MAP, cmd_TURN, cmd_MAP_LINE, cmd_THING_INSTALLED,
5 cmd_ANNOTATE, cmd_PORTAL, cmd_GET_GAMESTATE,
6 cmd_TASKS, cmd_MAP_CONTROL_LINE, cmd_MAP_CONTROL_PW,
7 cmd_GOD_ANNOTATE, cmd_GOD_PORTAL, cmd_THING_TYPES,
8 cmd_THING_NAME, cmd_TERRAINS, cmd_ADMIN_PASSWORD,
9 cmd_BECOME_ADMIN, cmd_SET_TILE_CONTROL,
10 cmd_GOD_THING_NAME, cmd_THING_DOOR_CLOSED,
11 cmd_GOD_THING_PROTECTION, cmd_THING_PROTECTION,
12 cmd_SET_MAP_CONTROL_PASSWORD, cmd_SPAWN_POINT,
13 cmd_THING_MUSICPLAYER_SETTINGS, cmd_INTRO_MSG,
14 cmd_THING_MUSICPLAYER_PLAYLIST_ITEM, cmd_TERRAIN,
15 cmd_THING_BOTTLE_EMPTY, cmd_PLAYER_FACE,
16 cmd_GOD_PLAYER_FACE, cmd_GOD_PLAYER_HAT,
17 cmd_GOD_PLAYERS_HAT_CHARS,
18 cmd_TERRAIN_TAG, cmd_THING_DOOR_KEY,
19 cmd_THING_CRATE_ITEM, cmd_MAP_CONTROL_PRESETS,
20 cmd_THING_SPAWNPOINT_CREATED, cmd_GOD_THING_DESIGN,
21 cmd_THING_DESIGN, cmd_THING_DESIGN_SIZE,
22 cmd_GOD_THING_DESIGN_SIZE)
23 from plomrogue.tasks import (Task_WAIT, Task_MOVE, Task_WRITE, Task_PICK_UP,
24 Task_DROP, Task_FLATTEN_SURROUNDINGS, Task_DOOR,
25 Task_INTOXICATE, Task_COMMAND, Task_INSTALL,
26 Task_WEAR, Task_SPIN, Task_DANCE)
27 from plomrogue.things import (Thing_Player, Thing_Item, Thing_ItemSpawner,
28 Thing_SpawnPoint, Thing_SpawnPointSpawner,
29 Thing_Door, Thing_DoorSpawner, Thing_Bottle,
30 Thing_BottleSpawner, Thing_BottleDeposit,
31 Thing_MusicPlayer, Thing_Hat, Thing_HatRemixer,
32 Thing_Cookie, Thing_CookieSpawner, Thing_Psychedelic,
33 Thing_PsychedelicSpawner, Thing_DoorKey,
34 Thing_Crate, Thing_CrateSpawner, Thing_Stimulant,
35 Thing_StimulantSpawner, Thing_Sign,
36 Thing_SignSpawner, Thing_Chair, Thing_ChairSpawner)
38 from plomrogue.config import config
39 game = Game(config['savefile'])
40 game.register_command(cmd_PING)
41 game.register_command(cmd_ALL)
42 game.register_command(cmd_LOGIN)
43 game.register_command(cmd_NICK)
44 game.register_command(cmd_TURN)
45 game.register_command(cmd_MAP)
46 game.register_command(cmd_TERRAIN)
47 game.register_command(cmd_TERRAIN_TAG)
48 game.register_command(cmd_MAP_LINE)
49 game.register_command(cmd_MAP_CONTROL_LINE)
50 game.register_command(cmd_MAP_CONTROL_PW)
51 game.register_command(cmd_ANNOTATE)
52 game.register_command(cmd_PORTAL)
53 game.register_command(cmd_GOD_ANNOTATE)
54 game.register_command(cmd_GOD_PORTAL)
55 game.register_command(cmd_GET_GAMESTATE)
56 game.register_command(cmd_TASKS)
57 game.register_command(cmd_THING_TYPES)
58 game.register_command(cmd_TERRAINS)
59 game.register_command(cmd_THING)
60 game.register_command(cmd_THING_PROTECTION)
61 game.register_command(cmd_GOD_THING_PROTECTION)
62 game.register_command(cmd_THING_NAME)
63 game.register_command(cmd_THING_DOOR_CLOSED)
64 game.register_command(cmd_THING_INSTALLED)
65 game.register_command(cmd_GOD_THING_NAME)
66 game.register_command(cmd_ADMIN_PASSWORD)
67 game.register_command(cmd_SET_TILE_CONTROL)
68 game.register_command(cmd_SET_MAP_CONTROL_PASSWORD)
69 game.register_command(cmd_BECOME_ADMIN)
70 game.register_command(cmd_SPAWN_POINT)
71 game.register_command(cmd_THING_MUSICPLAYER_SETTINGS)
72 game.register_command(cmd_THING_MUSICPLAYER_PLAYLIST_ITEM)
73 game.register_command(cmd_THING_BOTTLE_EMPTY)
74 game.register_command(cmd_PLAYER_FACE)
75 game.register_command(cmd_GOD_PLAYER_FACE)
76 game.register_command(cmd_GOD_PLAYER_HAT)
77 game.register_command(cmd_GOD_PLAYERS_HAT_CHARS)
78 game.register_command(cmd_THING_DOOR_KEY)
79 game.register_command(cmd_THING_CRATE_ITEM)
80 game.register_command(cmd_THING_DESIGN)
81 game.register_command(cmd_THING_DESIGN_SIZE)
82 game.register_command(cmd_GOD_THING_DESIGN)
83 game.register_command(cmd_GOD_THING_DESIGN_SIZE)
84 game.register_command(cmd_MAP_CONTROL_PRESETS)
85 game.register_command(cmd_THING_SPAWNPOINT_CREATED)
86 game.register_command(cmd_INTRO_MSG)
87 game.register_task(Task_WAIT)
88 game.register_task(Task_MOVE)
89 game.register_task(Task_WRITE)
90 game.register_task(Task_FLATTEN_SURROUNDINGS)
91 game.register_task(Task_PICK_UP)
92 game.register_task(Task_DROP)
93 game.register_task(Task_DOOR)
94 game.register_task(Task_INTOXICATE)
95 game.register_task(Task_COMMAND)
96 game.register_task(Task_INSTALL)
97 game.register_task(Task_WEAR)
98 game.register_task(Task_SPIN)
99 game.register_task(Task_DANCE)
100 game.register_thing_type(Thing_Player)
101 game.register_thing_type(Thing_Item)
102 game.register_thing_type(Thing_ItemSpawner)
103 game.register_thing_type(Thing_SpawnPoint)
104 game.register_thing_type(Thing_SpawnPointSpawner)
105 game.register_thing_type(Thing_Door)
106 game.register_thing_type(Thing_DoorKey)
107 game.register_thing_type(Thing_DoorSpawner)
108 game.register_thing_type(Thing_Bottle)
109 game.register_thing_type(Thing_BottleSpawner)
110 game.register_thing_type(Thing_BottleDeposit)
111 game.register_thing_type(Thing_MusicPlayer)
112 game.register_thing_type(Thing_Hat)
113 game.register_thing_type(Thing_HatRemixer)
114 game.register_thing_type(Thing_Cookie)
115 game.register_thing_type(Thing_CookieSpawner)
116 game.register_thing_type(Thing_Psychedelic)
117 game.register_thing_type(Thing_PsychedelicSpawner)
118 game.register_thing_type(Thing_Crate)
119 game.register_thing_type(Thing_CrateSpawner)
120 game.register_thing_type(Thing_Stimulant)
121 game.register_thing_type(Thing_StimulantSpawner)
122 game.register_thing_type(Thing_Sign)
123 game.register_thing_type(Thing_SignSpawner)
124 game.register_thing_type(Thing_Chair)
125 game.register_thing_type(Thing_ChairSpawner)
128 for port in config['servers']:
129 game.io.start_server(port, config['servers'][port],
130 config['certfile'], config['keyfile'])