mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Removes most hard-coded z level checks
This commit is contained in:
@@ -170,8 +170,7 @@
|
||||
apcs -= src
|
||||
if(malfai && operating)
|
||||
if(ticker.mode.config_tag == "malfunction")
|
||||
// TODO: Tie into space manager
|
||||
if(src.z == ZLEVEL_STATION)
|
||||
if(is_station_level(src.z))
|
||||
ticker.mode:apcs--
|
||||
area.power_light = 0
|
||||
area.power_equip = 0
|
||||
@@ -996,8 +995,7 @@
|
||||
malfai.malfhacking = 0
|
||||
locked = 1
|
||||
if(ticker.mode.config_tag == "malfunction")
|
||||
// TODO: Tie into space manager
|
||||
if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
ticker.mode:apcs++
|
||||
if(usr:parent)
|
||||
src.malfai = usr:parent
|
||||
@@ -1029,8 +1027,7 @@
|
||||
|
||||
if(malfai)
|
||||
if(ticker.mode.config_tag == "malfunction")
|
||||
// TODO: Tie into space manager
|
||||
if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
operating ? ticker.mode:apcs++ : ticker.mode:apcs--
|
||||
|
||||
src.update()
|
||||
@@ -1045,8 +1042,7 @@
|
||||
if(!malf.can_shunt)
|
||||
to_chat(malf, "<span class='warning'>You cannot shunt.</span>")
|
||||
return
|
||||
// TODO: Tie into space manager
|
||||
if(!(src.z in config.station_levels))
|
||||
if(!is_station_level(src.z))
|
||||
return
|
||||
src.occupier = new /mob/living/silicon/ai(src,malf.laws,null,1)
|
||||
src.occupier.adjustOxyLoss(malf.getOxyLoss())
|
||||
@@ -1095,8 +1091,7 @@
|
||||
|
||||
/obj/machinery/power/apc/proc/ion_act()
|
||||
//intended to be exactly the same as an AI malf attack
|
||||
// TODO: Tie into space manager
|
||||
if(!src.malfhack && (src.z in config.station_levels))
|
||||
if(!src.malfhack && is_station_level(src.z))
|
||||
if(prob(3))
|
||||
src.locked = 1
|
||||
if(src.cell.charge > 0)
|
||||
@@ -1371,8 +1366,7 @@
|
||||
/obj/machinery/power/apc/proc/set_broken()
|
||||
if(malfai && operating)
|
||||
if(ticker.mode.config_tag == "malfunction")
|
||||
// TODO: Tie into space manager
|
||||
if((src.z in config.station_levels)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
if(is_station_level(src.z)) //if(is_type_in_list(get_area(src), the_station_areas))
|
||||
ticker.mode:apcs--
|
||||
stat |= BROKEN
|
||||
operating = 0
|
||||
|
||||
@@ -124,8 +124,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
O.main_part = null
|
||||
qdel(O)
|
||||
for(var/area/A in world)
|
||||
// TODO: Tie into space manager
|
||||
if(!(A.z in config.station_levels)) continue
|
||||
if(!is_station_level(A.z)) continue
|
||||
A.gravitychange(0,A)
|
||||
shake_everyone()
|
||||
return ..()
|
||||
@@ -302,8 +301,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
investigate_log("was brought online and is now producing gravity for this level.", "gravity")
|
||||
message_admins("The gravity generator was brought online. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
for(var/area/A in world)
|
||||
// TODO: Tie into space manager
|
||||
if(!(A.z in config.station_levels)) continue
|
||||
if(!is_station_level(A.z)) continue
|
||||
A.gravitychange(1,A)
|
||||
else
|
||||
if(gravity_in_level() == 1)
|
||||
@@ -311,8 +309,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
investigate_log("was brought offline and there is now no gravity for this level.", "gravity")
|
||||
message_admins("The gravity generator was brought offline with no backup generator. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
for(var/area/A in world)
|
||||
// TODO: Tie into space manager
|
||||
if(!(A.z in config.station_levels)) continue
|
||||
if(!is_station_level(A.z)) continue
|
||||
A.gravitychange(0,A)
|
||||
|
||||
update_icon()
|
||||
@@ -380,7 +377,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
shake_camera(M, 15, 1)
|
||||
M.playsound_local(our_turf, 'sound/effects/alert.ogg', 100, 1, 0.5)
|
||||
|
||||
// TODO: Tie into space manager
|
||||
// TODO: Make the gravity generator cooperate with the space manager
|
||||
/obj/machinery/gravity_generator/main/proc/gravity_in_level()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
@@ -389,7 +386,6 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
return length(gravity_generators["[T.z]"])
|
||||
return 0
|
||||
|
||||
// TODO: Tie into space manager
|
||||
/obj/machinery/gravity_generator/main/proc/update_list()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
|
||||
@@ -433,8 +433,7 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/smes/proc/ion_act()
|
||||
// TODO: Tie into space manager
|
||||
if(src.z in config.station_levels)
|
||||
if(is_station_level(src.z))
|
||||
if(prob(1)) //explosion
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
|
||||
|
||||
Reference in New Issue
Block a user