A visually challenged unit with UniqueType.NoSight should still see its own feet (#11505)

This commit is contained in:
SomeTroglodyte 2024-04-23 22:59:27 +02:00 committed by GitHub
parent a3d56845f9
commit e8714fb950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -653,7 +653,7 @@ class MapUnit : IsPartOfGameInfoSerialization {
val oldViewableTiles = viewableTiles
viewableTiles = when {
hasUnique(UniqueType.NoSight) -> hashSetOf()
hasUnique(UniqueType.NoSight) -> hashSetOf(getTile()) // 0 sight distance still means we can see the Tile we're in
hasUnique(UniqueType.CanSeeOverObstacles) ->
getTile().getTilesInDistance(getVisibilityRange()).toHashSet() // it's that simple
else -> getTile().getViewableTilesList(getVisibilityRange()).toHashSet()