Actually, you could conceptualize it as:
Define an "Environment" category for terrains which accepts any user input. Defaults are Land and Underwater but modders can add other ones
Add a "worksInEnv" list property for items, which takes a list of environments the thing works in.
Vanilla EU&TftD stuff would look like:
terrains:
- name: DESERT
[...]
environment: Land
items:
- type: STR_LASER_RIFLE
[...]
requires:
- STR_LASER_RIFLE
worksInEnv:
- Land
- type: STR_DISPLACER_PULSE_LAUNCHER
[...]
requires:
- STR_DISPLACER_PULSE
worksInEnv:
- Underwater
whereas modders could do:
- type: STR_UBER_WEAPON
[...]
requires:
- NOTHING
worksInEnv
- Land
- Underwater
- Space
- Volcano
- Arctic
Then when generating a mission, check the armors worn by soldiers. If it does not have the current environment in its "worksInEnv" property, don't spawn the soldier. For weapons, it works exactly like "requires", but checks against the current environment instead of the known techs.\
That sounds like something that could be done in OpenXCom Extended...