Made water oil wells require the Refrigeration tech (#4889)

* Made water oil wells require the Refrigeration tech

Oil wells can now only be created on water with the refrigeration
technology.

This is not the ideal solution: it would be preferable to support
multiple improvements for a single resource, to add offshore platforms
as a separate improvement for coastal oil that requires refrigeration
and to disable building oil wells on coast. Allowing multiple
improvements for a resource would however be a much more significant
refactor.

* Added back "terrainsCanBeBuiltOn": ["Coast"]
This commit is contained in:
Arthur van der Staaij
2021-08-18 11:19:08 +02:00
committed by GitHub
parent b60c2c71dd
commit 4114296cbe
2 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,7 @@
"terrainsCanBeBuiltOn": ["Coast"],
"turnsToBuild": 9,
"techRequired": "Biology",
"uniques": ["Cannot be built on [Coast] tiles until [Refrigeration] is discovered"],
"shortcutKey": "W"
},
{

View File

@ -387,6 +387,10 @@ open class TileInfo {
improvement.uniqueObjects.any {
it.placeholderText == "Obsolete with []" && civInfo.tech.isResearched(it.params[0])
} -> return false
improvement.uniqueObjects.any {
it.placeholderText == "Cannot be built on [] tiles until [] is discovered" &&
matchesTerrainFilter(it.params[0]) && !civInfo.tech.isResearched(it.params[1])
} -> false
else -> canImprovementBeBuiltHere(improvement, hasViewableResource(civInfo))
}
}