from plomrogue.parser import ArgError, Parser
from plomrogue.commands import cmd_PLAYER_ID, cmd_THING_HEALTH
from plomrogue.game import Game, WorldBase
from plomrogue.parser import ArgError, Parser
from plomrogue.commands import cmd_PLAYER_ID, cmd_THING_HEALTH
from plomrogue.game import Game, WorldBase
def y_cut(self, map_lines, center_y, view_height):
map_height = len(map_lines)
def y_cut(self, map_lines, center_y, view_height):
map_height = len(map_lines)
- self.x_cut(map_lines, center.x * 2, size.x, map_width)
+ self.x_cut(map_lines, center[1].x * 2, size.x, map_width)
def cmd_THING_POS(game, i, yx):
t = game.world.get_thing(i)
def cmd_THING_POS(game, i, yx):
t = game.world.get_thing(i)
self.thing_type = ThingBase
self.commands = {'LAST_PLAYER_TASK_RESULT': cmd_LAST_PLAYER_TASK_RESULT,
'TURN_FINISHED': cmd_TURN_FINISHED,
self.thing_type = ThingBase
self.commands = {'LAST_PLAYER_TASK_RESULT': cmd_LAST_PLAYER_TASK_RESULT,
'TURN_FINISHED': cmd_TURN_FINISHED,
self.tui.to_update['log'] = True
def symbol_for_type(self, type_):
self.tui.to_update['log'] = True
def symbol_for_type(self, type_):
terrain = self.tui.game.world.map_.terrain[pos_i]
lines = [terrain]
for t in self.tui.game.world.things_at_pos(self.tui.examiner_position):
terrain = self.tui.game.world.map_.terrain[pos_i]
lines = [terrain]
for t in self.tui.game.world.things_at_pos(self.tui.examiner_position):
symbol = self.tui.game.symbol_for_type(t.type_)
if terrain_as_list[pos_i][0] in {'f', '@', 'm'}:
old_symbol = terrain_as_list[pos_i][0]
symbol = self.tui.game.symbol_for_type(t.type_)
if terrain_as_list[pos_i][0] in {'f', '@', 'm'}:
old_symbol = terrain_as_list[pos_i][0]
terrain_as_list[pos_i] = symbol
if self.tui.examiner_mode:
pos_i = self.tui.game.world.map_.\
terrain_as_list[pos_i] = symbol
if self.tui.examiner_mode:
pos_i = self.tui.game.world.map_.\
- new_examine_pos = self.game.world.map_.move(start_pos, direction)
- if new_examine_pos:
+ new_examine_pos = self.game.map_geometry.move(start_pos, direction,
+ self.game.world.map_.size)
+ if new_examine_pos[0] == (0,0):