Files
Bubberstation/code/__DEFINES/maps.dm
SkyratBot f1503016c5 [MIRROR] lava and weather immunities refactor (also jump boots fix) (#7893)
* lava and weather immunities refactor (also jump boots fix) (#61003)

In remembrance of all those people who used jump boots to cross lava unaware of an issue c*ders wouldn't fix....

EDIT: This is now a lava and weather immunities refactor:
Weather immunities are now status traits since they have a multitude of sources (especially for lava) which might conflict with one another otherwise.
The lava burn_stuff proc has also been been refactored in different procs, mostly because of that snowdin subtype with inconsistent, old checks.
Weather datums should now use can_weather_act instead of weather_act to check if something can be affected by weather or not, as they should.
All movables can protect contained mobs if they have the relative weather immunity traits. This works at any contents depth.
No more snowflake weather_protection variable for closets.
Removed the weather_immunities list from living mobs (simple animals still have it but it's only for traits assignment on init because way too many child types lack the immunities of their parents).
Removed some unused defines.
Renamed some variables as per guidelines.
It has been tested.
And yea, jump boots fixed because that's the original scope of this PR.

(Initially just made throwing make you fire immune, that was blocked because it breaks perma stuff, instead it ended up be a refactor to make jumpboots usable with weather immumnity stuff

* lava and weather immunities refactor (also jump boots fix)

* Update Ashwalkers.dm

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-01 16:58:10 +01:00

127 lines
4.6 KiB
Plaintext

/*
The /tg/ codebase allows mixing of hardcoded and dynamically-loaded z-levels.
Z-levels can be reordered as desired and their properties are set by "traits".
See map_config.dm for how a particular station's traits may be chosen.
The list DEFAULT_MAP_TRAITS at the bottom of this file should correspond to
the maps that are hardcoded, as set in _maps/_basemap.dm. SSmapping is
responsible for loading every non-hardcoded z-level.
As of 2018-02-04, the typical z-levels for a single-level station are:
1: CentCom
2: Station
3-4: Randomized space
5: Mining
6: City of Cogs
7-11: Randomized space
12: Empty space
13: Transit space
Multi-Z stations are supported and multi-Z mining and away missions would
require only minor tweaks.
*/
// helpers for modifying jobs, used in various job_changes.dm files
#define MAP_CURRENT_VERSION 1
#define SPACERUIN_MAP_EDGE_PAD 15
// traits
// boolean - marks a level as having that property if present
#define ZTRAIT_CENTCOM "CentCom"
#define ZTRAIT_STATION "Station"
#define ZTRAIT_MINING "Mining"
#define ZTRAIT_RESERVED "Transit/Reserved"
#define ZTRAIT_AWAY "Away Mission"
#define ZTRAIT_SPACE_RUINS "Space Ruins"
#define ZTRAIT_LAVA_RUINS "Lava Ruins"
#define ZTRAIT_ICE_RUINS "Ice Ruins"
#define ZTRAIT_ICE_RUINS_UNDERGROUND "Ice Ruins Underground"
#define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement.
#define ZTRAIT_ROCKPLANET_RUINS "Rockplanet Ruins" //SKYRAT EDIT - Adds Ruins to Rockplanet mining map
// boolean - weather types that occur on the level
#define ZTRAIT_SNOWSTORM "Weather_Snowstorm"
#define ZTRAIT_ASHSTORM "Weather_Ashstorm"
#define ZTRAIT_VOIDSTORM "Weather_Voidstorm"
// number - bombcap is multiplied by this before being applied to bombs
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
// number - default gravity if there's no gravity generators or area overrides present
#define ZTRAIT_GRAVITY "Gravity"
// numeric offsets - e.g. {"Down": -1} means that chasms will fall to z - 1 rather than oblivion
#define ZTRAIT_UP "Up"
#define ZTRAIT_DOWN "Down"
// enum - how space transitions should affect this level
#define ZTRAIT_LINKAGE "Linkage"
// UNAFFECTED if absent - no space transitions
#define UNAFFECTED null
// SELFLOOPING - space transitions always self-loop
#define SELFLOOPING "Self"
// CROSSLINKED - mixed in with the cross-linked space pool
#define CROSSLINKED "Cross"
// string - type path of the z-level's baseturf (defaults to space)
#define ZTRAIT_BASETURF "Baseturf"
// default trait definitions, used by SSmapping
#define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE)
#define ZTRAITS_STATION list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_STATION = TRUE)
#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
#define ZTRAITS_LAVALAND list(\
ZTRAIT_MINING = TRUE, \
ZTRAIT_ASHSTORM = TRUE, \
ZTRAIT_LAVA_RUINS = TRUE, \
ZTRAIT_BOMBCAP_MULTIPLIER = 2, \
ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface)
#define DL_NAME "name"
#define DL_TRAITS "traits"
#define DECLARE_LEVEL(NAME, TRAITS) list(DL_NAME = NAME, DL_TRAITS = TRAITS)
// must correspond to _basemap.dm for things to work correctly
#define DEFAULT_MAP_TRAITS list(\
DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\
/* SKYRAT EDIT ADDITION BEGIN - MODULAR_MAPS */\
DECLARE_LEVEL("Offstation_skyrat", ZTRAITS_CENTCOM),\
/* SKYRAT EDIT ADDITION END - MODULAR_MAPS */\
)
// Camera lock flags
#define CAMERA_LOCK_STATION 1
#define CAMERA_LOCK_MINING 2
#define CAMERA_LOCK_CENTCOM 4
//Reserved/Transit turf type
#define RESERVED_TURF_TYPE /turf/open/space/basic //What the turf is when not being used
//Ruin Generation
#define PLACEMENT_TRIES 100 //How many times we try to fit the ruin somewhere until giving up (really should just swap to some packing algo)
#define PLACE_DEFAULT "random"
#define PLACE_SAME_Z "same" //On same z level as original ruin
#define PLACE_SPACE_RUIN "space" //On space ruin z level(s)
#define PLACE_LAVA_RUIN "lavaland" //On lavaland ruin z levels(s)
#define PLACE_BELOW "below" //On z levl below - centered on same tile
#define PLACE_ISOLATED "isolated" //On isolated ruin z level
///Map generation defines
#define PERLIN_LAYER_HEIGHT "perlin_height"
#define PERLIN_LAYER_HUMIDITY "perlin_humidity"
#define PERLIN_LAYER_HEAT "perlin_heat"
#define BIOME_LOW_HEAT "low_heat"
#define BIOME_LOWMEDIUM_HEAT "lowmedium_heat"
#define BIOME_HIGHMEDIUM_HEAT "highmedium_heat"
#define BIOME_HIGH_HEAT "high_heat"
#define BIOME_LOW_HUMIDITY "low_humidity"
#define BIOME_LOWMEDIUM_HUMIDITY "lowmedium_humidity"
#define BIOME_HIGHMEDIUM_HUMIDITY "highmedium_humidity"
#define BIOME_HIGH_HUMIDITY "high_humidity"