aliens

Author Topic: [DONE] Added more options how collections can be overridden  (Read 2563 times)

Offline Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
I added new functionality to OXCE nightly:

For many list like `requires` or `requiresBuy` you can use new syntax like:

Base mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy:
      - STR_X
      - STR_Y
  - type: STR_PSI_AMP
    requires:
      - STR_X
      - STR_Y

Another mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy: !add
      - STR_Z
  - type: STR_PSI_AMP
    requires: !remove
      - STR_Y
Now `STR_PISTOL` need have additionally need `STR_Z` AND `STR_X`, `STR_Y` to buy
But `STR_PSI_AMP` need only `STR_X` from research.

With this you can easier add or remove some positions from list without know full lists.
This reduce many cases where mods extension could easy break by small change in main mod.

For now only two `!add` and `!remove`  basic operations are supported but in future it will be more complex too available (like `!replace`).

As some list have very strick order I could not add for now way to override them but in future depending on demand I could add ways to override them too.
« Last Edit: March 29, 2023, 11:21:19 am by Meridian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Added more options how collections can be overridden
« Reply #1 on: June 13, 2020, 02:05:09 am »
I pushed another expansion of `!add` tags to rule files, added too special  tag `!info` to check what is supported.

Code: [Select]
sometype:
  - type: X
    property: !info
      - A

This will give in logs line like:
Code: [Select]
Options aviable for X at line 3 are: !!seq !add !remove

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8631
    • View Profile
Re: [DONE] Added more options how collections can be overridden
« Reply #2 on: March 29, 2023, 11:21:39 am »
extracted into a separate thread