Bugfix - Great People can no longer construct improvements on city centers

This commit is contained in:
Yair Morgenstern 2018-07-09 22:21:38 +03:00
parent fdcce8287f
commit f0ac694ba1
2 changed files with 11 additions and 4 deletions

View file

@ -204,5 +204,9 @@ class WorldScreen : CameraStageBaseScreen() {
}
super.render(delta)
}
// override fun resume() {
// resize(Gdx.graphics.width,Gdx.graphics.height)
// }
}

View file

@ -125,7 +125,8 @@ class UnitActions {
},unit.currentMovement != 0f)
actionList += UnitAction("Construct Academy",
constructImprovementAndDestroyUnit(unit, "Academy"),unit.currentMovement != 0f)
constructImprovementAndDestroyUnit(unit, "Academy"),
unit.currentMovement != 0f && !tile.isCityCenter())
}
if (unit.name == "Great Artist") {
@ -136,7 +137,8 @@ class UnitActions {
},unit.currentMovement != 0f
)
actionList += UnitAction("Construct Landmark",
constructImprovementAndDestroyUnit(unit, "Landmark"),unit.currentMovement != 0f)
constructImprovementAndDestroyUnit(unit, "Landmark"),
unit.currentMovement != 0f && !tile.isCityCenter())
}
if (unit.name == "Great Engineer") {
@ -151,7 +153,8 @@ class UnitActions {
(tile.getCity()!!.cityConstructions.getCurrentConstruction() as Building).isWonder)
actionList += UnitAction("Construct Manufactory",
constructImprovementAndDestroyUnit(unit, "Manufactory"),unit.currentMovement != 0f)
constructImprovementAndDestroyUnit(unit, "Manufactory"),
unit.currentMovement != 0f && !tile.isCityCenter())
}
if (unit.name == "Great Merchant") {
@ -162,7 +165,7 @@ class UnitActions {
},unit.currentMovement != 0f)
actionList += UnitAction( "Construct Customs House",
constructImprovementAndDestroyUnit(unit, "Customs house"),
unit.currentMovement != 0f)
unit.currentMovement != 0f && !tile.isCityCenter())
}
actionList += UnitAction("Disband unit",