self._surrounding_map = self.world.game.\
map_type(size=(self._radius*2+1+int(add_line),
self._radius*2+1))
self._surrounding_map = self.world.game.\
map_type(size=(self._radius*2+1+int(add_line),
self._radius*2+1))
offset = self.get_surroundings_offset()
for pos in self._surrounding_map:
big_y, small_y = pan_and_scan(size[0], pos[0], offset[0])
offset = self.get_surroundings_offset()
for pos in self._surrounding_map:
big_y, small_y = pan_and_scan(size[0], pos[0], offset[0])
fov_size = self.get_surrounding_map().size
for thing in self.world.things:
big_pos = thing.position[0]
small_pos = thing.position[1]
pos_y = calc_pos_in_fov(big_pos[0], small_pos[0], offset[0], size[0])
pos_x = calc_pos_in_fov(big_pos[1], small_pos[1], offset[1], size[1])
fov_size = self.get_surrounding_map().size
for thing in self.world.things:
big_pos = thing.position[0]
small_pos = thing.position[1]
pos_y = calc_pos_in_fov(big_pos[0], small_pos[0], offset[0], size[0])
pos_x = calc_pos_in_fov(big_pos[1], small_pos[1], offset[1], size[1])
continue
if (not thing.in_inventory) and stencil[(pos_y, pos_x)] == '.':
visible_things += [thing]
continue
if (not thing.in_inventory) and stencil[(pos_y, pos_x)] == '.':
visible_things += [thing]