mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Resolved #1250 - Resources requiring a specific tech to build the improvement, are no longer provided before researching that tech (by cities etc)
This commit is contained in:
parent
6a46af4f88
commit
827af89498
@ -125,7 +125,14 @@ class CityInfo {
|
||||
|
||||
for (tileInfo in getTiles().filter { it.resource != null }) {
|
||||
val resource = tileInfo.getTileResource()
|
||||
if(resource.revealedBy!=null && !civInfo.tech.isResearched(resource.revealedBy!!)) continue
|
||||
if (resource.revealedBy!=null && !civInfo.tech.isResearched(resource.revealedBy!!)) continue
|
||||
|
||||
// Even if the improvement exists (we conquered an enemy city or somesuch) or we have a city on it, we won't get the resource until the correct tech is researched
|
||||
if (resource.improvement!=null){
|
||||
val improvement = GameBasics.TileImprovements[resource.improvement!!]!!
|
||||
if(improvement.techRequired!=null && !civInfo.tech.isResearched(improvement.techRequired!!)) continue
|
||||
}
|
||||
|
||||
if (resource.improvement == tileInfo.improvement || tileInfo.isCityCenter()
|
||||
// Per https://gaming.stackexchange.com/questions/53155/do-manufactories-and-customs-houses-sacrifice-the-strategic-or-luxury-resources
|
||||
|| (resource.resourceType==ResourceType.Strategic && tileInfo.containsGreatImprovement())){
|
||||
|
Loading…
x
Reference in New Issue
Block a user