mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 05:14:32 -04:00
Fixed super wierd bug where the conquering player hadn't met the civ he was conquering the city from (whaaaaat)
This commit is contained in:
parent
ca86d9d360
commit
82d8670b16
@ -354,6 +354,12 @@ class CityInfo {
|
|||||||
val currentPopulation = population.population
|
val currentPopulation = population.population
|
||||||
val percentageOfCivPopulationInThatCity = currentPopulation * 100f / civInfo.cities.sumBy { it.population.population }
|
val percentageOfCivPopulationInThatCity = currentPopulation * 100f / civInfo.cities.sumBy { it.population.population }
|
||||||
val aggroGenerated = 10f + percentageOfCivPopulationInThatCity.roundToInt()
|
val aggroGenerated = 10f + percentageOfCivPopulationInThatCity.roundToInt()
|
||||||
|
|
||||||
|
// How can you conquer a city but not know the civ you conquered it from?!
|
||||||
|
// I don't know either, but some of our players have managed this, and crashed their game!
|
||||||
|
if(!conqueringCiv.knows(oldCiv))
|
||||||
|
conqueringCiv.meetCivilization(oldCiv)
|
||||||
|
|
||||||
oldCiv.getDiplomacyManager(conqueringCiv)
|
oldCiv.getDiplomacyManager(conqueringCiv)
|
||||||
.addModifier(DiplomaticModifiers.CapturedOurCities, -aggroGenerated)
|
.addModifier(DiplomaticModifiers.CapturedOurCities, -aggroGenerated)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user