Let the Hero specify its own sight radius

This commit is contained in:
Eryn Wells 2023-02-15 08:21:49 -08:00
parent 77fc9467bc
commit e6c4717e80
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@ class Engine:
self.map.visible[:] = tcod.map.compute_fov( self.map.visible[:] = tcod.map.compute_fov(
self.map.tiles['transparent'], self.map.tiles['transparent'],
tuple(self.hero.position), tuple(self.hero.position),
radius=30) radius=self.hero.sight_radius)
# Add visible tiles to the explored grid # Add visible tiles to the explored grid
self.map.explored |= self.map.visible self.map.explored |= self.map.visible

View file

@ -155,7 +155,7 @@ class Hero(Actor):
@property @property
def sight_radius(self) -> int: def sight_radius(self) -> int:
# TODO: Make this configurable # TODO: Make this configurable
return 8 return 0
def __str__(self) -> str: def __str__(self) -> str:
assert self.fighter assert self.fighter