mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-23 03:58:38 +01:00
[Ready?]Machine Code Cleaning and some other stuff. (#4050)
* AutoDoc, bye useless comments, and some flair * WHEW * blele * GLOB.machines * Funny game * Forgor * Appease the linter * asdasd * chairs * asdsad * asdfasdf * wuh if * bruh
This commit is contained in:
@@ -305,8 +305,8 @@ proc/post_comm_message(var/message_title, var/message_text)
|
||||
l.Add(message)
|
||||
|
||||
//Old console support
|
||||
for (var/obj/machinery/computer/communications/comm in machines)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
for (var/obj/machinery/computer/communications/comm in GLOB.machines)
|
||||
if (!(comm.machine_stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/paper/intercept = new /obj/item/paper( comm.loc )
|
||||
intercept.name = message_title
|
||||
intercept.info = message_text
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
access.req_one_access = req_one_access
|
||||
|
||||
if(monitored_alarm_ids)
|
||||
for(var/obj/machinery/alarm/alarm in machines)
|
||||
for(var/obj/machinery/alarm/alarm in GLOB.machines)
|
||||
if(alarm.alarm_id && (alarm.alarm_id in monitored_alarm_ids))
|
||||
monitored_alarms += alarm
|
||||
// machines may not yet be ordered at this point
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
if(href_list["alarm"])
|
||||
if(ui_ref)
|
||||
var/obj/machinery/alarm/alarm = locate(href_list["alarm"]) in (monitored_alarms.len ? monitored_alarms : machines)
|
||||
var/obj/machinery/alarm/alarm = locate(href_list["alarm"]) in (monitored_alarms.len ? monitored_alarms : GLOB.machines)
|
||||
if(alarm)
|
||||
var/datum/topic_state/TS = generate_state(alarm)
|
||||
alarm.nano_ui_interact(usr, master_ui = ui_ref, state = TS)
|
||||
@@ -50,7 +50,7 @@
|
||||
var/turf/T = get_turf(nano_host())
|
||||
|
||||
// TODO: Move these to a cache, similar to cameras
|
||||
for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : machines))
|
||||
for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : GLOB.machines))
|
||||
if(!monitored_alarms.len && alarm.alarms_hidden)
|
||||
continue
|
||||
alarms[++alarms.len] = list(
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
return
|
||||
if(T)
|
||||
levels += GLOB.using_map.get_map_levels(T.z, FALSE)
|
||||
for(var/obj/machinery/power/sensor/S in machines)
|
||||
for(var/obj/machinery/power/sensor/S in GLOB.machines)
|
||||
if(T && (S.loc.z == T.z) || (S.loc.z in levels) || (S.long_range)) // Consoles have range on their Z-Level. Sensors with long_range var will work between Z levels.
|
||||
if(S.name_tag == "#UNKN#") // Default name. Shouldn't happen!
|
||||
warning("Powernet sensor with unset ID Tag! [S.x]X [S.y]Y [S.z]Z")
|
||||
|
||||
@@ -127,6 +127,6 @@
|
||||
known_SMESs.Add(SMES)
|
||||
|
||||
known_breakers = new /list()
|
||||
for(var/obj/machinery/power/breakerbox/breaker in machines)
|
||||
for(var/obj/machinery/power/breakerbox/breaker in GLOB.machines)
|
||||
if(breaker.RCon_tag != "NO_TAG")
|
||||
known_breakers.Add(breaker)
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
if(!T)
|
||||
return
|
||||
var/valid_z_levels = (GetConnectedZlevels(T.z) & GLOB.using_map.station_levels)
|
||||
for(var/obj/machinery/power/supermatter/S in machines)
|
||||
for(var/obj/machinery/power/supermatter/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if(S.grav_pulling || S.exploded || !(S.z in valid_z_levels) || !istype(S.loc, /turf/))
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user