mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Removes most hard-coded z level checks
This commit is contained in:
Vendored
+1
-2
@@ -15,8 +15,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
|
||||
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
|
||||
else
|
||||
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : air_alarms))
|
||||
// TODO: Tie into space manager
|
||||
if(!monitored_alarms && alarm.z != ZLEVEL_STATION && alarm.z != ZLEVEL_ASTEROID)
|
||||
if(!monitored_alarms && is_station_contact(alarm.z))
|
||||
continue
|
||||
alarms[++alarms.len] = alarm.get_nano_data_console()
|
||||
|
||||
|
||||
@@ -406,8 +406,7 @@ var/list/advance_cures = list(
|
||||
AD.Refresh()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
// TODO: Tie into space manager
|
||||
if(H.z != ZLEVEL_STATION)
|
||||
if(is_station_level(H.z))
|
||||
continue
|
||||
if(!H.HasDisease(D))
|
||||
H.ForceContractDisease(D)
|
||||
|
||||
@@ -67,10 +67,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
caster.reset_view(0)
|
||||
return 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
return 0
|
||||
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
|
||||
if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
|
||||
return 0
|
||||
|
||||
if(!skipcharge)
|
||||
@@ -364,10 +361,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
|
||||
return 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
return 0
|
||||
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
|
||||
if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
|
||||
return 0
|
||||
|
||||
switch(charge_type)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
var/area_type = /area/space //Types of area to affect
|
||||
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
|
||||
var/target_z = ZLEVEL_STATION //The z-level to affect
|
||||
var/target_level = MAIN_STATION //The z-level to affect
|
||||
|
||||
var/overlay_layer = 10 //Since it's above everything else, this is the layer used by default. 2 is below mobs and walls if you need to use that.
|
||||
var/aesthetic = FALSE //If the weather has no purpose other than looks
|
||||
@@ -52,13 +52,13 @@
|
||||
stage = STARTUP_STAGE
|
||||
for(var/V in get_areas(area_type))
|
||||
var/area/A = V
|
||||
if(A.z == target_z)
|
||||
if(is_on_level_name(A,target_level))
|
||||
impacted_areas |= A
|
||||
weather_duration = rand(weather_duration_lower, weather_duration_upper)
|
||||
update_areas()
|
||||
for(var/V in player_list)
|
||||
var/mob/M = V
|
||||
if(M.z == target_z)
|
||||
if(is_on_level_name(M,target_level))
|
||||
if(telegraph_message)
|
||||
to_chat(M, telegraph_message)
|
||||
if(telegraph_sound)
|
||||
@@ -72,7 +72,7 @@
|
||||
update_areas()
|
||||
for(var/V in player_list)
|
||||
var/mob/M = V
|
||||
if(M.z == target_z)
|
||||
if(is_on_level_name(M,target_level))
|
||||
if(weather_message)
|
||||
to_chat(M, weather_message)
|
||||
if(weather_sound)
|
||||
@@ -87,7 +87,7 @@
|
||||
update_areas()
|
||||
for(var/V in player_list)
|
||||
var/mob/M = V
|
||||
if(M.z == target_z)
|
||||
if(is_on_level_name(M,target_level))
|
||||
if(end_message)
|
||||
to_chat(M, end_message)
|
||||
if(end_sound)
|
||||
@@ -102,7 +102,7 @@
|
||||
update_areas()
|
||||
|
||||
/datum/weather/proc/can_impact(mob/living/L) //Can this weather impact a mob?
|
||||
if(L.z != target_z)
|
||||
if(!is_on_level_name(L,target_level))
|
||||
return
|
||||
if(immunity_type in L.weather_immunities)
|
||||
return
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//Different types of weather.
|
||||
// TODO: Tie into space manager
|
||||
|
||||
/datum/weather/floor_is_lava //The Floor is Lava: Makes all turfs damage anyone on them unless they're standing on a solid object.
|
||||
name = "the floor is lava"
|
||||
@@ -17,7 +16,7 @@
|
||||
end_duration = 0
|
||||
|
||||
area_type = /area
|
||||
target_z = ZLEVEL_STATION
|
||||
target_level = MAIN_STATION
|
||||
|
||||
overlay_layer = 2 //Covers floors only
|
||||
immunity_type = "lava"
|
||||
@@ -51,7 +50,7 @@
|
||||
end_duration = 0
|
||||
|
||||
area_type = /area
|
||||
target_z = ZLEVEL_STATION
|
||||
target_level = MAIN_STATION
|
||||
|
||||
/datum/weather/advanced_darkness/update_areas()
|
||||
for(var/V in impacted_areas)
|
||||
@@ -88,7 +87,7 @@
|
||||
end_overlay = "light_ash"
|
||||
|
||||
area_type = /area/mine
|
||||
target_z = ZLEVEL_ASTEROID
|
||||
target_level = MINING
|
||||
|
||||
immunity_type = "ash"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user