Fix for broken saves in #5573 (#5587)

* no new camps in 4 tiles for 15 turns after cleared

* can't spawn land units on water or vice versa, unit choice

* UniqueType.MustSetUp

* sometroglodyte's fixes
This commit is contained in:
SimonCeder 2021-10-28 21:31:20 +02:00 committed by GitHub
parent 4c053ddc99
commit 03cebbdd42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,8 @@ class BarbarianManager {
} }
} }
class Encampment (val position: Vector2) { class Encampment() {
val position = Vector2()
var countdown = 0 var countdown = 0
var spawnedUnits = -1 var spawnedUnits = -1
var destroyed = false // destroyed encampments haunt the vicinity for 15 turns preventing new spawns var destroyed = false // destroyed encampments haunt the vicinity for 15 turns preventing new spawns
@ -175,6 +176,11 @@ class Encampment (val position: Vector2) {
@Transient @Transient
lateinit var gameInfo: GameInfo lateinit var gameInfo: GameInfo
constructor(position: Vector2): this() {
this.position.x = position.x
this.position.y = position.y
}
fun clone(): Encampment { fun clone(): Encampment {
val toReturn = Encampment(position) val toReturn = Encampment(position)
toReturn.countdown = countdown toReturn.countdown = countdown