mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fix worldSizeModifier in TechManager (#4473)
This commit is contained in:
parent
1fe8c566ee
commit
ab89768894
@ -1,6 +1,5 @@
|
|||||||
package com.unciv.logic.civilization
|
package com.unciv.logic.civilization
|
||||||
|
|
||||||
import com.unciv.logic.civilization.LocationAction
|
|
||||||
import com.unciv.logic.city.CityInfo
|
import com.unciv.logic.city.CityInfo
|
||||||
import com.unciv.logic.map.MapSize
|
import com.unciv.logic.map.MapSize
|
||||||
import com.unciv.logic.map.RoadStatus
|
import com.unciv.logic.map.RoadStatus
|
||||||
@ -86,12 +85,12 @@ class TechManager {
|
|||||||
.count { it.isMajorCiv() && !it.isDefeated() }
|
.count { it.isMajorCiv() && !it.isDefeated() }
|
||||||
// https://forums.civfanatics.com/threads/the-mechanics-of-overflow-inflation.517970/
|
// https://forums.civfanatics.com/threads/the-mechanics-of-overflow-inflation.517970/
|
||||||
techCost /= 1 + techsResearchedKnownCivs / undefeatedCivs.toFloat() * 0.3f
|
techCost /= 1 + techsResearchedKnownCivs / undefeatedCivs.toFloat() * 0.3f
|
||||||
// http://web.archive.org/web/20201204043641/http://www.civclub.net/bbs/forum.php?mod=viewthread&tid=123976
|
// http://www.civclub.net/bbs/forum.php?mod=viewthread&tid=123976
|
||||||
val worldSizeModifier = with (civInfo.gameInfo.tileMap.mapParameters.mapSize) {
|
val worldSizeModifier = with (civInfo.gameInfo.tileMap.mapParameters.mapSize) {
|
||||||
when {
|
when {
|
||||||
radius >= MapSize.Medium.radius -> floatArrayOf(1.1f, 0.05f)
|
|
||||||
radius >= MapSize.Large.radius -> floatArrayOf(1.2f, 0.03f)
|
|
||||||
radius >= MapSize.Huge.radius -> floatArrayOf(1.3f, 0.02f)
|
radius >= MapSize.Huge.radius -> floatArrayOf(1.3f, 0.02f)
|
||||||
|
radius >= MapSize.Large.radius -> floatArrayOf(1.2f, 0.03f)
|
||||||
|
radius >= MapSize.Medium.radius -> floatArrayOf(1.1f, 0.05f)
|
||||||
else -> floatArrayOf(1f, 0.05f)
|
else -> floatArrayOf(1f, 0.05f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,7 +250,7 @@ class TechManager {
|
|||||||
}
|
}
|
||||||
updateTransientBooleans()
|
updateTransientBooleans()
|
||||||
|
|
||||||
civInfo.addNotification("Research of [$techName] has completed!", TechAction(techName), NotificationIcon.Science, techName )
|
civInfo.addNotification("Research of [$techName] has completed!", TechAction(techName), NotificationIcon.Science, techName)
|
||||||
civInfo.popupAlerts.add(PopupAlert(AlertType.TechResearched, techName))
|
civInfo.popupAlerts.add(PopupAlert(AlertType.TechResearched, techName))
|
||||||
|
|
||||||
val currentEra = civInfo.getEra()
|
val currentEra = civInfo.getEra()
|
||||||
@ -354,7 +353,7 @@ class TechManager {
|
|||||||
civInfo.addNotification(
|
civInfo.addNotification(
|
||||||
text,
|
text,
|
||||||
LocationAction(positions),
|
LocationAction(positions),
|
||||||
"ResourceIcons/" + revealedName
|
"ResourceIcons/$revealedName"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user