Files
Bubberstation/code/__DEFINES/map_exporter.dm
Tim f981acda23 map_export admin verb can now save atmos for turfs and canisters (#91051)
## About The Pull Request
Due to the atmos complexity, this was split off from:
- #90998

This takes the atmos gas mixture from a turf and converts it into a
string for saving via the `map_export` verb. The behavior is as follows:
- Space and wall turfs atmos are skipped
- Rounds all gases to 0.01 decimal for their individual mole value
- Any gases less than 0.01 moles get skipped

This does not keep track of active fires since those have hotspots,
active turfs, etc., which is way more complicated to save. Another
caveat is the amount of characters the map reader needs to write is much
larger since every turf (besides space/walls) will have different atmos
due to mobs breathing, airlocks opening, etc. so I made this setting
into a `SAVE_ATMOS` flag that you can apply when saving.

This also keeps track of air inside of canisters.

## Why It's Good For The Game
Atmospherics changes to the station can now be saved properly. 

## Changelog
🆑
qol: `map_export` admin verb can now save atmos for turfs and air
canisters
/🆑
2025-05-29 16:16:08 -04:00

16 lines
680 B
Plaintext

//Bits to save
#define SAVE_OBJECTS (1 << 1) //! Save objects?
#define SAVE_MOBS (1 << 2) //! Save Mobs?
#define SAVE_TURFS (1 << 3) //! Save turfs?
#define SAVE_AREAS (1 << 4) //! Save areas?
#define SAVE_SPACE (1 << 5) //! Save space areas? (If not they will be saved as NOOP)
#define SAVE_OBJECT_PROPERTIES (1 << 6) //! Save custom properties of objects (obj.on_object_saved() output)
#define SAVE_ATMOS (1 << 7) //! Save turf atmos
//Ignore turf if it contains
#define SAVE_SHUTTLEAREA_DONTCARE 0
#define SAVE_SHUTTLEAREA_IGNORE 1
#define SAVE_SHUTTLEAREA_ONLY 2
#define DMM2TGM_MESSAGE "MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE"