Merge pull request #4764 from Citadel-Station-13/upstream-merge-34090
[MIRROR] Replace hardcoded z-level numbers with a trait system
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
// Helpers for checking whether a z-level conforms to a specific requirement
|
||||
|
||||
// Basic levels
|
||||
#define is_centcom_level(z) ((z) == ZLEVEL_CENTCOM)
|
||||
#define is_centcom_level(z) SSmapping.level_trait(z, ZTRAIT_CENTCOM)
|
||||
|
||||
#define is_station_level(z) ((z) in GLOB.station_z_levels)
|
||||
#define is_station_level(z) SSmapping.level_trait(z, ZTRAIT_STATION)
|
||||
|
||||
#define is_mining_level(z) ((z) == ZLEVEL_MINING)
|
||||
#define is_mining_level(z) SSmapping.level_trait(z, ZTRAIT_MINING)
|
||||
|
||||
#define is_reebe(z) ((z) == ZLEVEL_CITYOFCOGS)
|
||||
#define is_reebe(z) SSmapping.level_trait(z, ZTRAIT_REEBE)
|
||||
|
||||
#define is_transit_level(z) ((z) == ZLEVEL_TRANSIT)
|
||||
#define is_transit_level(z) SSmapping.level_trait(z, ZTRAIT_TRANSIT)
|
||||
|
||||
#define is_away_level(z) ((z) > ZLEVEL_SPACEMAX)
|
||||
#define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY)
|
||||
|
||||
// If true, the singularity cannot strip away asteroid turf on this Z
|
||||
#define is_planet_level(z) (GLOB.z_is_planet["z"])
|
||||
|
||||
Reference in New Issue
Block a user