mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
code/global.dm => code/_global_vars/ (#17244)
* 1 * Full conversion * . * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,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
|
||||
@@ -25,7 +25,7 @@
|
||||
switch(action)
|
||||
if("alarm")
|
||||
if(ui_ref)
|
||||
var/obj/machinery/alarm/alarm = locate(params["alarm"]) in (monitored_alarms.len ? monitored_alarms : machines)
|
||||
var/obj/machinery/alarm/alarm = locate(params["alarm"]) in (monitored_alarms.len ? monitored_alarms : GLOB.machines)
|
||||
if(alarm)
|
||||
var/datum/tgui_state/TS = generate_state(alarm)
|
||||
alarm.tgui_interact(ui.user, parent_ui = ui_ref, state = TS)
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
// TODO: Move these to a cache, similar to cameras
|
||||
var/alarms[0]
|
||||
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
|
||||
if(!(alarm.z in map_levels))
|
||||
|
||||
@@ -377,14 +377,14 @@
|
||||
|
||||
/* Etc global procs */
|
||||
/proc/enable_prison_shuttle(var/mob/user)
|
||||
for(var/obj/machinery/computer/prison_shuttle/PS in machines)
|
||||
for(var/obj/machinery/computer/prison_shuttle/PS in GLOB.machines)
|
||||
PS.allowedtocall = !(PS.allowedtocall)
|
||||
|
||||
/proc/call_shuttle_proc(var/mob/user)
|
||||
if ((!( ticker ) || !emergency_shuttle.location()))
|
||||
return
|
||||
|
||||
if(!universe.OnShuttleCall(user))
|
||||
if(!GLOB.universe.OnShuttleCall(user))
|
||||
to_chat(user, span_notice("Cannot establish a bluespace connection."))
|
||||
return
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
/datum/tgui_module/crew_manifest/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
||||
var/list/data = ..()
|
||||
if(data_core)
|
||||
data_core.get_manifest_list()
|
||||
if(GLOB.data_core)
|
||||
GLOB.data_core.get_manifest_list()
|
||||
data["manifest"] = GLOB.PDA_Manifest
|
||||
return data
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
/datum/tgui_module/cardmod/tgui_static_data(mob/user)
|
||||
var/list/data = ..()
|
||||
if(data_core)
|
||||
data_core.get_manifest_list()
|
||||
if(GLOB.data_core)
|
||||
GLOB.data_core.get_manifest_list()
|
||||
data["manifest"] = GLOB.PDA_Manifest
|
||||
return data
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
else
|
||||
var/contents = {"<h4>Crew Manifest</h4>
|
||||
<br>
|
||||
[data_core ? data_core.get_manifest(0) : ""]
|
||||
[GLOB.data_core ? GLOB.data_core.get_manifest(0) : ""]
|
||||
"}
|
||||
if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", stationtime2text())))
|
||||
to_chat(ui.user, span_notice("Hardware error: Printer was unable to print the file. It may be out of paper."))
|
||||
@@ -166,7 +166,7 @@
|
||||
if("modify")
|
||||
if(computer && computer.card_slot)
|
||||
if(id_card)
|
||||
data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.rank)
|
||||
GLOB.data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.rank)
|
||||
computer.proc_eject_id(ui.user)
|
||||
. = TRUE
|
||||
if("terminate")
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
R.fields["y"] = S.y
|
||||
known_sectors[S.name] = R
|
||||
// SENSORS
|
||||
for(var/obj/machinery/shipsensors/S in global.machines)
|
||||
for(var/obj/machinery/shipsensors/S in GLOB.machines)
|
||||
if(linked.check_ownership(S))
|
||||
sensors = S
|
||||
break
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
return
|
||||
if(T)
|
||||
levels += 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")
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
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.z in map_levels))
|
||||
continue
|
||||
if(breaker.RCon_tag != "NO_TAG")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(!z)
|
||||
return
|
||||
var/valid_z_levels = using_map.get_map_levels(z)
|
||||
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