spawnpoint.temporary = True
spawnpoint.created_at = datetime.datetime.fromtimestamp(timestamp)
cmd_THING_SPAWNPOINT_CREATED.argtypes = 'int:pos int:nonneg'
+
+def cmd_INTRO_MSG(game, msg):
+ game.intro_messages += [msg]
+cmd_INTRO_MSG.argtypes = 'string'
self.annotations = {}
self.spawn_points = []
self.portals = {}
+ self.intro_messages = []
self.player_chars = string.digits + string.ascii_letters
self.players_hat_chars = {}
self.player_char_i = -1
print('DEBUG LOGIN', t.name, len(self.sessions))
self.io.send('PLAYER_ID %s' % t.id_, connection_id)
self.io.send('LOGIN_OK', connection_id)
+ for msg in self.intro_messages:
+ self.io.send('CHAT ' + quote(msg))
self.io.send('CHAT ' + quote(t.name + ' entered the map.'))
for s in [s for s in self.things
if s.type_ == 'SpawnPoint' and s.name == t.name]:
next_thing_id += 1
for s in self.spawn_points:
write(f, 'SPAWN_POINT %s %s' % (s[0], s[1]))
+ for msg in self.intro_messages:
+ write(f, 'INTRO_MSG %s' % quote(msg))
this.send(['GET_GAMESTATE']);
tui.switch_mode('post_login_wait');
tui.log_msg('@ welcome!')
- tui.log_msg('@ hint: see top of terminal for how to get help.')
- tui.log_msg('@ hint: enter study mode to understand your environment.')
} else if (tokens[0] === 'DEFAULT_COLORS') {
terminal.set_default_colors();
} else if (tokens[0] === 'RANDOM_COLORS') {
cmd_GOD_THING_NAME, cmd_THING_DOOR_CLOSED,
cmd_GOD_THING_PROTECTION, cmd_THING_PROTECTION,
cmd_SET_MAP_CONTROL_PASSWORD, cmd_SPAWN_POINT,
- cmd_THING_MUSICPLAYER_SETTINGS,
+ cmd_THING_MUSICPLAYER_SETTINGS, cmd_INTRO_MSG,
cmd_THING_MUSICPLAYER_PLAYLIST_ITEM, cmd_TERRAIN,
cmd_THING_BOTTLE_EMPTY, cmd_PLAYER_FACE,
cmd_GOD_PLAYER_FACE, cmd_GOD_PLAYER_HAT,
game.register_command(cmd_GOD_THING_DESIGN_SIZE)
game.register_command(cmd_MAP_CONTROL_PRESETS)
game.register_command(cmd_THING_SPAWNPOINT_CREATED)
+game.register_command(cmd_INTRO_MSG)
game.register_task(Task_WAIT)
game.register_task(Task_MOVE)
game.register_task(Task_WRITE)
game.tui.switch_mode('post_login_wait')
game.tui.send('GET_GAMESTATE')
game.tui.log_msg('@ welcome!')
- game.tui.log_msg('@ hint: see top of terminal for how to get help.')
- game.tui.log_msg('@ hint: enter study mode to understand your environment.')
cmd_LOGIN_OK.argtypes = ''
def cmd_ADMIN_OK(game):