Making the fusetimers on items exploding at [0, 0] like the spawning items (before the battle starts on theory).
Done.Commit:
https://github.com/MeridianOXC/OpenXcom/commit/af6052f1f186d8120c5d21d5499022293efc0547[0, 0] is already reserved for "explode after first player turn"
[-2, -2] can be used for "explode before battle"
Sequence of events:
1. first, power sources explode -- they can destroy items used in phase 2 and 3
2. then, non-spawning grenades with fuseTimers [-2, -2] explode -- they can destroy items used in phase 3; they cannot (accidentally) destroy themselves (phase 2)
3. lastly, spawning grenades with fuseTimers [0, 0] explode/trigger
Currently "before battle" means only before mission stage 1.
(If multiple mission stages support is needed, write here, and give a reasonable example.)
Ruleset sample:
ufos:
- type: STR_MEDIUM_SCOUT
battlescapeTerrainData:
name: UFO_110
mapBlocks:
- name: UFO_110
items:
STR_GRENADE:
- [5, 0, 0]
- [5, 2, 0]
- [6, 6, 0]
fuseTimers:
STR_GRENADE: [-2, -2] # -2 = mapblock grenade to explode before battle
width: 10
length: 10
mapDataSets:
- BLANKS
- U_EXT02
- U_WALL02
- U_BITS
Not tested much.
Help with testing appreciated.
Test build:
https://lxnt.wtf/oxem/builds//Extended/Extended-7.11.2-af6052f1f-2024-01-21-win64.7z