mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 12:48:56 +07:00
Update all improvement and road writes to use TileInfo setters (#8136)
This commit is contained in:
@ -75,7 +75,7 @@ class SerializationTests {
|
||||
val tile = unit.getTile()
|
||||
unit.civInfo.addCity(tile.position)
|
||||
if (tile.ruleset.tileImprovements.containsKey("City center"))
|
||||
tile.improvement = "City center"
|
||||
tile.changeImprovement("City center")
|
||||
unit.destroy()
|
||||
|
||||
// Ensure some diplomacy objects are instantiated
|
||||
|
@ -316,7 +316,7 @@ class GlobalUniquesTests {
|
||||
city.cityConstructions.addBuilding(faithBuilding.name)
|
||||
|
||||
val tile2 = game.setTileFeatures(Vector2(0f,1f), Constants.grassland)
|
||||
tile2.improvement = "Farm"
|
||||
tile2.changeImprovement("Farm")
|
||||
Assert.assertTrue(tile2.getTileStats(city, civInfo).faith == 9f)
|
||||
|
||||
city.cityConstructions.addBuilding(emptyBuilding.name)
|
||||
@ -341,7 +341,7 @@ class GlobalUniquesTests {
|
||||
city.cityConstructions.addBuilding(faithBuilding.name)
|
||||
|
||||
val tile2 = game.setTileFeatures(Vector2(0f,1f), Constants.grassland)
|
||||
tile2.improvement = "Farm"
|
||||
tile2.changeImprovement("Farm")
|
||||
Assert.assertTrue(tile2.getTileStats(city, civInfo).faith == 9f)
|
||||
|
||||
city.cityConstructions.addBuilding(emptyBuilding.name)
|
||||
@ -551,7 +551,7 @@ class GlobalUniquesTests {
|
||||
civInfo.addGold(-civInfo.gold) // reset gold just to be sure
|
||||
|
||||
val testImprovement = game.createTileImprovement("Pillaging this improvement yields [+20 Gold, +11 Food]")
|
||||
tile.improvement = testImprovement.name
|
||||
tile.changeImprovement(testImprovement.name)
|
||||
val unit = game.addUnit("Warrior", civInfo, tile)
|
||||
unit.currentMovement = 2f
|
||||
|
||||
|
Reference in New Issue
Block a user