mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types [MDB IGNORE] (#22481)
* Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types * Resolve merge conflicts * Modular adjustments * destroy this double return on destroy --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Giz <vinylspiders@gmail.com>
This commit is contained in:
@@ -419,7 +419,7 @@
|
||||
|
||||
///Disable power in the station APCs
|
||||
/proc/power_fail(duration_min, duration_max)
|
||||
for(var/obj/machinery/power/apc/current_apc as anything in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/current_apc as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/apc))
|
||||
if(!current_apc.cell || !SSmapping.level_trait(current_apc.z, ZTRAIT_STATION))
|
||||
continue
|
||||
var/area/apc_area = current_apc.area
|
||||
|
||||
@@ -1,36 +1,35 @@
|
||||
/// Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
/// List of all cables, so that powernets don't have to look through the entire world all the time
|
||||
GLOBAL_LIST_EMPTY(cable_list)
|
||||
/// list of all /obj/effect/portal
|
||||
|
||||
/// List of all portals
|
||||
GLOBAL_LIST_EMPTY(portals)
|
||||
/// list of all airlocks
|
||||
GLOBAL_LIST_EMPTY(airlocks)
|
||||
/// list of all curtains
|
||||
|
||||
/// List of all curtains for button tracking
|
||||
GLOBAL_LIST_EMPTY(curtains)
|
||||
/// list of all mechs. Used by hostile mobs target tracking.
|
||||
|
||||
/// List of all mechs for hostile mob target tracking
|
||||
GLOBAL_LIST_EMPTY(mechas_list)
|
||||
/// list of all communication consoles and AIs, for automatic shuttle calls when there are none.
|
||||
|
||||
/// List of all atoms that can call the shuttle, for automatic shuttle calls when there are none.
|
||||
GLOBAL_LIST_EMPTY(shuttle_caller_list)
|
||||
/// list of ALL machines
|
||||
GLOBAL_LIST_EMPTY(machines)
|
||||
/// list of all /obj/machinery/computer/camera_advanced/shuttle_docker
|
||||
GLOBAL_LIST_EMPTY(navigation_computers)
|
||||
/// important to keep track of for managing nukeops war declarations.
|
||||
|
||||
/// List of all nukie shuttle boards, for forcing launch delay if they declare war
|
||||
GLOBAL_LIST_EMPTY(syndicate_shuttle_boards)
|
||||
/// list of all bot nagivation beacons, used for patrolling.
|
||||
|
||||
/// List of all nav beacons indexed by stringified z level
|
||||
GLOBAL_LIST_EMPTY(navbeacons)
|
||||
/// list of all tracking beacons used by teleporters
|
||||
|
||||
/// List of all active teleport beacons
|
||||
GLOBAL_LIST_EMPTY(teleportbeacons)
|
||||
/// list of all MULEbot delivery beacons.
|
||||
|
||||
/// List of all active delivery beacons
|
||||
GLOBAL_LIST_EMPTY(deliverybeacons)
|
||||
/// list of all tags associated with delivery beacons.
|
||||
|
||||
/// List of all active delivery beacon locations
|
||||
GLOBAL_LIST_EMPTY(deliverybeacontags)
|
||||
GLOBAL_LIST_EMPTY(nuke_list)
|
||||
/// list of all machines or programs that can display station alerts
|
||||
GLOBAL_LIST_EMPTY(alarmdisplay)
|
||||
/// list of all singularities on the station
|
||||
|
||||
/// List of all singularity components that exist
|
||||
GLOBAL_LIST_EMPTY_TYPED(singularities, /datum/component/singularity)
|
||||
/// list of all /obj/machinery/mechpad
|
||||
GLOBAL_LIST_EMPTY(mechpad_list)
|
||||
|
||||
/// list of all /datum/chemical_reaction datums indexed by their typepath. Use this for general lookup stuff
|
||||
GLOBAL_LIST(chemical_reactions_list)
|
||||
@@ -64,8 +63,6 @@ GLOBAL_LIST_EMPTY(cooking_recipes_atoms)
|
||||
GLOBAL_LIST_EMPTY(rcd_list)
|
||||
/// list of wallmounted intercom radios.
|
||||
GLOBAL_LIST_EMPTY(intercoms_list)
|
||||
/// list of all Area Power Controller machines, separate from machines for powernet speeeeeeed.
|
||||
GLOBAL_LIST_EMPTY(apcs_list)
|
||||
/// list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
GLOBAL_LIST_EMPTY(tracked_implants)
|
||||
/// list of implants the prisoner console can track and send inject commands too
|
||||
@@ -83,23 +80,22 @@ GLOBAL_LIST_EMPTY(stairs)
|
||||
GLOBAL_LIST_EMPTY(janitor_devices)
|
||||
GLOBAL_LIST_EMPTY(trophy_cases)
|
||||
GLOBAL_LIST_EMPTY(experiment_handlers)
|
||||
|
||||
///This is a global list of all signs you can change an existing sign or new sign backing to, when using a pen on them.
|
||||
GLOBAL_LIST_INIT(editable_sign_types, populate_editable_sign_types())
|
||||
|
||||
GLOBAL_LIST_EMPTY(wire_color_directory)
|
||||
GLOBAL_LIST_EMPTY(wire_name_directory)
|
||||
|
||||
GLOBAL_LIST_EMPTY(ai_status_displays)
|
||||
|
||||
/// List of all instances of /obj/effect/mob_spawn/ghost_role in the game world
|
||||
GLOBAL_LIST_EMPTY(mob_spawners)
|
||||
|
||||
/// List of all mobs with the "ghost_direct_control" component
|
||||
GLOBAL_LIST_EMPTY(joinable_mobs)
|
||||
/// List of all station alert consoles, /obj/machinery/computer/station_alert
|
||||
GLOBAL_LIST_EMPTY(alert_consoles)
|
||||
|
||||
/// List of area names of roundstart station cyborg rechargers, for the low charge/no charge cyborg screen alert tooltips.
|
||||
GLOBAL_LIST_EMPTY(roundstart_station_borgcharger_areas)
|
||||
|
||||
/// List of area names of roundstart station mech rechargers, for the low charge/no charge mech screen alert tooltips.
|
||||
GLOBAL_LIST_EMPTY(roundstart_station_mechcharger_areas)
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ SUBSYSTEM_DEF(economy)
|
||||
// Assoc list of "z level" -> if it's on the station
|
||||
// Hack, is station z level is too expensive to do for each machine, I hate this place
|
||||
var/list/station_z_status = list()
|
||||
for(var/obj/machinery/vending/vending_lad in GLOB.machines)
|
||||
for(var/obj/machinery/vending/vending_lad as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/vending))
|
||||
if(istype(vending_lad, /obj/machinery/vending/custom))
|
||||
continue
|
||||
var/vending_level = vending_lad.z
|
||||
|
||||
@@ -3,6 +3,13 @@ SUBSYSTEM_DEF(machines)
|
||||
init_order = INIT_ORDER_MACHINES
|
||||
flags = SS_KEEP_TIMING
|
||||
wait = 2 SECONDS
|
||||
|
||||
/// Assosciative list of all machines that exist.
|
||||
VAR_PRIVATE/list/machines_by_type = list()
|
||||
|
||||
/// All machines, not just those that are processing.
|
||||
VAR_PRIVATE/list/all_machines = list()
|
||||
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
///List of all powernets on the server.
|
||||
@@ -13,6 +20,46 @@ SUBSYSTEM_DEF(machines)
|
||||
fire()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/// Registers a machine with the machine subsystem; should only be called by the machine itself during its creation.
|
||||
/datum/controller/subsystem/machines/proc/register_machine(obj/machinery/machine)
|
||||
LAZYADD(machines_by_type[machine.type], machine)
|
||||
all_machines |= machine
|
||||
|
||||
/// Removes a machine from the machine subsystem; should only be called by the machine itself inside Destroy.
|
||||
/datum/controller/subsystem/machines/proc/unregister_machine(obj/machinery/machine)
|
||||
var/list/existing = machines_by_type[machine.type]
|
||||
existing -= machine
|
||||
if(!length(existing))
|
||||
machines_by_type -= machine.type
|
||||
all_machines -= machine
|
||||
|
||||
/// Gets a list of all machines that are either the passed type or a subtype.
|
||||
/datum/controller/subsystem/machines/proc/get_machines_by_type_and_subtypes(obj/machinery/machine_type)
|
||||
if(!ispath(machine_type))
|
||||
machine_type = machine_type.type
|
||||
if(!ispath(machine_type, /obj/machinery))
|
||||
CRASH("called get_machines_by_type_and_subtypes with a non-machine type [machine_type]")
|
||||
var/list/machines = list()
|
||||
for(var/next_type in typesof(machine_type))
|
||||
var/list/found_machines = machines_by_type[next_type]
|
||||
if(found_machines)
|
||||
machines += found_machines
|
||||
return machines
|
||||
|
||||
|
||||
/// Gets a list of all machines that are the exact passed type.
|
||||
/datum/controller/subsystem/machines/proc/get_machines_by_type(obj/machinery/machine_type)
|
||||
if(!ispath(machine_type))
|
||||
machine_type = machine_type.type
|
||||
if(!ispath(machine_type, /obj/machinery))
|
||||
CRASH("called get_machines_by_type with a non-machine type [machine_type]")
|
||||
|
||||
var/list/machines = machines_by_type[machine_type]
|
||||
return machines?.Copy() || list()
|
||||
|
||||
/datum/controller/subsystem/machines/proc/get_all_machines()
|
||||
return all_machines.Copy()
|
||||
|
||||
/datum/controller/subsystem/machines/proc/makepowernets()
|
||||
for(var/datum/powernet/power_network as anything in powernets)
|
||||
qdel(power_network)
|
||||
@@ -25,7 +72,7 @@ SUBSYSTEM_DEF(machines)
|
||||
propagate_network(power_cable, power_cable.powernet)
|
||||
|
||||
/datum/controller/subsystem/machines/stat_entry(msg)
|
||||
msg = "M:[length(processing)]|PN:[length(powernets)]"
|
||||
msg = "M:[length(all_machines)]|MT:[length(machines_by_type)]|PM:[length(processing)]|PN:[length(powernets)]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/machines/fire(resumed = FALSE)
|
||||
@@ -56,7 +103,11 @@ SUBSYSTEM_DEF(machines)
|
||||
propagate_network(PC,PC.powernet)
|
||||
|
||||
/datum/controller/subsystem/machines/Recover()
|
||||
if (istype(SSmachines.processing))
|
||||
if(islist(SSmachines.processing))
|
||||
processing = SSmachines.processing
|
||||
if (istype(SSmachines.powernets))
|
||||
if(islist(SSmachines.powernets))
|
||||
powernets = SSmachines.powernets
|
||||
if(islist(SSmachines.all_machines))
|
||||
all_machines = SSmachines.all_machines
|
||||
if(islist(SSmachines.machines_by_type))
|
||||
machines_by_type = SSmachines.machines_by_type
|
||||
|
||||
@@ -46,7 +46,7 @@ SUBSYSTEM_DEF(nightshift)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE, resumed = FALSE, forced = FALSE)
|
||||
if(!resumed)
|
||||
currentrun = GLOB.apcs_list.Copy()
|
||||
currentrun = SSmachines.get_machines_by_type(/obj/machinery/power/apc)
|
||||
nightshift_active = active
|
||||
if(announce)
|
||||
if (active)
|
||||
|
||||
@@ -805,9 +805,9 @@ SUBSYSTEM_DEF(shuttle)
|
||||
hidden_shuttle_turf_images -= remove_images
|
||||
hidden_shuttle_turf_images += add_images
|
||||
|
||||
for(var/V in GLOB.navigation_computers)
|
||||
var/obj/machinery/computer/camera_advanced/shuttle_docker/C = V
|
||||
C.update_hidden_docking_ports(remove_images, add_images)
|
||||
for(var/obj/machinery/computer/camera_advanced/shuttle_docker/docking_computer \
|
||||
as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/camera_advanced/shuttle_docker))
|
||||
docking_computer.update_hidden_docking_ports(remove_images, add_images)
|
||||
|
||||
QDEL_LIST(remove_images)
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
var/turf/target_destination = get_turf(controller.pawn)
|
||||
for (var/i in 1 to run_distance)
|
||||
var/turf/test_destination = get_ranged_target_turf_direct(controller.pawn, target, range = i, offset = 180)
|
||||
if (test_destination.is_blocked_turf(exclude_mobs = TRUE, source_atom = controller.pawn, ignore_atoms = GLOB.airlocks))
|
||||
var/list/airlocks = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock)
|
||||
if (test_destination.is_blocked_turf(exclude_mobs = TRUE, source_atom = controller.pawn, ignore_atoms = airlocks))
|
||||
break
|
||||
target_destination = test_destination
|
||||
if (target_destination == get_turf(controller.pawn))
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
/datum/station_trait/blackout/on_round_start()
|
||||
. = ..()
|
||||
for(var/obj/machinery/power/apc/apc as anything in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/apc as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(is_station_level(apc.z) && prob(60))
|
||||
apc.overload_lighting()
|
||||
|
||||
|
||||
@@ -485,7 +485,8 @@
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute()
|
||||
// 50% chance of being incremented by one
|
||||
required_candidates += prob(50)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
var/list/vent_pumps = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent as anything in vent_pumps)
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
|
||||
@@ -632,16 +632,17 @@ GLOBAL_VAR_INIT(revolutionary_win, FALSE)
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/nuclear/clown_ops/pre_execute()
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/machinery/nuclearbomb/syndicate/syndicate_nuke = locate() in GLOB.nuke_list
|
||||
if(syndicate_nuke)
|
||||
var/turf/nuke_turf = get_turf(syndicate_nuke)
|
||||
if(nuke_turf)
|
||||
new /obj/machinery/nuclearbomb/syndicate/bananium(nuke_turf)
|
||||
qdel(syndicate_nuke)
|
||||
for(var/datum/mind/clowns in assigned)
|
||||
clowns.set_assigned_role(SSjob.GetJobType(/datum/job/clown_operative))
|
||||
clowns.special_role = ROLE_CLOWN_OPERATIVE
|
||||
if(!.)
|
||||
return
|
||||
|
||||
var/list/nukes = SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/syndicate)
|
||||
for(var/obj/machinery/nuclearbomb/syndicate/nuke as anything in nukes)
|
||||
new /obj/machinery/nuclearbomb/syndicate/bananium(nuke.loc)
|
||||
qdel(nuke)
|
||||
|
||||
for(var/datum/mind/clowns in assigned)
|
||||
clowns.set_assigned_role(SSjob.GetJobType(/datum/job/clown_operative))
|
||||
clowns.special_role = ROLE_CLOWN_OPERATIVE
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
*/
|
||||
/proc/power_failure()
|
||||
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", ANNOUNCER_POWEROFF)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(istype(get_area(S), /area/station/ai_monitored/turret_protected) || !is_station_level(S.z))
|
||||
var/list/all_smes = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/smes)
|
||||
for(var/obj/machinery/power/smes/smes as anything in all_smes)
|
||||
if(istype(get_area(smes), /area/station/ai_monitored/turret_protected) || !is_station_level(smes.z))
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output_level = 0
|
||||
S.output_attempt = FALSE
|
||||
S.update_appearance()
|
||||
S.power_change()
|
||||
smes.charge = 0
|
||||
smes.output_level = 0
|
||||
smes.output_attempt = FALSE
|
||||
smes.update_appearance()
|
||||
smes.power_change()
|
||||
|
||||
for(var/area/station_area as anything in GLOB.areas)
|
||||
if(!station_area.z || !is_station_level(station_area.z))
|
||||
@@ -30,7 +31,7 @@
|
||||
station_area.power_environ = FALSE
|
||||
station_area.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/C as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
var/area/A = C.area
|
||||
if(GLOB.typecache_powerfailure_safe_areas[A.type])
|
||||
@@ -45,18 +46,20 @@
|
||||
*/
|
||||
/proc/power_restore()
|
||||
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", ANNOUNCER_POWERON)
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/C as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
COOLDOWN_RESET(C, failure_timer)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!is_station_level(S.z))
|
||||
var/list/all_smes = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/smes)
|
||||
for(var/obj/machinery/power/smes/smes as anything in all_smes)
|
||||
if(!is_station_level(smes.z))
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output_level = S.output_level_max
|
||||
S.output_attempt = TRUE
|
||||
S.update_appearance()
|
||||
S.power_change()
|
||||
smes.charge = smes.capacity
|
||||
smes.output_level = smes.output_level_max
|
||||
smes.output_attempt = TRUE
|
||||
smes.update_appearance()
|
||||
smes.power_change()
|
||||
|
||||
for(var/area/station_area as anything in GLOB.areas)
|
||||
if(!station_area.z || !is_station_level(station_area.z))
|
||||
continue
|
||||
@@ -79,11 +82,12 @@
|
||||
*/
|
||||
/proc/power_restore_quick()
|
||||
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", ANNOUNCER_POWERON)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!is_station_level(S.z))
|
||||
var/list/all_smes = SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/smes)
|
||||
for(var/obj/machinery/power/smes/smes as anything in all_smes)
|
||||
if(!is_station_level(smes.z))
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output_level = S.output_level_max
|
||||
S.output_attempt = TRUE
|
||||
S.update_appearance()
|
||||
S.power_change()
|
||||
smes.charge = smes.capacity
|
||||
smes.output_level = smes.output_level_max
|
||||
smes.output_attempt = TRUE
|
||||
smes.update_appearance()
|
||||
smes.power_change()
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
/obj/machinery/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.machines += src
|
||||
SSmachines.register_machine(src)
|
||||
|
||||
if(ispath(circuit, /obj/item/circuitboard))
|
||||
circuit = new circuit(src)
|
||||
@@ -194,7 +194,7 @@
|
||||
setup_area_power_relationship()
|
||||
|
||||
/obj/machinery/Destroy()
|
||||
GLOB.machines.Remove(src)
|
||||
SSmachines.unregister_machine(src)
|
||||
end_processing()
|
||||
dump_inventory_contents()
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
return
|
||||
localMotionTargets |= WEAKREF(AM)
|
||||
if (!detectTime)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/TV in GLOB.machines)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/TV as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/security/telescreen/entertainment))
|
||||
TV.notify(TRUE)
|
||||
detectTime = world.time + 30 SECONDS
|
||||
|
||||
@@ -103,5 +103,5 @@
|
||||
detectTime = world.time + 30 SECONDS
|
||||
else if (world.time > detectTime)
|
||||
detectTime = 0
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/TV in GLOB.machines)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/TV as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/security/telescreen/entertainment))
|
||||
TV.notify(FALSE)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/machinery/computer/piratepad_control/civilian/LateInitialize()
|
||||
. = ..()
|
||||
if(cargo_hold_id)
|
||||
for(var/obj/machinery/piratepad/civilian/C in GLOB.machines)
|
||||
for(var/obj/machinery/piratepad/civilian/C as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/piratepad/civilian))
|
||||
if(C.cargo_hold_id == cargo_hold_id)
|
||||
pad_ref = WEAKREF(C)
|
||||
return
|
||||
|
||||
@@ -94,22 +94,21 @@
|
||||
for(var/entry in logs)
|
||||
data["logs"] += list(list("entry" = entry))
|
||||
|
||||
for(var/apc in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/apc as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(check_apc(apc))
|
||||
var/obj/machinery/power/apc/A = apc
|
||||
var/has_cell = (A.cell) ? TRUE : FALSE
|
||||
var/has_cell = (apc.cell) ? TRUE : FALSE
|
||||
data["apcs"] += list(list(
|
||||
"name" = A.area.name,
|
||||
"operating" = A.operating,
|
||||
"charge" = (has_cell) ? A.cell.percent() : "NOCELL",
|
||||
"load" = display_power(A.lastused_total),
|
||||
"charging" = A.charging,
|
||||
"chargeMode" = A.chargemode,
|
||||
"eqp" = A.equipment,
|
||||
"lgt" = A.lighting,
|
||||
"env" = A.environ,
|
||||
"responds" = A.aidisabled || A.panel_open,
|
||||
"ref" = REF(A)
|
||||
"name" = apc.area.name,
|
||||
"operating" = apc.operating,
|
||||
"charge" = (has_cell) ? apc.cell.percent() : "NOCELL",
|
||||
"load" = display_power(apc.lastused_total),
|
||||
"charging" = apc.charging,
|
||||
"chargeMode" = apc.chargemode,
|
||||
"eqp" = apc.equipment,
|
||||
"lgt" = apc.lighting,
|
||||
"env" = apc.environ,
|
||||
"responds" = apc.aidisabled || apc.panel_open,
|
||||
"ref" = REF(apc)
|
||||
)
|
||||
)
|
||||
return data
|
||||
@@ -158,7 +157,7 @@
|
||||
if("access-apc")
|
||||
var/ref = params["ref"]
|
||||
playsound(src, SFX_TERMINAL_TYPE, 50, FALSE)
|
||||
var/obj/machinery/power/apc/APC = locate(ref) in GLOB.apcs_list
|
||||
var/obj/machinery/power/apc/APC = locate(ref) in SSmachines.get_machines_by_type(/obj/machinery/power/apc)
|
||||
connect_apc(APC, usr)
|
||||
if("check-logs")
|
||||
log_activity("Checked Logs")
|
||||
@@ -168,7 +167,7 @@
|
||||
var/ref = params["ref"]
|
||||
var/type = params["type"]
|
||||
var/value = params["value"]
|
||||
var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list
|
||||
var/obj/machinery/power/apc/target = locate(ref) in SSmachines.get_machines_by_type(/obj/machinery/power/apc)
|
||||
if(!target)
|
||||
return
|
||||
|
||||
@@ -197,7 +196,7 @@
|
||||
usr.log_message("set APC [target.area.name] [type] to [setTo]]", LOG_GAME)
|
||||
if("breaker")
|
||||
var/ref = params["ref"]
|
||||
var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list
|
||||
var/obj/machinery/power/apc/target = locate(ref) in SSmachines.get_machines_by_type(/obj/machinery/power/apc)
|
||||
target.toggle_breaker(usr)
|
||||
var/setTo = target.operating ? "On" : "Off"
|
||||
log_activity("Turned APC [target.area.name]'s breaker [setTo]")
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
set_doors(closed = TRUE)
|
||||
|
||||
/obj/machinery/computer/arena/proc/get_spawn(team)
|
||||
for(var/obj/machinery/arena_spawn/A in GLOB.machines)
|
||||
for(var/obj/machinery/arena_spawn/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/arena_spawn))
|
||||
if(A.arena_id == arena_id && A.team == team)
|
||||
return A
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/arena/proc/set_doors(closed = FALSE)
|
||||
for(var/obj/machinery/door/poddoor/D in GLOB.machines) //I really dislike pathing of these
|
||||
for(var/obj/machinery/door/poddoor/D as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor))
|
||||
if(D.id != arena_id)
|
||||
continue
|
||||
if(closed)
|
||||
@@ -385,7 +385,7 @@
|
||||
/obj/machinery/arena_spawn/proc/get_controller()
|
||||
if(_controller && !QDELETED(_controller) && _controller.arena_id == arena_id)
|
||||
return _controller
|
||||
for(var/obj/machinery/computer/arena/A in GLOB.machines)
|
||||
for(var/obj/machinery/computer/arena/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/arena))
|
||||
if(A.arena_id == arena_id)
|
||||
_controller = A
|
||||
return _controller
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
connected_mechpad = null
|
||||
|
||||
/obj/machinery/computer/mechpad/LateInitialize()
|
||||
for(var/obj/machinery/mechpad/pad in GLOB.mechpad_list)
|
||||
for(var/obj/machinery/mechpad/pad as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/mechpad))
|
||||
if(pad == connected_mechpad)
|
||||
continue
|
||||
if(pad.id != id)
|
||||
|
||||
@@ -271,5 +271,5 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/entertai
|
||||
is_show_active = !is_show_active
|
||||
say("The [tv_show_name] show has [is_show_active ? "begun" : "ended"]")
|
||||
var/announcement = is_show_active ? pick(tv_starters) : pick(tv_enders)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/tv in GLOB.machines)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/tv as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/security/telescreen/entertainment))
|
||||
tv.update_shows(is_show_active, tv_network_id, announcement)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
id_tag = "[port.shuttle_id]_[id_tag]"
|
||||
|
||||
/obj/machinery/door/airlock/proc/update_other_id()
|
||||
for(var/obj/machinery/door/airlock/Airlock in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/Airlock as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock))
|
||||
if(Airlock.closeOtherId == closeOtherId && Airlock != src)
|
||||
if(!(Airlock in close_others))
|
||||
close_others += Airlock
|
||||
@@ -302,7 +302,7 @@
|
||||
otherlock.close_others -= src
|
||||
close_others.Cut()
|
||||
if(id_tag)
|
||||
for(var/obj/machinery/door_buttons/D in GLOB.machines)
|
||||
for(var/obj/machinery/door_buttons/D as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door_buttons))
|
||||
D.removeMe(src)
|
||||
QDEL_NULL(note)
|
||||
QDEL_NULL(seal)
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
update_freelook_sight()
|
||||
air_update_turf(TRUE, TRUE)
|
||||
register_context()
|
||||
GLOB.airlocks += src
|
||||
if(elevator_mode)
|
||||
if(elevator_linked_id)
|
||||
elevator_status = LIFT_PLATFORM_LOCKED
|
||||
@@ -129,7 +128,6 @@
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
update_freelook_sight()
|
||||
GLOB.airlocks -= src
|
||||
if(elevator_mode)
|
||||
GLOB.elevator_doors -= src
|
||||
if(spark_system)
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
var/busy
|
||||
|
||||
/obj/machinery/door_buttons/access_button/findObjsByTag()
|
||||
for(var/obj/machinery/door_buttons/airlock_controller/A in GLOB.machines)
|
||||
for(var/obj/machinery/door_buttons/airlock_controller/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door_buttons/airlock_controller))
|
||||
if(A.idSelf == idSelf)
|
||||
controller = A
|
||||
break
|
||||
for(var/obj/machinery/door/airlock/I in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/I as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock))
|
||||
if(I.id_tag == idDoor)
|
||||
door = I
|
||||
break
|
||||
@@ -120,7 +120,7 @@
|
||||
exteriorAirlock = null
|
||||
|
||||
/obj/machinery/door_buttons/airlock_controller/Destroy()
|
||||
for(var/obj/machinery/door_buttons/access_button/A in GLOB.machines)
|
||||
for(var/obj/machinery/door_buttons/access_button/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door_buttons/access_button))
|
||||
if(A.controller == src)
|
||||
A.controller = null
|
||||
return ..()
|
||||
@@ -241,7 +241,7 @@
|
||||
lostPower = FALSE
|
||||
|
||||
/obj/machinery/door_buttons/airlock_controller/findObjsByTag()
|
||||
for(var/obj/machinery/door/door as anything in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/door as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door))
|
||||
if(door.id_tag == idInterior)
|
||||
interiorAirlock = door
|
||||
else if(door.id_tag == idExterior)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
id = MASSDRIVER_SHACK
|
||||
|
||||
/obj/machinery/mass_driver/Destroy()
|
||||
for(var/obj/machinery/computer/pod/control in GLOB.machines)
|
||||
for(var/obj/machinery/computer/pod/control as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/pod))
|
||||
if(control.id == id)
|
||||
control.connected = null
|
||||
return ..()
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
/obj/machinery/mechpad/Initialize(mapload)
|
||||
. = ..()
|
||||
display_name = "Orbital Pad - [get_area_name(src)]"
|
||||
GLOB.mechpad_list += src
|
||||
|
||||
/obj/machinery/mechpad/Destroy()
|
||||
GLOB.mechpad_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mechpad/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/machinery/computer/sat_control/proc/toggle(toggled_id)
|
||||
var/turf/current_turf = get_turf(src)
|
||||
for(var/obj/machinery/satellite/satellite in GLOB.machines)
|
||||
for(var/obj/machinery/satellite/satellite as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/satellite))
|
||||
if(satellite.id != toggled_id)
|
||||
continue
|
||||
if(satellite.obj_flags & EMAGGED)
|
||||
@@ -36,7 +36,7 @@
|
||||
var/list/data = list()
|
||||
|
||||
data["satellites"] = list()
|
||||
for(var/obj/machinery/satellite/sat in GLOB.machines)
|
||||
for(var/obj/machinery/satellite/sat as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/satellite))
|
||||
data["satellites"] += list(list(
|
||||
"id" = sat.id,
|
||||
"active" = sat.active,
|
||||
|
||||
@@ -442,14 +442,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/status_display/evac, 32)
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/status_display/ai, 32)
|
||||
|
||||
/obj/machinery/status_display/ai/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.ai_status_displays.Add(src)
|
||||
|
||||
/obj/machinery/status_display/ai/Destroy()
|
||||
GLOB.ai_status_displays.Remove(src)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/status_display/ai/attack_ai(mob/living/silicon/ai/user)
|
||||
if(!isAI(user))
|
||||
return
|
||||
|
||||
@@ -595,7 +595,7 @@
|
||||
|
||||
/obj/item/syndicatedetonator/attack_self(mob/user)
|
||||
if(timer < world.time)
|
||||
for(var/obj/machinery/syndicatebomb/B in GLOB.machines)
|
||||
for(var/obj/machinery/syndicatebomb/B as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/syndicatebomb))
|
||||
if(B.active)
|
||||
B.detonation_timer = world.time + BUTTON_DELAY
|
||||
detonated++
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
grav_field = new(src, 7, TRUE, rand(0, 3))
|
||||
|
||||
/obj/effect/anomaly/grav/high/detonate()
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator in GLOB.machines)
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/gravity_generator/main))
|
||||
if(is_station_level(the_generator.z))
|
||||
the_generator.blackout()
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
else //If we still cannot find a home associated with our team, we just pick a random pad and make it our own.
|
||||
var/list/consoles = list()
|
||||
for(var/obj/machinery/abductor/console/found_console in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/console/found_console as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/console))
|
||||
consoles += found_console
|
||||
console = pick(consoles)
|
||||
if(console)
|
||||
|
||||
@@ -340,7 +340,7 @@
|
||||
var/nuclear_option_odds = 0.1
|
||||
|
||||
/obj/item/paper/fluff/junkmail_redpill/Initialize(mapload)
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/self_destruct = locate() in GLOB.nuke_list
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/self_destruct = locate() in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/selfdestruct)
|
||||
if(!self_destruct || !prob(nuclear_option_odds)) // 1 in 1000 chance of getting 2 random nuke code characters.
|
||||
add_raw_text("<i>You need to escape the simulation. Don't forget the numbers, they help you remember:</i> '[rand(0,9)][rand(0,9)][rand(0,9)]...'")
|
||||
return ..()
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return
|
||||
//SKYRAT EDIT END
|
||||
var/list/locations = list()
|
||||
for(var/obj/machinery/computer/teleporter/computer in GLOB.machines)
|
||||
for(var/obj/machinery/computer/teleporter/computer as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/teleporter))
|
||||
var/atom/target = computer.target_ref?.resolve()
|
||||
if(!target)
|
||||
computer.target_ref = null
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/machinery/computer/camera_advanced/base_construction/aux/find_spawn_spot()
|
||||
//Aux base controller. Where the eyeobj will spawn.
|
||||
var/obj/machinery/computer/auxiliary_base/aux_controller
|
||||
for(var/obj/machinery/computer/auxiliary_base/potential_aux_console in GLOB.machines)
|
||||
for(var/obj/machinery/computer/auxiliary_base/potential_aux_console as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/auxiliary_base))
|
||||
if(istype(get_area(potential_aux_console), allowed_area))
|
||||
aux_controller = potential_aux_console
|
||||
break
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/datum/fax_panel_interface/New()
|
||||
//Get all faxes, and save them to our list.
|
||||
for(var/obj/machinery/fax/fax in GLOB.machines)
|
||||
for(var/obj/machinery/fax/fax as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax))
|
||||
available_faxes += WEAKREF(fax)
|
||||
|
||||
//Get all stamps
|
||||
|
||||
@@ -1349,7 +1349,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/code = random_nukecode()
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/selfdestruct))
|
||||
SD.r_code = code
|
||||
message_admins("[key_name_admin(usr)] has set the self-destruct \
|
||||
code to \"[code]\".")
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
SSshuttle.hostile_environments.Cut()
|
||||
SSshuttle.checkHostileEnvironment()
|
||||
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
set category = "Admin.Events"
|
||||
set name = "Toggle Nuke"
|
||||
set popup_menu = FALSE
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Plumbing") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
|
||||
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for(var/obj/machinery/atmospherics/components/pipe in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/pipe as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components))
|
||||
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
|
||||
|
||||
//Pipes
|
||||
for(var/obj/machinery/atmospherics/pipe/pipe in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/pipe/pipe as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/pipe))
|
||||
if(istype(pipe, /obj/machinery/atmospherics/pipe/smart) || istype(pipe, /obj/machinery/atmospherics/pipe/layer_manifold))
|
||||
continue
|
||||
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
|
||||
|
||||
//Nodes
|
||||
for(var/obj/machinery/atmospherics/node1 in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/node1 as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics))
|
||||
for(var/obj/machinery/atmospherics/node2 in node1.nodes)
|
||||
if(!(node1 in node2.nodes))
|
||||
to_chat(usr, "One-way connection in [node1.name] located at [ADMIN_VERBOSEJMP(node1)]", confidential = TRUE)
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
areas_all.Add(A.type)
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/APC as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
var/area/A = APC.area
|
||||
if(!A)
|
||||
dat += "Skipped over [APC] in invalid location, [APC.loc]."
|
||||
@@ -328,7 +328,7 @@
|
||||
areas_with_RC.Add(A.type)
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light))
|
||||
var/area/A = get_area(L)
|
||||
if(!A)
|
||||
dat += "Skipped over [L] in invalid location, [L.loc].<br>"
|
||||
@@ -337,7 +337,7 @@
|
||||
areas_with_light.Add(A.type)
|
||||
CHECK_TICK
|
||||
|
||||
for(var/obj/machinery/light_switch/LS in GLOB.machines)
|
||||
for(var/obj/machinery/light_switch/LS as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light_switch))
|
||||
var/area/A = get_area(LS)
|
||||
if(!A)
|
||||
dat += "Skipped over [LS] in invalid location, [LS.loc].<br>"
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
//SKYRAT EDIT END
|
||||
//Open the Armory doors
|
||||
if(ertemplate.opendoors)
|
||||
for(var/obj/machinery/door/poddoor/ert/door in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/poddoor/ert/door as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor/ert))
|
||||
door.open()
|
||||
CHECK_TICK
|
||||
return TRUE
|
||||
|
||||
@@ -71,7 +71,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
if("maint_access_engiebrig")
|
||||
if(!is_debugger)
|
||||
return
|
||||
for(var/obj/machinery/door/airlock/maintenance/doors in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/maintenance/doors as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock/maintenance))
|
||||
if ((ACCESS_MAINT_TUNNELS in doors.req_access) || (ACCESS_MAINT_TUNNELS in doors.req_one_access))
|
||||
doors.req_access = list()
|
||||
doors.req_one_access = list(ACCESS_BRIG, ACCESS_ENGINEERING)
|
||||
@@ -79,7 +79,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
if("maint_access_brig")
|
||||
if(!is_debugger)
|
||||
return
|
||||
for(var/obj/machinery/door/airlock/maintenance/doors in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/maintenance/doors as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock/maintenance))
|
||||
if ((ACCESS_MAINT_TUNNELS in doors.req_access) || (ACCESS_MAINT_TUNNELS in doors.req_one_access))
|
||||
doors.req_access = list(ACCESS_BRIG)
|
||||
doors.req_one_access = list()
|
||||
@@ -328,7 +328,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
if(!is_funmin)
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Egalitarian Station"))
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/W as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock))
|
||||
if(is_station_level(W.z) && !istype(get_area(W), /area/station/command) && !istype(get_area(W), /area/station/commons) && !istype(get_area(W), /area/station/service) && !istype(get_area(W), /area/station/command/heads_quarters) && !istype(get_area(W), /area/station/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(holder)] activated Egalitarian Station mode")
|
||||
@@ -348,7 +348,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Break All Lights"))
|
||||
message_admins("[key_name_admin(holder)] broke all lights")
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light))
|
||||
L.break_light_tube()
|
||||
stoplag()
|
||||
if("whiteout")
|
||||
@@ -356,7 +356,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
|
||||
return
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Fix All Lights"))
|
||||
message_admins("[key_name_admin(holder)] fixed all lights")
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light))
|
||||
L.fix()
|
||||
stoplag()
|
||||
if("customportal")
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
explanation_text = "Experiment on [target_amount] humans."
|
||||
|
||||
/datum/objective/experiment/check_completion()
|
||||
for(var/obj/machinery/abductor/experiment/E in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/experiment/E as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/experiment))
|
||||
if(!istype(team, /datum/team/abductor_team))
|
||||
return FALSE
|
||||
var/datum/team/abductor_team/T = team
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/obj/machinery/abductor/console/mothership_console in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/console/mothership_console as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/console))
|
||||
if(mothership_console.vest == src)
|
||||
mothership_console.vest = null
|
||||
break
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/proc/get_abductor_console(team_number)
|
||||
for(var/obj/machinery/abductor/console/C in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/console/C as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/console))
|
||||
if(C.team_number == team_number)
|
||||
return C
|
||||
|
||||
@@ -206,18 +206,18 @@
|
||||
if(!team_number)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/abductor/pad/p in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/pad/p as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/pad))
|
||||
if(p.team_number == team_number)
|
||||
pad = p
|
||||
pad.console = src
|
||||
break
|
||||
|
||||
for(var/obj/machinery/abductor/experiment/e in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/experiment/e as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/experiment))
|
||||
if(e.team_number == team_number)
|
||||
experiment = e
|
||||
e.console = src
|
||||
|
||||
for(var/obj/machinery/computer/camera_advanced/abductor/c in GLOB.machines)
|
||||
for(var/obj/machinery/computer/camera_advanced/abductor/c as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/camera_advanced/abductor))
|
||||
if(c.team_number == team_number)
|
||||
camera = c
|
||||
c.console = src
|
||||
@@ -252,7 +252,7 @@
|
||||
if(vest == V)
|
||||
return FALSE
|
||||
|
||||
for(var/obj/machinery/abductor/console/C in GLOB.machines)
|
||||
for(var/obj/machinery/abductor/console/C as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/abductor/console))
|
||||
if(C.vest == V)
|
||||
C.vest = null
|
||||
break
|
||||
|
||||
@@ -385,7 +385,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
|
||||
/datum/action/innate/ai/lockdown/Activate()
|
||||
hack_in_progress = TRUE
|
||||
for(var/obj/machinery/door/locked_down as anything in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/locked_down as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door))
|
||||
if(QDELETED(locked_down) || !is_station_level(locked_down.z))
|
||||
continue
|
||||
INVOKE_ASYNC(locked_down, TYPE_PROC_REF(/obj/machinery/door, hostile_lockdown), owner)
|
||||
@@ -405,7 +405,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
|
||||
/// For Lockdown malf AI ability. Opens all doors on the station.
|
||||
/proc/_malf_ai_undo_lockdown()
|
||||
for(var/obj/machinery/door/locked_down as anything in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/locked_down as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door))
|
||||
if(QDELETED(locked_down) || !is_station_level(locked_down.z))
|
||||
continue
|
||||
INVOKE_ASYNC(locked_down, TYPE_PROC_REF(/obj/machinery/door, disable_lockdown))
|
||||
@@ -565,7 +565,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
desc = "[desc] It has [uses] use\s remaining."
|
||||
|
||||
/datum/action/innate/ai/blackout/Activate()
|
||||
for(var/obj/machinery/power/apc/apc in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/apc as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(prob(30 * apc.overload))
|
||||
apc.overload_lighting()
|
||||
else
|
||||
@@ -726,12 +726,12 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
uses = 1
|
||||
|
||||
/datum/action/innate/ai/break_fire_alarms/Activate()
|
||||
for(var/obj/machinery/firealarm/bellman in GLOB.machines)
|
||||
for(var/obj/machinery/firealarm/bellman as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/firealarm))
|
||||
if(!is_station_level(bellman.z))
|
||||
continue
|
||||
bellman.obj_flags |= EMAGGED
|
||||
bellman.update_appearance()
|
||||
for(var/obj/machinery/door/firedoor/firelock in GLOB.machines)
|
||||
for(var/obj/machinery/door/firedoor/firelock as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/firedoor))
|
||||
if(!is_station_level(firelock.z))
|
||||
continue
|
||||
firelock.emag_act(owner_AI, src)
|
||||
@@ -756,7 +756,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
uses = 1
|
||||
|
||||
/datum/action/innate/ai/emergency_lights/Activate()
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
for(var/obj/machinery/light/L as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light))
|
||||
if(is_station_level(L.z))
|
||||
L.no_low_power = TRUE
|
||||
INVOKE_ASYNC(L, TYPE_PROC_REF(/obj/machinery/light/, update), FALSE)
|
||||
@@ -857,7 +857,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module))
|
||||
unlock_sound = 'sound/items/rped.ogg'
|
||||
|
||||
/datum/ai_module/upgrade/upgrade_turrets/upgrade(mob/living/silicon/ai/AI)
|
||||
for(var/obj/machinery/porta_turret/ai/turret in GLOB.machines)
|
||||
for(var/obj/machinery/porta_turret/ai/turret as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/porta_turret/ai))
|
||||
turret.AddElement(/datum/element/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES | EMP_PROTECT_CONTENTS)
|
||||
turret.max_integrity = 200
|
||||
turret.repair_damage(200)
|
||||
|
||||
@@ -57,7 +57,6 @@ GLOBAL_VAR(station_nuke_source)
|
||||
/obj/machinery/nuclearbomb/Initialize(mapload)
|
||||
. = ..()
|
||||
countdown = new(src)
|
||||
GLOB.nuke_list += src
|
||||
core = new /obj/item/nuke_core(src)
|
||||
STOP_PROCESSING(SSobj, core)
|
||||
update_appearance()
|
||||
@@ -69,7 +68,6 @@ GLOBAL_VAR(station_nuke_source)
|
||||
if(!exploding)
|
||||
// If we're not exploding, set the alert level back to normal
|
||||
toggle_nuke_safety()
|
||||
GLOB.nuke_list -= src
|
||||
QDEL_NULL(countdown)
|
||||
QDEL_NULL(core)
|
||||
return ..()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
else
|
||||
msg = "Its tracking indicator is blank."
|
||||
. += msg
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
if(bomb.timing)
|
||||
. += "Extreme danger. Arming signal detected. Time remaining: [bomb.get_time_left()]."
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
..()
|
||||
if(!active || alert)
|
||||
return
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
if(!bomb.timing)
|
||||
continue
|
||||
alert = TRUE
|
||||
@@ -48,10 +48,9 @@
|
||||
var/mob/living/silicon/ai/A = V
|
||||
if(A.nuking)
|
||||
target = A
|
||||
for(var/V in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/A = V
|
||||
if(A.malfhack && A.occupier)
|
||||
target = A
|
||||
for(var/obj/machinery/power/apc/apc as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(apc.malfhack && apc.occupier)
|
||||
target = apc
|
||||
if(TRACK_INFILTRATOR)
|
||||
target = SSshuttle.getShuttle("syndicate")
|
||||
// SKYRAT EDIT ADDITION
|
||||
|
||||
@@ -91,14 +91,14 @@
|
||||
/datum/antagonist/nukeop/proc/assign_nuke()
|
||||
if(nuke_team && !nuke_team.tracked_nuke)
|
||||
nuke_team.memorized_code = random_nukecode()
|
||||
var/obj/machinery/nuclearbomb/syndicate/nuke = locate() in GLOB.nuke_list
|
||||
var/obj/machinery/nuclearbomb/syndicate/nuke = locate() in SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/syndicate)
|
||||
if(nuke)
|
||||
nuke_team.tracked_nuke = nuke
|
||||
if(nuke.r_code == NUKE_CODE_UNSET)
|
||||
nuke.r_code = nuke_team.memorized_code
|
||||
else //Already set by admins/something else?
|
||||
nuke_team.memorized_code = nuke.r_code
|
||||
for(var/obj/machinery/nuclearbomb/beer/beernuke in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/beer/beernuke as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/beer))
|
||||
beernuke.r_code = nuke_team.memorized_code
|
||||
else
|
||||
stack_trace("Syndicate nuke not found during nuke team creation.")
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/datum/antagonist/nukeop/proc/admin_tell_code(mob/admin)
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue as anything in GLOB.nuke_list)
|
||||
for (var/obj/machinery/nuclearbomb/bombue as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
if (length(bombue.r_code) <= 5 && bombue.r_code != initial(bombue.r_code))
|
||||
code = bombue.r_code
|
||||
break
|
||||
@@ -323,7 +323,7 @@
|
||||
/datum/antagonist/nukeop/lone/assign_nuke()
|
||||
if(nuke_team && !nuke_team.tracked_nuke)
|
||||
nuke_team.memorized_code = random_nukecode()
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/selfdestruct)
|
||||
if(nuke)
|
||||
nuke_team.tracked_nuke = nuke
|
||||
if(nuke.r_code == NUKE_CODE_UNSET)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/datum/team/pirate/proc/forge_objectives()
|
||||
var/datum/objective/loot/getbooty = new()
|
||||
getbooty.team = src
|
||||
for(var/obj/machinery/computer/piratepad_control/P in GLOB.machines)
|
||||
for(var/obj/machinery/computer/piratepad_control/P as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/piratepad_control))
|
||||
var/area/A = get_area(P)
|
||||
if(istype(A,/area/shuttle/pirate))
|
||||
getbooty.cargo_hold = P
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
/obj/machinery/computer/piratepad_control/LateInitialize()
|
||||
. = ..()
|
||||
if(cargo_hold_id)
|
||||
for(var/obj/machinery/piratepad/P in GLOB.machines)
|
||||
for(var/obj/machinery/piratepad/P as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/piratepad))
|
||||
if(P.cargo_hold_id == cargo_hold_id)
|
||||
pad_ref = WEAKREF(P)
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/datum/traitor_objective/ultimate/battlecruiser/on_objective_taken(mob/user)
|
||||
. = ..()
|
||||
team = new()
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/selfdestruct)
|
||||
if(nuke.r_code == NUKE_CODE_UNSET)
|
||||
nuke.r_code = random_nukecode()
|
||||
team.nuke = nuke
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
/datum/grand_finale/all_access/trigger(mob/living/carbon/human/invoker)
|
||||
message_admins("[key_name(invoker)] removed all door access requirements")
|
||||
for(var/obj/machinery/door/target_door as anything in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/target_door as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door))
|
||||
if(is_station_level(target_door.z))
|
||||
target_door.unlock()
|
||||
target_door.req_access = list()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(cooldown)
|
||||
return
|
||||
cooldown = TRUE
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/poddoor/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor))
|
||||
if(M.id == src.id)
|
||||
if(openclose == null || !sync_doors)
|
||||
openclose = M.density
|
||||
@@ -75,7 +75,7 @@
|
||||
cooldown = TRUE
|
||||
var/doors_need_closing = FALSE
|
||||
var/list/obj/machinery/door/airlock/open_or_close = list()
|
||||
for(var/obj/machinery/door/airlock/D in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/D as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock))
|
||||
if(D.id_tag == src.id)
|
||||
if(specialfunctions & OPEN)
|
||||
open_or_close += D
|
||||
@@ -112,21 +112,21 @@
|
||||
if(cooldown)
|
||||
return
|
||||
cooldown = TRUE
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/poddoor/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor))
|
||||
if (M.id == src.id)
|
||||
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/machinery/door/poddoor, open))
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(activate_stage2)), 1 SECONDS)
|
||||
|
||||
/obj/item/assembly/control/massdriver/proc/activate_stage2()
|
||||
for(var/obj/machinery/mass_driver/M in GLOB.machines)
|
||||
for(var/obj/machinery/mass_driver/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/mass_driver))
|
||||
if(M.id == src.id)
|
||||
M.drive()
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(activate_stage3)), 6 SECONDS)
|
||||
|
||||
/obj/item/assembly/control/massdriver/proc/activate_stage3()
|
||||
for(var/obj/machinery/door/poddoor/M in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/poddoor/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor))
|
||||
if (M.id == src.id)
|
||||
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/machinery/door/poddoor, close))
|
||||
|
||||
@@ -141,11 +141,11 @@
|
||||
if(cooldown)
|
||||
return
|
||||
cooldown = TRUE
|
||||
for(var/obj/machinery/sparker/M in GLOB.machines)
|
||||
for(var/obj/machinery/sparker/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/sparker))
|
||||
if (M.id == src.id)
|
||||
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/machinery/sparker, ignite))
|
||||
|
||||
for(var/obj/machinery/igniter/M in GLOB.machines)
|
||||
for(var/obj/machinery/igniter/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/igniter))
|
||||
if(M.id == src.id)
|
||||
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/machinery/igniter, toggle))
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if(cooldown)
|
||||
return
|
||||
cooldown = TRUE
|
||||
for(var/obj/machinery/flasher/M in GLOB.machines)
|
||||
for(var/obj/machinery/flasher/M as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/flasher))
|
||||
if(M.id == src.id)
|
||||
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/machinery/flasher, flash))
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/datum/round_event/brand_intelligence/setup()
|
||||
//select our origin machine (which will also be the type of vending machine affected.)
|
||||
for(var/obj/machinery/vending/vendor in GLOB.machines)
|
||||
for(var/obj/machinery/vending/vendor as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/vending))
|
||||
if(!vendor.onstation)
|
||||
continue
|
||||
if(!vendor.density)
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
return
|
||||
|
||||
for(var/centre in epicentreList)
|
||||
for(var/a in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/A = a
|
||||
if(get_dist(centre, A) <= lightsoutRange)
|
||||
A.overload_lighting()
|
||||
for(var/obj/machinery/power/apc/apc as anything in SSmachines.get_machines_by_type(/obj/machinery/power/apc))
|
||||
if(get_dist(centre, apc) <= lightsoutRange)
|
||||
apc.overload_lighting()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/datum/round_event/ghost_role/alien_infestation/spawn_role()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
return .
|
||||
|
||||
var/station_generator_exists = FALSE
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator in GLOB.machines)
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/gravity_generator/main))
|
||||
if(is_station_level(the_generator.z))
|
||||
station_generator_exists = TRUE
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
priority_announce("Gravnospheric anomalies detected near [station_name()]. Manual reset of generators is required.", "Anomaly Alert", ANNOUNCER_GRANOMALIES)
|
||||
|
||||
/datum/round_event/gravity_generator_blackout/start()
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator in GLOB.machines)
|
||||
for(var/obj/machinery/gravity_generator/main/the_generator as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/gravity_generator/main))
|
||||
if(is_station_level(the_generator.z))
|
||||
the_generator.blackout()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
priority_announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
|
||||
|
||||
/datum/round_event/scrubber_overflow/setup()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_scrubber))
|
||||
var/turf/scrubber_turf = get_turf(temp_vent)
|
||||
if(!scrubber_turf)
|
||||
continue
|
||||
@@ -89,7 +89,7 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_scrubber))
|
||||
var/turf/scrubber_turf = get_turf(temp_vent)
|
||||
if(!scrubber_turf)
|
||||
continue
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
|
||||
var/turf/vent_turf = get_turf(vent)
|
||||
if(vent_turf && is_station_level(vent_turf.z) && !vent.welded)
|
||||
return TRUE //make sure we have a valid vent to spawn from.
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
/datum/round_event/vent_clog/proc/get_vent()
|
||||
var/list/vent_list = list()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
|
||||
var/turf/vent_turf = get_turf(vent)
|
||||
if(vent_turf && is_station_level(vent_turf.z) && !vent.welded && !vent_turf.is_blocked_turf_ignore_climbable())
|
||||
vent_list += vent
|
||||
|
||||
@@ -797,7 +797,7 @@
|
||||
)
|
||||
|
||||
/datum/holiday/xmas/proc/roundstart_celebrate()
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/Monitor in GLOB.machines)
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/Monitor as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/security/telescreen/entertainment))
|
||||
Monitor.icon_state_on = "entertainment_xmas"
|
||||
|
||||
for(var/mob/living/basic/pet/dog/corgi/ian/Ian in GLOB.mob_living_list)
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
* The tram doors are in a list of airlocks and we apply the proc on that list.
|
||||
*/
|
||||
/datum/lift_master/tram/proc/update_tram_doors(action)
|
||||
for(var/obj/machinery/door/window/tram/tram_door in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/window/tram/tram_door as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/window/tram))
|
||||
if(tram_door.associated_lift != specific_lift_id)
|
||||
continue
|
||||
set_door_state(tram_door, action)
|
||||
|
||||
@@ -414,7 +414,7 @@ GLOBAL_LIST_INIT(mafia_role_by_alignment, setup_mafia_role_by_alignment())
|
||||
* * close: boolean, the state you want the curtains in.
|
||||
*/
|
||||
/datum/mafia_controller/proc/toggle_night_curtains(close)
|
||||
for(var/obj/machinery/door/poddoor/D in GLOB.airlocks) //I really dislike pathing of these
|
||||
for(var/obj/machinery/door/poddoor/D as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor))
|
||||
if(D.id != "mafia") //so as to not trigger shutters on station, lol
|
||||
continue
|
||||
if(close)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
///Initializes airlock links.
|
||||
/obj/machinery/computer/vaultcontroller/proc/find_airlocks()
|
||||
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/airlock/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/airlock))
|
||||
if(A.id_tag == "derelictvault")
|
||||
if(!door1)
|
||||
door1 = A
|
||||
|
||||
@@ -280,7 +280,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/auxiliary_base, 32)
|
||||
var/turf/T = get_turf(user)
|
||||
var/obj/machinery/computer/auxiliary_base/AB
|
||||
|
||||
for (var/obj/machinery/computer/auxiliary_base/A in GLOB.machines)
|
||||
for (var/obj/machinery/computer/auxiliary_base/A as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/auxiliary_base))
|
||||
if(is_station_level(A.z))
|
||||
AB = A
|
||||
break
|
||||
@@ -362,7 +362,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/auxiliary_base, 32)
|
||||
to_chat(user, span_warning("This device is only to be used in a mining zone."))
|
||||
return
|
||||
var/obj/machinery/computer/auxiliary_base/aux_base_console
|
||||
for(var/obj/machinery/computer/auxiliary_base/ABC in GLOB.machines)
|
||||
for(var/obj/machinery/computer/auxiliary_base/ABC as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/auxiliary_base))
|
||||
if(get_dist(landing_spot, ABC) <= console_range)
|
||||
aux_base_console = ABC
|
||||
break
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
|
||||
/// Apply an emote to all AI status displays on the station
|
||||
/mob/living/silicon/ai/proc/apply_emote_display(emote)
|
||||
for(var/obj/machinery/status_display/ai/ai_display as anything in GLOB.ai_status_displays)
|
||||
for(var/obj/machinery/status_display/ai/ai_display as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/status_display/ai))
|
||||
ai_display.emotion = emote
|
||||
ai_display.update()
|
||||
|
||||
@@ -490,14 +490,14 @@
|
||||
src << browse(last_tablet_note_seen, "window=show_tablet")
|
||||
//Carn: holopad requests
|
||||
if(href_list["jump_to_holopad"])
|
||||
var/obj/machinery/holopad/Holopad = locate(href_list["jump_to_holopad"]) in GLOB.machines
|
||||
var/obj/machinery/holopad/Holopad = locate(href_list["jump_to_holopad"]) in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/holopad)
|
||||
if(Holopad)
|
||||
cam_prev = get_turf(eyeobj)
|
||||
eyeobj.setLoc(Holopad)
|
||||
else
|
||||
to_chat(src, span_notice("Unable to locate the holopad."))
|
||||
if(href_list["project_to_holopad"])
|
||||
var/obj/machinery/holopad/Holopad = locate(href_list["project_to_holopad"]) in GLOB.machines
|
||||
var/obj/machinery/holopad/Holopad = locate(href_list["project_to_holopad"]) in SSmachines.get_machines_by_type(/obj/machinery/holopad)
|
||||
if(Holopad)
|
||||
lastloc = get_turf(eyeobj)
|
||||
Holopad.attack_ai_secondary(src) //may as well recycle
|
||||
|
||||
@@ -119,7 +119,6 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar
|
||||
|
||||
/obj/item/modular_computer/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(!physical)
|
||||
physical = src
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
chatprogram.username = "cargo_requests_operator"
|
||||
|
||||
var/datum/ntnet_conversation/cargochat = chatprogram.create_new_channel("#cargobus", strong = TRUE)
|
||||
for(var/obj/machinery/modular_computer/preset/cargochat/cargochat_console in GLOB.machines)
|
||||
for(var/obj/machinery/modular_computer/preset/cargochat/cargochat_console as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/modular_computer/preset/cargochat))
|
||||
if(cargochat_console == src)
|
||||
continue
|
||||
var/datum/computer_file/program/chatclient/other_chatprograms = cargochat_console.cpu.find_file_by_name("ntnrc_client")
|
||||
|
||||
@@ -46,11 +46,3 @@
|
||||
program_icon_state = "alert-red"
|
||||
ui_header = "alarm_red.gif"
|
||||
update_computer_icon() // Always update the icon after we check our conditional because we might've changed it
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/on_start(mob/user)
|
||||
. = ..(user)
|
||||
GLOB.alarmdisplay += src
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/kill_program()
|
||||
GLOB.alarmdisplay -= src
|
||||
return ..()
|
||||
|
||||
@@ -127,7 +127,3 @@
|
||||
if("bountyText")
|
||||
bounty_text = (params["bountytext"])
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/bounty_board/Destroy()
|
||||
GLOB.allbountyboards -= computer
|
||||
. = ..()
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
objects = list()
|
||||
|
||||
// All the nukes
|
||||
for(var/obj/machinery/nuclearbomb/nuke as anything in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/nuke as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
var/list/nuke_info = list(
|
||||
ref = REF(nuke),
|
||||
name = nuke.name,
|
||||
@@ -362,7 +362,7 @@
|
||||
/datum/computer_file/program/radar/fission360/on_examine(obj/item/modular_computer/source, mob/user)
|
||||
var/list/examine_list = list()
|
||||
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/bomb as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb))
|
||||
if(bomb.timing)
|
||||
examine_list += span_danger("Extreme danger. Arming signal detected. Time remaining: [bomb.get_time_left()].")
|
||||
return examine_list
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/turf/user_turf = get_turf(computer.ui_host())
|
||||
if(!user_turf)
|
||||
return
|
||||
for(var/obj/machinery/power/supermatter_crystal/sm in GLOB.machines)
|
||||
for(var/obj/machinery/power/supermatter_crystal/sm as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/supermatter_crystal))
|
||||
//Exclude Syndicate owned, Delaminating, not within coverage, not on a tile.
|
||||
if (!sm.include_in_cims || !isturf(sm.loc) || !(is_station_level(sm.z) || is_mining_level(sm.z) || sm.z == user_turf.z))
|
||||
continue
|
||||
|
||||
@@ -221,7 +221,7 @@ GLOBAL_VAR_INIT(nt_fax_department, pick("NT HR Department", "NT Legal Department
|
||||
/obj/machinery/fax/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
//Record a list of all existing faxes.
|
||||
for(var/obj/machinery/fax/FAX in GLOB.machines)
|
||||
for(var/obj/machinery/fax/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax))
|
||||
if(FAX.fax_id == fax_id) //skip yourself
|
||||
continue
|
||||
var/list/fax_data = list()
|
||||
@@ -327,7 +327,7 @@ GLOBAL_VAR_INIT(nt_fax_department, pick("NT HR Department", "NT Legal Department
|
||||
* * id - The network ID of the fax machine you want to send the item to.
|
||||
*/
|
||||
/obj/machinery/fax/proc/send(obj/item/loaded, id)
|
||||
for(var/obj/machinery/fax/FAX in GLOB.machines)
|
||||
for(var/obj/machinery/fax/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax))
|
||||
if (FAX.fax_id != id)
|
||||
continue
|
||||
if (FAX.jammed)
|
||||
@@ -447,7 +447,7 @@ GLOBAL_VAR_INIT(nt_fax_department, pick("NT HR Department", "NT Legal Department
|
||||
* * new_fax_name - The text of the name to be checked for a match.
|
||||
*/
|
||||
/obj/machinery/fax/proc/fax_name_exist(new_fax_name)
|
||||
for(var/obj/machinery/fax/FAX in GLOB.machines)
|
||||
for(var/obj/machinery/fax/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax))
|
||||
if (FAX.fax_name == new_fax_name)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -137,7 +137,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/ticket_machine, 32)
|
||||
|
||||
/// Locate the ticket machine to which we're linked by our ID
|
||||
/obj/item/assembly/control/ticket_machine/proc/find_machine()
|
||||
for(var/obj/machinery/ticket_machine/ticketsplease in GLOB.machines)
|
||||
for(var/obj/machinery/ticket_machine/ticketsplease as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/ticket_machine))
|
||||
if(ticketsplease.id == id)
|
||||
ticket_machine_ref = WEAKREF(ticketsplease)
|
||||
if(ticket_machine_ref)
|
||||
|
||||
@@ -213,11 +213,7 @@
|
||||
AddElement(/datum/element/contextual_screentip_bare_hands, rmb_text = "Toggle interface lock")
|
||||
AddElement(/datum/element/contextual_screentip_mob_typechecks, hovering_mob_typechecks)
|
||||
|
||||
GLOB.apcs_list += src
|
||||
|
||||
/obj/machinery/power/apc/Destroy()
|
||||
GLOB.apcs_list -= src
|
||||
|
||||
if(malfai && operating)
|
||||
malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10, 0, 1000)
|
||||
disconnect_from_area()
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
expand(current_size)
|
||||
|
||||
for (var/obj/machinery/power/singularity_beacon/singu_beacon in GLOB.machines)
|
||||
for (var/obj/machinery/power/singularity_beacon/singu_beacon as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/singularity_beacon))
|
||||
if (singu_beacon.active)
|
||||
new_component.target = singu_beacon
|
||||
break
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
// set supermatter cascade to true, to prevent auto evacuation due to no way of calling the shuttle
|
||||
SSshuttle.supermatter_cascade = TRUE
|
||||
// set hijack completion timer to infinity, so that you cant prematurely end the round with a hijack
|
||||
for(var/obj/machinery/computer/emergency_shuttle/console in GLOB.machines)
|
||||
for(var/obj/machinery/computer/emergency_shuttle/console as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/emergency_shuttle))
|
||||
console.hijack_completion_flight_time_set = INFINITY
|
||||
|
||||
/* This logic is to keep uncalled shuttles uncalled
|
||||
@@ -158,7 +158,7 @@
|
||||
if(SSsecurity_level.get_current_level_as_number() != SEC_LEVEL_DELTA)
|
||||
SSsecurity_level.set_level(SEC_LEVEL_DELTA) // skip the announcement and shuttle timer adjustment in set_security_level()
|
||||
make_maint_all_access()
|
||||
for(var/obj/machinery/light/light_to_break in GLOB.machines)
|
||||
for(var/obj/machinery/light/light_to_break as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/light))
|
||||
if(prob(35))
|
||||
light_to_break.set_major_emergency_light()
|
||||
continue
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/machinery/computer/turbine_computer/locate_machinery(multitool_connection)
|
||||
if(!mapping_id)
|
||||
return
|
||||
for(var/obj/machinery/power/turbine/core_rotor/main in GLOB.machines)
|
||||
for(var/obj/machinery/power/turbine/core_rotor/main as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/turbine/core_rotor))
|
||||
if(main.mapping_id != mapping_id)
|
||||
continue
|
||||
register_machine(main)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
/obj/effect/nettingportal/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/beacon/teletarget = null
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
for(var/obj/machinery/computer/teleporter/com as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/teleporter))
|
||||
var/atom/target = com.target_ref?.resolve()
|
||||
if(target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
|
||||
@@ -223,7 +223,7 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
|
||||
to_chat(usr, "You cannot set the nuke code for a non-nuke-code-request request!", confidential = TRUE)
|
||||
return TRUE
|
||||
var/code = random_nukecode()
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in GLOB.nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/nuclearbomb/selfdestruct))
|
||||
SD.r_code = code
|
||||
message_admins("[key_name_admin(usr)] has set the self-destruct code to \"[code]\".")
|
||||
return TRUE
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
landing_zone.height = height
|
||||
landing_zone.setDir(lz_dir)
|
||||
|
||||
for(var/obj/machinery/computer/shuttle/S in GLOB.machines)
|
||||
for(var/obj/machinery/computer/shuttle/S in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/computer/shuttle))
|
||||
if(S.shuttleId == shuttle_id)
|
||||
S.possible_destinations = "[landing_zone.shuttle_id]"
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
if(!team)
|
||||
team = new()
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list
|
||||
var/obj/machinery/nuclearbomb/selfdestruct/nuke = SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/selfdestruct)[1]
|
||||
if(nuke.r_code == NUKE_CODE_UNSET)
|
||||
nuke.r_code = random_nukecode()
|
||||
team.nuke = nuke
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.navigation_computers += src
|
||||
actions += new /datum/action/innate/shuttledocker_rotate(src)
|
||||
actions += new /datum/action/innate/shuttledocker_place(src)
|
||||
|
||||
@@ -50,8 +49,6 @@
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/Destroy()
|
||||
. = ..()
|
||||
GLOB.navigation_computers -= src
|
||||
|
||||
if(my_port?.get_docked())
|
||||
my_port.delete_after = TRUE
|
||||
my_port.shuttle_id = null
|
||||
|
||||
@@ -831,7 +831,7 @@
|
||||
return ripple_turfs
|
||||
|
||||
/obj/docking_port/mobile/proc/check_poddoors()
|
||||
for(var/obj/machinery/door/poddoor/shuttledock/pod in GLOB.airlocks)
|
||||
for(var/obj/machinery/door/poddoor/shuttledock/pod as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/door/poddoor/shuttledock))
|
||||
pod.check()
|
||||
|
||||
/obj/docking_port/mobile/proc/dock_id(id)
|
||||
|
||||
@@ -55,12 +55,11 @@
|
||||
/datum/station_goal/dna_vault/check_completion()
|
||||
if(..())
|
||||
return TRUE
|
||||
for(var/obj/machinery/dna_vault/V in GLOB.machines)
|
||||
for(var/obj/machinery/dna_vault/V as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/dna_vault))
|
||||
if(V.animal_dna.len >= animal_count && V.plant_dna.len >= plant_count && V.human_dna.len >= human_count)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/machinery/dna_vault
|
||||
name = "DNA Vault"
|
||||
desc = "Break glass in case of apocalypse."
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
|
||||
/datum/station_goal/proc/get_coverage()
|
||||
var/list/coverage = list()
|
||||
for(var/obj/machinery/satellite/meteor_shield/A in GLOB.machines)
|
||||
if(!A.active || !is_station_level(A.z))
|
||||
for(var/obj/machinery/satellite/meteor_shield/shield_satt as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/satellite/meteor_shield))
|
||||
if(!shield_satt.active || !is_station_level(shield_satt.z))
|
||||
continue
|
||||
coverage |= view(A.kill_range,A)
|
||||
coverage |= view(shield_satt.kill_range, shield_satt)
|
||||
return coverage.len
|
||||
|
||||
/obj/machinery/satellite/meteor_shield
|
||||
|
||||
@@ -476,7 +476,6 @@
|
||||
loaded_magazine.forceMove(loc)
|
||||
loaded_magazine = null
|
||||
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/ammo_workbench/proc/shock(mob/user, prb)
|
||||
|
||||
@@ -57,5 +57,5 @@
|
||||
|
||||
/// Set all APCs to start (or stop) arcing
|
||||
/proc/force_apc_arcing(force_mode = FALSE)
|
||||
for(var/obj/machinery/power/apc/controller as anything in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/controller as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/apc))
|
||||
controller.force_arcing = force_mode
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
if(winning_option == CHOICE_TRANSFER)
|
||||
SSshuttle.autoEnd()
|
||||
var/obj/machinery/computer/communications/comms_console = locate() in GLOB.machines
|
||||
var/obj/machinery/computer/communications/comms_console = locate() in GLOB.shuttle_caller_list
|
||||
if(comms_console)
|
||||
comms_console.post_status("shuttle")
|
||||
return
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
priority_announce("A fatal power outage has occurred. Please ensure that all on-board devices are connected to an appropriate power generator.")
|
||||
|
||||
apc_loop:
|
||||
for(var/obj/machinery/power/apc/controller as anything in GLOB.apcs_list)
|
||||
for(var/obj/machinery/power/apc/controller as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/apc))
|
||||
var/area/apc_area = get_area(controller) // make sure that no "critical" APCs lose their power (SM, namely)
|
||||
for(var/turf/turf as anything in apc_area.contained_turfs)
|
||||
for(var/obj/machinery/depowered_machinery in turf)
|
||||
@@ -424,7 +424,7 @@
|
||||
|
||||
controller.cell?.charge = 0
|
||||
|
||||
for(var/obj/machinery/power/smes/battery_pack in GLOB.machines)
|
||||
for(var/obj/machinery/power/smes/battery_pack as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/smes))
|
||||
battery_pack.charge = 0
|
||||
|
||||
GLOB.max_clock_power += 1500 // Extra bonus
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
/datum/round_event/ghost_role/cortical_borer/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
@@ -162,7 +162,7 @@
|
||||
var/list/vents = list()
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/cortical_borer/execute()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump))
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
)
|
||||
|
||||
/datum/round_event/scrubber_overflow/ices/setup()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_scrubber))
|
||||
var/turf/scrubber_turf = get_turf(temp_vent)
|
||||
var/area/scrubber_area = get_area(temp_vent)
|
||||
if(!scrubber_turf)
|
||||
|
||||
Reference in New Issue
Block a user