Replace explicit z-level checks with defines
This commit is contained in:
committed by
CitadelStationBot
parent
48e0c47410
commit
0418ee4df6
@@ -0,0 +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_station_level(z) ((z) in GLOB.station_z_levels)
|
||||
|
||||
#define is_mining_level(z) ((z) == ZLEVEL_MINING)
|
||||
|
||||
#define is_reebe(z) ((z) == ZLEVEL_CITYOFCOGS)
|
||||
|
||||
#define is_transit_level(z) ((z) == ZLEVEL_TRANSIT)
|
||||
|
||||
#define is_away_level(z) ((z) > ZLEVEL_SPACEMAX)
|
||||
|
||||
// If true, the singularity cannot strip away asteroid turf on this Z
|
||||
#define is_planet_level(z) (GLOB.z_is_planet["z"])
|
||||
@@ -182,7 +182,7 @@
|
||||
num_human_escapees++
|
||||
if(shuttle_areas[get_area(Player)])
|
||||
num_shuttle_escapees++
|
||||
|
||||
|
||||
.[POPCOUNT_SURVIVORS] = num_survivors
|
||||
.[POPCOUNT_ESCAPEES] = num_escapees
|
||||
.[POPCOUNT_SHUTTLE_ESCAPEES] = num_shuttle_escapees
|
||||
@@ -194,7 +194,7 @@
|
||||
var/list/parts = list()
|
||||
var/station_evacuated = EMERGENCY_ESCAPED_OR_ENDGAMED
|
||||
var/popcount = count_survivors()
|
||||
|
||||
|
||||
//Round statistics report
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
@@ -393,7 +393,7 @@
|
||||
text += " <span class='greentext'>survived</span>"
|
||||
if(fleecheck)
|
||||
var/turf/T = get_turf(ply.current)
|
||||
if(!T || !(T.z in GLOB.station_z_levels))
|
||||
if(!T || !is_station_level(T.z))
|
||||
text += " while <span class='redtext'>fleeing the station</span>"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
|
||||
@@ -1434,11 +1434,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
temp = ((temp + (temp>>3))&29127) % 63 //070707
|
||||
return temp
|
||||
|
||||
//checks if a turf is in the planet z list.
|
||||
/proc/turf_z_is_planet(turf/T)
|
||||
return GLOB.z_is_planet["[T.z]"]
|
||||
|
||||
|
||||
//same as do_mob except for movables and it allows both to drift and doesn't draw progressbar
|
||||
/proc/do_atom(atom/movable/user , atom/movable/target, time = 30, uninterruptible = 0,datum/callback/extra_checks = null)
|
||||
if(!user || !target)
|
||||
|
||||
Reference in New Issue
Block a user