Edit by Meridian: final solution here:
https://openxcom.org/forum/index.php/topic,8017.msg125175.html#msg125175Hello guys, im really interested what are you think about my tiny new feature for Open Xcom Extended in form of cantBeBuiltWith property for xcom base facilities.
Here is a sample ruleset code:
facilities:
- type: STR_LARGE_RADAR_SYSTEM
spriteShape: 1
spriteFacility: 22
buildCost: 800000
buildTime: 25
monthlyCost: 15000
radarRange: 2577
radarChance: 20
mapName: XBASE_05
cantBeBuiltWith:
- STR_SMALL_RADAR_SYSTEM
What it actually does – its allows a modder to restrict certain facility to be built if the specified facility was already been built on that base. This will be especially useful for creating upgrades for unique facilities, that already using both buildOverFacilities and maxAllowedPerBase properties.
For example, in The Xcom Files we have the xcom HQ facility and its improved version. Thus, we would like to forbid the player to build a normal version of the headquarters if there is already an improved version, but we should allow building an improvement over the normal version of the headquarters.
There are not many changes:
https://github.com/MeridianOXC/OpenXcom/compare/oxce-plus...FinnikXCF:oxce-plus
I can make a pull request if it's ok. If not, please, let me know, I will correct it.
Any feedback from modders is also very welcome!