mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
add 'get machines by type' to SSmachines (#28979)
This commit is contained in:
committed by
GitHub
parent
e5a1f31e6d
commit
fa1faf6054
@@ -3118,12 +3118,12 @@
|
||||
if("blackout")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Black Out")
|
||||
message_admins("[key_name_admin(usr)] broke all lights", 1)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L in SSmachines.get_by_type(/obj/machinery/light))
|
||||
L.break_light_tube()
|
||||
if("whiteout")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Fix All Lights")
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L in SSmachines.get_by_type(/obj/machinery/light))
|
||||
L.fix()
|
||||
L.switchcount = 0
|
||||
if("floorlava")
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
GLOB.configuration.lighting_effects.exposure_contrast_base = initial(GLOB.configuration.lighting_effects.exposure_contrast_base)
|
||||
GLOB.configuration.lighting_effects.exposure_contrast_power = initial(GLOB.configuration.lighting_effects.exposure_contrast_power)
|
||||
if("update_lamps")
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L in SSmachines.get_by_type(/obj/machinery/light))
|
||||
if(L.glow_overlay || L.exposure_overlay)
|
||||
L.update_bloom()
|
||||
return TRUE
|
||||
|
||||
@@ -77,7 +77,7 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
|
||||
// Find the nuclear auth code
|
||||
var/nuke_code
|
||||
var/new_nuke = FALSE
|
||||
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
|
||||
for(var/obj/machinery/nuclearbomb/N in SSmachines.get_by_type(/obj/machinery/nuclearbomb))
|
||||
if(istype(N, /obj/machinery/nuclearbomb/syndicate) || !N.core)
|
||||
continue
|
||||
var/temp_code = text2num(N.r_code)
|
||||
|
||||
@@ -511,31 +511,31 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
else
|
||||
areas_with_multiple_air_alarms |= A.type
|
||||
|
||||
for(var/obj/machinery/requests_console/RC in GLOB.machines)
|
||||
for(var/obj/machinery/requests_console/RC in SSmachines.get_by_type(/obj/machinery/requests_console))
|
||||
var/area/A = get_area(RC)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_RC |= A.type
|
||||
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L in SSmachines.get_by_type(/obj/machinery/light))
|
||||
var/area/A = get_area(L)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_light |= A.type
|
||||
|
||||
for(var/obj/machinery/light_switch/LS in GLOB.machines)
|
||||
for(var/obj/machinery/light_switch/LS in SSmachines.get_by_type(/obj/machinery/light_switch))
|
||||
var/area/A = get_area(LS)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_LS |= A.type
|
||||
|
||||
for(var/obj/item/radio/intercom/I in GLOB.global_radios)
|
||||
for(var/obj/item/radio/intercom/I in SSmachines.get_by_type(/obj/item/radio/intercom))
|
||||
var/area/A = get_area(I)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_intercom |= A.type
|
||||
|
||||
for(var/obj/machinery/camera/C in GLOB.machines)
|
||||
for(var/obj/machinery/camera/C in SSmachines.get_by_type(/obj/machinery/camera))
|
||||
var/area/A = get_area(C)
|
||||
if(!A)
|
||||
continue
|
||||
@@ -679,11 +679,11 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!", null,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
||||
for(var/obj/machinery/power/emitter/E in SSmachines.get_by_type(/obj/machinery/power/emitter))
|
||||
if(E.anchored)
|
||||
E.active = TRUE
|
||||
|
||||
for(var/obj/machinery/field/generator/F in GLOB.machines)
|
||||
for(var/obj/machinery/field/generator/F in SSmachines.get_by_type(/obj/machinery/field/generator))
|
||||
if(!F.active)
|
||||
F.active = TRUE
|
||||
F.state = 2
|
||||
@@ -694,13 +694,13 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
F.update_icon()
|
||||
|
||||
spawn(30)
|
||||
for(var/obj/machinery/the_singularitygen/G in GLOB.machines)
|
||||
for(var/obj/machinery/the_singularitygen/G in SSmachines.get_by_type(/obj/machinery/the_singularitygen))
|
||||
if(G.anchored)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G))
|
||||
S.energy = 800
|
||||
break
|
||||
|
||||
for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines)
|
||||
for(var/obj/machinery/power/rad_collector/Rad in SSmachines.get_by_type(/obj/machinery/power/rad_collector))
|
||||
if(Rad.anchored)
|
||||
if(!Rad.loaded_tank)
|
||||
var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad)
|
||||
@@ -712,7 +712,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
for(var/obj/machinery/power/smes/SMES in GLOB.machines)
|
||||
for(var/obj/machinery/power/smes/SMES in SSmachines.get_by_type(/obj/machinery/power/smes))
|
||||
if(SMES.anchored)
|
||||
SMES.input_attempt = 1
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
else if(ispath(T, /obj/machinery))
|
||||
for(var/obj/machinery/thing in GLOB.machines)
|
||||
for(var/obj/machinery/thing in SSmachines.get_by_type(/obj/machinery))
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
// Find the nuclear auth code
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
|
||||
for(var/obj/machinery/nuclearbomb/N in SSmachines.get_by_type(/obj/machinery/nuclearbomb))
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
|
||||
Reference in New Issue
Block a user