This commit is contained in:
Yair Morgenstern
2023-10-07 22:33:00 +03:00
parent e7aef72e93
commit b2a29f1be2
6 changed files with 13 additions and 29 deletions

View File

@ -119,15 +119,15 @@ class RiverGenerator(
if (bottomRightOrLeft == BottomRightOrLeft.BottomLeft) {
yield(RiverCoordinate(tileMap, position, BottomRightOrLeft.BottomRight)) // same tile, other side
if (myTopLeft != null)
yield(RiverCoordinate(tileMap, myTopLeft!!.position, BottomRightOrLeft.BottomRight)) // tile to MY top-left, take its bottom right corner
yield(RiverCoordinate(tileMap, myTopLeft.position, BottomRightOrLeft.BottomRight)) // tile to MY top-left, take its bottom right corner
if (myBottomLeft != null)
yield(RiverCoordinate(tileMap, myBottomLeft!!.position, BottomRightOrLeft.BottomRight)) // Tile to MY bottom-left, take its bottom right
yield(RiverCoordinate(tileMap, myBottomLeft.position, BottomRightOrLeft.BottomRight)) // Tile to MY bottom-left, take its bottom right
} else {
yield(RiverCoordinate(tileMap, position, BottomRightOrLeft.BottomLeft)) // same tile, other side
if (myTopRight != null)
yield(RiverCoordinate(tileMap, myTopRight!!.position, BottomRightOrLeft.BottomLeft)) // tile to MY top-right, take its bottom left
yield(RiverCoordinate(tileMap, myTopRight.position, BottomRightOrLeft.BottomLeft)) // tile to MY top-right, take its bottom left
if (myBottomRight != null)
yield(RiverCoordinate(tileMap, myBottomRight!!.position, BottomRightOrLeft.BottomLeft)) // tile to MY bottom-right, take its bottom left
yield(RiverCoordinate(tileMap, myBottomRight.position, BottomRightOrLeft.BottomLeft)) // tile to MY bottom-right, take its bottom left
}
}

View File

@ -113,10 +113,9 @@ class MapUnit : IsPartOfGameInfoSerialization {
var isTransported: Boolean = false
var turnsFortified = 0
// Old, to be deprecated
@Deprecated("As of 4.5.3")
@Deprecated("As of 4.8.9")
var abilityUsesLeft: HashMap<String, Int> = hashMapOf()
@Deprecated("As of 4.5.3")
@Deprecated("As of 4.8.9")
var maxAbilityUses: HashMap<String, Int> = hashMapOf()
// New - track only *how many have been used*, derive max from uniques, left = max - used