aliens

Author Topic: [FIXED] 'buildOverFacilities' bypasses country/region 'forbidden/provideBaseFunc'  (Read 1063 times)

Offline R1dO

  • Colonel
  • ****
  • Posts: 441
    • View Profile
If a facility has 'buildOverFacilities' defined it will bypass any checks on 'forbiddenBaseFunc'/'provideBaseFunc' as assigned to a country/region when placing the facility.
Or at least .. that is what it looks like to the player.

This was verified on the 7.12 linux release from: https://openxcom.org/forum/index.php?topic=5258.0
Using the mod and save attached to this post (save is in the root of the zip).

To reproduce:
* Start OXCE with the attached mod active.
* Load the save from the attachment (or start a new game, but then you have to position your 1st and 2nd base correctly)
* Observe the following (for both bases):
  + One can place both the "Living Quarters" and "Small Radar System" even though it should be forbidden by the country (1st base) / region (2nd base).
     With place I mean: Click on basegrid is honored and we are presented with a "under construction" image.

Expected behavior:
 The game should forbid the placement at the moment the player places it.

To test if the ruleset was setup correctly one can disable the ´buildOverFacilities` parts in the ruleset.
In that case the game recognizes those facilities are not allowed to be build (albeit it does it slightly earlier when it creates the list of possible facilities).


Offline R1dO

  • Colonel
  • ****
  • Posts: 441
    • View Profile
Thank you for recognizing this bug and fixing it.