self.mode_admin.available_modes = ["control_pw_type",
"control_tile_type", "chat",
"study", "play", "edit"]
- self.mode_control_tile_draw.available_modes = ["admin"]
+ self.mode_control_tile_draw.available_modes = ["admin_enter"]
self.mode_edit.available_modes = ["write", "annotate", "portal",
"password", "chat", "study", "play",
"admin_enter"]
self.do_refresh = True
self.queue = queue.Queue()
self.login_name = None
- self.map_mode = 'terrain'
+ self.map_mode = 'all'
self.password = 'foo'
self.switch_mode('waiting_for_server')
self.keys = {
(self.explorer, quote(self.tile_control_char)))
def switch_mode(self, mode_name):
- self.map_mode = 'terrain'
+ self.map_mode = 'all'
if mode_name == 'admin_enter' and self.is_admin:
mode_name = 'admin'
self.mode = getattr(self, 'mode_' + mode_name)
if not self.game.turn_complete:
return
map_lines_split = []
- map_content = self.game.map_content
- if self.map_mode == 'control':
- map_content = self.game.map_control_content
for y in range(self.game.map_geometry.size.y):
start = self.game.map_geometry.size.x * y
end = start + self.game.map_geometry.size.x
- map_lines_split += [[c + ' ' for c in map_content[start:end]]]
+ if self.mode.name in {'edit', 'write', 'control_tile_draw',
+ 'control_tile_type'}:
+ line = []
+ for i in range(start, end):
+ line += [self.game.map_content[i]
+ + self.game.map_control_content[i]]
+ map_lines_split += [line]
+ else:
+ map_lines_split += [[c + ' ' for c
+ in self.game.map_content[start:end]]]
if self.map_mode == 'annotations':
for p in self.game.info_hints:
map_lines_split[p.y][p.x] = 'A '
- elif self.map_mode == 'terrain':
+ elif self.map_mode == 'all':
for p in self.game.portals.keys():
- map_lines_split[p.y][p.x] = 'P '
+ original = map_lines_split[p.y][p.x]
+ map_lines_split[p.y][p.x] = original[0] + 'P'
used_positions = []
for t in self.game.things:
symbol = self.game.thing_types[t.type_]
elif self.mode.name == 'study':
content += 'Available actions:\n'
content += '[%s] – move question mark\n' % ','.join(self.movement_keys)
- content += '[%s] – toggle view between terrain, annotations, and password protection areas\n' % self.keys['toggle_map_mode']
+ content += '[%s] – toggle view between anything, terrain, and annotations\n' % self.keys['toggle_map_mode']
content += '\n'
elif self.mode.name == 'edit':
content += "Available actions:\n"
if self.map_mode == 'terrain':
self.map_mode = 'annotations'
elif self.map_mode == 'annotations':
- self.map_mode = 'control'
+ self.map_mode = 'all'
else:
self.map_mode = 'terrain'
elif key in self.movement_keys: