\nCriminal Status: []", active2.fields["criminal"])
P.info += " \n \nMinor Crimes: \n"
@@ -408,10 +408,10 @@ What a mess.*/
while(active2.fields[text("com_[]", counter)])
P.info += text("[] ", active2.fields[text("com_[]", counter)])
counter++
- P.name = text("SR-[] '[]'", data_core.securityPrintCount, active1.fields["name"])
+ P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, active1.fields["name"])
else
P.info += "Security Record Lost! "
- P.name = text("SR-[] '[]'", data_core.securityPrintCount, "Record Lost")
+ P.name = text("SR-[] '[]'", GLOB.data_core.securityPrintCount, "Record Lost")
P.info += ""
printing = null
if("Print Poster")
@@ -439,7 +439,7 @@ What a mess.*/
playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1)
printing = 1
sleep(30)
- if((istype(active1, /datum/data/record) && data_core.general.Find(active1)))//make sure the record still exists.
+ if((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)))//make sure the record still exists.
var/obj/item/weapon/photo/photo = active1.fields["photo_front"]
new /obj/item/weapon/poster/wanted(src.loc, photo.img, wanted_name, info)
printing = 0
@@ -453,9 +453,9 @@ What a mess.*/
if("Purge All Records")
investigate_log("[usr.name] ([usr.key]) has purged all the security records.", "records")
- for(var/datum/data/record/R in data_core.security)
+ for(var/datum/data/record/R in GLOB.data_core.security)
qdel(R)
- data_core.security.Cut()
+ GLOB.data_core.security.Cut()
temp = "All Security records deleted."
if("Add Entry")
@@ -468,7 +468,7 @@ What a mess.*/
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
- active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], [] []", src.authenticated, src.rank, worldtime2text(), time2text(world.realtime, "MMM DD"), year_integer+540, t1)
+ active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], [] []", src.authenticated, src.rank, worldtime2text(), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
if("Delete Record (ALL)")
if(active1)
@@ -496,7 +496,7 @@ What a mess.*/
R.fields["mi_crim"] = list()
R.fields["ma_crim"] = list()
R.fields["notes"] = "No notes."
- data_core.security += R
+ GLOB.data_core.security += R
active2 = R
screen = 3
@@ -515,7 +515,7 @@ What a mess.*/
G.fields["fingerprint"] = "?????"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
- data_core.general += G
+ GLOB.data_core.general += G
active1 = G
//Security Record
@@ -527,7 +527,7 @@ What a mess.*/
R.fields["mi_crim"] = list()
R.fields["ma_crim"] = list()
R.fields["notes"] = "No notes."
- data_core.security += R
+ GLOB.data_core.security += R
active2 = R
//Medical Record
@@ -545,7 +545,7 @@ What a mess.*/
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = "No notes."
- data_core.medical += M
+ GLOB.data_core.medical += M
@@ -593,7 +593,7 @@ What a mess.*/
active1.fields["age"] = t1
if("species")
if(istype(active1, /datum/data/record))
- var/t1 = input("Select a species", "Species Selection") as null|anything in roundstart_species
+ var/t1 = input("Select a species", "Species Selection") as null|anything in GLOB.roundstart_species
if(!canUseSecurityRecordsConsole(usr, t1, a1))
return
active1.fields["species"] = t1
@@ -623,28 +623,28 @@ What a mess.*/
var/t2 = stripped_multiline_input(usr, "Please input minor crime details:", "Secure. records", "", null)
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
return
- var/crime = data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
- data_core.addMinorCrime(active1.fields["id"], crime)
+ var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
+ GLOB.data_core.addMinorCrime(active1.fields["id"], crime)
if("mi_crim_delete")
if(istype(active1, /datum/data/record))
if(href_list["cdataid"])
if(!canUseSecurityRecordsConsole(usr, "delete", null, a2))
return
- data_core.removeMinorCrime(active1.fields["id"], href_list["cdataid"])
+ GLOB.data_core.removeMinorCrime(active1.fields["id"], href_list["cdataid"])
if("ma_crim_add")
if(istype(active1, /datum/data/record))
var/t1 = stripped_input(usr, "Please input major crime names:", "Secure. records", "", null)
var/t2 = stripped_multiline_input(usr, "Please input major crime details:", "Secure. records", "", null)
if(!canUseSecurityRecordsConsole(usr, t1, null, a2))
return
- var/crime = data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
- data_core.addMajorCrime(active1.fields["id"], crime)
+ var/crime = GLOB.data_core.createCrimeEntry(t1, t2, authenticated, worldtime2text())
+ GLOB.data_core.addMajorCrime(active1.fields["id"], crime)
if("ma_crim_delete")
if(istype(active1, /datum/data/record))
if(href_list["cdataid"])
if(!canUseSecurityRecordsConsole(usr, "delete", null, a2))
return
- data_core.removeMajorCrime(active1.fields["id"], href_list["cdataid"])
+ GLOB.data_core.removeMajorCrime(active1.fields["id"], href_list["cdataid"])
if("notes")
if(istype(active2, /datum/data/record))
var/t1 = stripped_input(usr, "Please summarize notes:", "Secure. records", active2.fields["notes"], null)
@@ -697,7 +697,7 @@ What a mess.*/
if("released")
active2.fields["criminal"] = "Discharged"
investigate_log("[active1.fields["name"]] has been set from [old_field] to [active2.fields["criminal"]] by [usr.name] ([usr.key]).", "records")
- for(var/mob/living/carbon/human/H in mob_list) //thanks for forcing me to do this, whoever wrote this shitty records system
+ for(var/mob/living/carbon/human/H in GLOB.mob_list) //thanks for forcing me to do this, whoever wrote this shitty records system
H.sec_hud_set_security_status()
if("Delete Record (Security) Execute")
investigate_log("[usr.name] ([usr.key]) has deleted the security records for [active1.fields["name"]].", "records")
@@ -708,7 +708,7 @@ What a mess.*/
if("Delete Record (ALL) Execute")
if(active1)
investigate_log("[usr.name] ([usr.key]) has deleted all records for [active1.fields["name"]].", "records")
- for(var/datum/data/record/R in data_core.medical)
+ for(var/datum/data/record/R in GLOB.data_core.medical)
if((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
qdel(R)
break
@@ -742,14 +742,14 @@ What a mess.*/
..(severity)
return
- for(var/datum/data/record/R in data_core.security)
+ for(var/datum/data/record/R in GLOB.data_core.security)
if(prob(10/severity))
switch(rand(1,8))
if(1)
if(prob(10))
R.fields["name"] = "[pick(lizard_name(MALE),lizard_name(FEMALE))]"
else
- R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
@@ -761,9 +761,9 @@ What a mess.*/
if(6)
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
if(7)
- R.fields["species"] = pick(roundstart_species)
+ R.fields["species"] = pick(GLOB.roundstart_species)
if(8)
- var/datum/data/record/G = pick(data_core.general)
+ var/datum/data/record/G = pick(GLOB.data_core.general)
R.fields["photo_front"] = G.fields["photo_front"]
R.fields["photo_side"] = G.fields["photo_side"]
continue
diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm
index 5b8a69e7559fd..443c0c1fdf548 100644
--- a/code/game/machinery/computer/station_alert.dm
+++ b/code/game/machinery/computer/station_alert.dm
@@ -9,7 +9,7 @@
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/station_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = default_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "station_alert", name, 300, 500, master_ui, state)
diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm
index 75e163a9c46bc..1515c1f32fb6f 100644
--- a/code/game/machinery/computer/telecrystalconsoles.dm
+++ b/code/game/machinery/computer/telecrystalconsoles.dm
@@ -1,6 +1,6 @@
#define NUKESCALINGMODIFIER 1
-var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","Foxtrot","Zero", "Niner")
+GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","Echo","Foxtrot","Zero", "Niner"))
/obj/machinery/computer/telecrystals
name = "\improper Telecrystal assignment station"
@@ -24,7 +24,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
/obj/machinery/computer/telecrystals/uplinker/Initialize()
..()
- var/ID = pick_n_take(possible_uplinker_IDs)
+ var/ID = pick_n_take(GLOB.possible_uplinker_IDs)
if(!ID)
ID = rand(1,999)
name = "[name] [ID]"
@@ -144,8 +144,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
..()
- var/danger
- danger = joined_player_list.len - SSticker.mode.syndicates.len
+ var/danger = GLOB.joined_player_list.len - SSticker.mode.syndicates.len
danger = Ceiling(danger, 10)
scaleTC(danger)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index ff599d0de5235..df5366024b429 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -41,7 +41,6 @@
#define ELECTRIFIED_PERMANENT -1
-var/list/airlock_overlays = list()
/obj/machinery/door/airlock
name = "airlock"
@@ -95,12 +94,14 @@ var/list/airlock_overlays = list()
var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close
var/prying_so_hard = FALSE
+ var/static/list/airlock_overlays = list()
+
/obj/machinery/door/airlock/Initialize()
..()
wires = new /datum/wires/airlock(src)
if(src.closeOtherId != null)
spawn (5)
- for (var/obj/machinery/door/airlock/A in airlocks)
+ for (var/obj/machinery/door/airlock/A in GLOB.airlocks)
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
@@ -115,7 +116,7 @@ var/list/airlock_overlays = list()
if(damage_deflection == AIRLOCK_DAMAGE_DEFLECTION_N && security_level > AIRLOCK_SECURITY_METAL)
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R
prepare_huds()
- var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
+ var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC]
diag_hud.add_to_hud(src)
diag_hud_set_electrified()
@@ -212,7 +213,7 @@ var/list/airlock_overlays = list()
cyclelinkedairlock.cyclelinkedairlock = null
cyclelinkedairlock = null
if(id_tag)
- for(var/obj/machinery/doorButtons/D in machines)
+ for(var/obj/machinery/doorButtons/D in GLOB.machines)
D.removeMe(src)
return ..()
@@ -491,6 +492,9 @@ var/list/airlock_overlays = list()
add_overlay(damag_overlay)
/proc/get_airlock_overlay(icon_state, icon_file)
+ var/obj/machinery/door/airlock/A
+ pass(A) //suppress unused warning
+ var/list/airlock_overlays = A.airlock_overlays
var/iconkey = "[icon_state][icon_file]"
if(airlock_overlays[iconkey])
return airlock_overlays[iconkey]
diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm
index 9771c9176389a..705eafa381579 100644
--- a/code/game/machinery/doors/airlock_electronics.dm
+++ b/code/game/machinery/doors/airlock_electronics.dm
@@ -1,12 +1,12 @@
/obj/item/weapon/electronics/airlock
name = "airlock electronics"
- req_access = list(access_maint_tunnels)
+ req_access = list(GLOB.access_maint_tunnels)
var/list/accesses = list()
var/one_access = 0
/obj/item/weapon/electronics/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = hands_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "airlock_electronics", name, 975, 420, master_ui, state)
diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm
index 65a25732c77bf..0966916559d53 100644
--- a/code/game/machinery/doors/alarmlock.dm
+++ b/code/game/machinery/doors/alarmlock.dm
@@ -24,7 +24,7 @@
/obj/machinery/door/airlock/alarmlock/Initialize()
..()
SSradio.remove_object(src, air_frequency)
- air_connection = SSradio.add_object(src, air_frequency, RADIO_TO_AIRALARM)
+ air_connection = SSradio.add_object(src, air_frequency, GLOB.RADIO_TO_AIRALARM)
open()
/obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index af0a4940e70d0..f2ed267e4ee5f 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -23,7 +23,7 @@
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
desc = "A remote control for a door."
- req_access = list(access_security)
+ req_access = list(GLOB.access_security)
anchored = 1
density = 0
var/id = null // id of linked machinery/lockers
@@ -112,8 +112,8 @@
return 0
if(!forced)
- Radio.set_frequency(SEC_FREQ)
- Radio.talk_into(src, "Timer has expired. Releasing prisoner.", SEC_FREQ, get_default_language())
+ Radio.set_frequency(GLOB.SEC_FREQ)
+ Radio.talk_into(src, "Timer has expired. Releasing prisoner.", GLOB.SEC_FREQ, get_default_language())
timing = FALSE
activation_time = null
@@ -147,7 +147,7 @@
timer_duration = new_time
/obj/machinery/door_timer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = default_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "brig_timer", name, 300, 200, master_ui, state)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index a30e24d3c426a..c57c210855a10 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -40,7 +40,7 @@
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
update_freelook_sight()
air_update_turf(1)
- airlocks += src
+ GLOB.airlocks += src
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(2, 1, src)
@@ -50,7 +50,7 @@
density = 0
air_update_turf(1)
update_freelook_sight()
- airlocks -= src
+ GLOB.airlocks -= src
if(spark_system)
qdel(spark_system)
spark_system = null
@@ -314,8 +314,8 @@
return !(stat & NOPOWER)
/obj/machinery/door/proc/update_freelook_sight()
- if(!glass && cameranet)
- cameranet.updateVisibility(src, 0)
+ if(!glass && GLOB.cameranet)
+ GLOB.cameranet.updateVisibility(src, 0)
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
if(opacity || heat_proof)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index d8f480ca7f541..42685bee61ff9 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -4,9 +4,6 @@
#define CONSTRUCTION_GUTTED 3 //Wires are removed, circuit ready to remove
#define CONSTRUCTION_NOCIRCUIT 4 //Circuit board removed, can safely weld apart
-/var/const/OPEN = 1
-/var/const/CLOSED = 2
-
/obj/machinery/door/firedoor
name = "firelock"
desc = "Apply crowbar."
@@ -183,10 +180,10 @@
if(operating || stat & NOPOWER || !nextstate)
return
switch(nextstate)
- if(OPEN)
+ if(FIREDOOR_OPEN)
nextstate = null
open()
- if(CLOSED)
+ if(FIREDOOR_CLOSED)
nextstate = null
close()
@@ -422,4 +419,4 @@
/obj/structure/firelock_frame/heavy
name = "heavy firelock frame"
- reinforced = 1
+ reinforced = 1
\ No newline at end of file
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index fb06454d41019..47e18f32e68b1 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -344,7 +344,7 @@
open()
/obj/machinery/door/window/clockwork/ratvar_act()
- if(ratvar_awakens)
+ if(GLOB.ratvar_awakens)
obj_integrity = max_integrity
/obj/machinery/door/window/clockwork/hasPower()
diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm
index 13754e4a1956d..2a710ded2fc4d 100644
--- a/code/game/machinery/doppler_array.dm
+++ b/code/game/machinery/doppler_array.dm
@@ -1,4 +1,4 @@
-var/list/doppler_arrays = list()
+GLOBAL_LIST_EMPTY(doppler_arrays)
/obj/machinery/doppler_array
name = "tachyon-doppler array"
@@ -13,10 +13,10 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array/New()
..()
- doppler_arrays += src
+ GLOB.doppler_arrays += src
/obj/machinery/doppler_array/Destroy()
- doppler_arrays -= src
+ GLOB.doppler_arrays -= src
return ..()
/obj/machinery/doppler_array/process()
diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm
index 2f67440e2400b..8fcdc7c4a3ae0 100644
--- a/code/game/machinery/embedded_controller/access_controller.dm
+++ b/code/game/machinery/embedded_controller/access_controller.dm
@@ -47,11 +47,11 @@
var/busy
/obj/machinery/doorButtons/access_button/findObjsByTag()
- for(var/obj/machinery/doorButtons/airlock_controller/A in machines)
+ for(var/obj/machinery/doorButtons/airlock_controller/A in GLOB.machines)
if(A.idSelf == idSelf)
controller = A
break
- for(var/obj/machinery/door/airlock/I in machines)
+ for(var/obj/machinery/door/airlock/I in GLOB.machines)
if(I.id_tag == idDoor)
door = I
break
@@ -120,7 +120,7 @@
exteriorAirlock = null
/obj/machinery/doorButtons/airlock_controller/Destroy()
- for(var/obj/machinery/doorButtons/access_button/A in machines)
+ for(var/obj/machinery/doorButtons/access_button/A in GLOB.machines)
if(A.controller == src)
A.controller = null
return ..()
@@ -241,7 +241,7 @@
update_icon()
/obj/machinery/doorButtons/airlock_controller/findObjsByTag()
- for(var/obj/machinery/door/airlock/A in machines)
+ for(var/obj/machinery/door/airlock/A in GLOB.machines)
if(A.id_tag == idInterior)
interiorAirlock = A
else if(A.id_tag == idExterior)
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 2d079432a894a..6cfb84498113f 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -63,7 +63,7 @@
return
if(src.z == ZLEVEL_STATION)
- add_overlay("overlay_[security_level]")
+ add_overlay("overlay_[GLOB.security_level]")
else
//var/green = SEC_LEVEL_GREEN
add_overlay("overlay_[SEC_LEVEL_GREEN]")
@@ -111,7 +111,7 @@
addtimer(CALLBACK(src, .proc/reset), time)
/obj/machinery/firealarm/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = default_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "firealarm", name, 300, 150, master_ui, state)
diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm
index 826d707f0ac84..61d1588372a8d 100644
--- a/code/game/machinery/gulag_item_reclaimer.dm
+++ b/code/game/machinery/gulag_item_reclaimer.dm
@@ -3,7 +3,7 @@
desc = "Used to reclaim your items after you finish your sentence at the labor camp"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_taken"
- req_access = list(access_security) //reqaccess to access all stored items
+ req_access = list(GLOB.access_security) //reqaccess to access all stored items
density = 0
anchored = 1
use_power = 1
@@ -43,7 +43,7 @@
return ..()
/obj/machinery/gulag_item_reclaimer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = default_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "gulag_item_reclaimer", name, 455, 440, master_ui, state)
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 6a5a2da8c34f8..fc97dfdb983d9 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -29,9 +29,7 @@ Possible to do for anyone motivated enough:
#define RANGE_BASED 4
#define AREA_BASED 6
-var/const/HOLOPAD_MODE = RANGE_BASED
-
-var/list/holopads = list()
+#define HOLOPAD_MODE RANGE_BASED
/obj/machinery/holopad
name = "\improper AI holopad"
@@ -50,6 +48,7 @@ var/list/holopads = list()
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
var/temp = ""
+ var/static/list/holopads = list()
/obj/machinery/holopad/New()
..()
@@ -121,7 +120,7 @@ var/list/holopads = list()
temp = "You requested an AI's presence. "
temp += "Main Menu"
var/area/area = get_area(src)
- for(var/mob/living/silicon/ai/AI in living_mob_list)
+ for(var/mob/living/silicon/ai/AI in GLOB.living_mob_list)
if(!AI.client)
continue
to_chat(AI, "Your presence is requested at \the [area].")
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 5e57532c79a07..137a492b3a96a 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -128,7 +128,7 @@ Class Procs:
if (!armor)
armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
..()
- machines += src
+ GLOB.machines += src
if(!speed_process)
START_PROCESSING(SSmachines, src)
else
@@ -136,7 +136,7 @@ Class Procs:
power_change()
/obj/machinery/Destroy()
- machines.Remove(src)
+ GLOB.machines.Remove(src)
if(!speed_process)
STOP_PROCESSING(SSmachines, src)
else
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 473ed97e0c6fb..41917d8eb416b 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -37,7 +37,7 @@
spawn(10) // must wait for map loading to finish
if(SSradio)
- SSradio.add_object(src, freq, RADIO_MAGNETS)
+ SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS)
spawn()
magnetic_process()
@@ -233,14 +233,14 @@
..()
if(autolink)
- for(var/obj/machinery/magnetic_module/M in machines)
+ for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
spawn(45) // must wait for map loading to finish
if(SSradio)
- radio_connection = SSradio.add_object(src, frequency, RADIO_MAGNETS)
+ radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_MAGNETS)
if(path) // check for default path
@@ -255,7 +255,7 @@
/obj/machinery/magnetic_controller/process()
if(magnets.len == 0 && autolink)
- for(var/obj/machinery/magnetic_module/M in machines)
+ for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
@@ -323,7 +323,7 @@
// Broadcast the signal
- radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
+ radio_connection.post_signal(src, signal, filter = GLOB.RADIO_MAGNETS)
spawn(1)
updateUsrDialog() // pretty sure this increases responsiveness
@@ -390,7 +390,7 @@
// Broadcast the signal
spawn()
- radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
+ radio_connection.post_signal(src, signal, filter = GLOB.RADIO_MAGNETS)
if(speed == 10)
sleep(1)
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index ea502741345d7..2c460705218ad 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -21,7 +21,7 @@
var/list/codes // assoc. list of transponder codes
var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value"
- req_access = list(access_engine, access_robotics)
+ req_access = list(GLOB.access_engine, GLOB.access_robotics)
/obj/machinery/navbeacon/New()
..()
@@ -31,16 +31,16 @@
var/turf/T = loc
hide(T.intact)
if(codes["patrol"])
- if(!navbeacons["[z]"])
- navbeacons["[z]"] = list()
- navbeacons["[z]"] += src //Register with the patrol list!
+ if(!GLOB.navbeacons["[z]"])
+ GLOB.navbeacons["[z]"] = list()
+ GLOB.navbeacons["[z]"] += src //Register with the patrol list!
if(codes["delivery"])
- deliverybeacons += src
- deliverybeacontags += location
+ GLOB.deliverybeacons += src
+ GLOB.deliverybeacontags += location
/obj/machinery/navbeacon/Destroy()
- navbeacons["[z]"] -= src //Remove from beacon list, if in one.
- deliverybeacons -= src
+ GLOB.navbeacons["[z]"] -= src //Remove from beacon list, if in one.
+ GLOB.deliverybeacons -= src
return ..()
// set the transponder codes assoc list from codes_txt
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 1fbbfbb41b57a..a50a2973fcada 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -1,5 +1,5 @@
-var/datum/newscaster/feed_network/news_network = new /datum/newscaster/feed_network
-var/list/obj/machinery/newscaster/allCasters = list()
+GLOBAL_DATUM_INIT(news_network, /datum/newscaster/feed_network, new)
+GLOBAL_LIST_EMPTY(allCasters)
/datum/newscaster
@@ -26,7 +26,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
/datum/newscaster/feed_message/proc/returnAuthor(censor)
if(censor == -1)
censor = authorCensor
- var/txt = "[news_network.redactedText]"
+ var/txt = "[GLOB.news_network.redactedText]"
if(!censor)
txt = author
return txt
@@ -34,26 +34,26 @@ var/list/obj/machinery/newscaster/allCasters = list()
/datum/newscaster/feed_message/proc/returnBody(censor)
if(censor == -1)
censor = bodyCensor
- var/txt = "[news_network.redactedText]"
+ var/txt = "[GLOB.news_network.redactedText]"
if(!censor)
txt = body
return txt
/datum/newscaster/feed_message/proc/toggleCensorAuthor()
if(authorCensor)
- authorCensorTime.Add(news_network.lastAction*-1)
+ authorCensorTime.Add(GLOB.news_network.lastAction*-1)
else
- authorCensorTime.Add(news_network.lastAction)
+ authorCensorTime.Add(GLOB.news_network.lastAction)
authorCensor = !authorCensor
- news_network.lastAction ++
+ GLOB.news_network.lastAction ++
/datum/newscaster/feed_message/proc/toggleCensorBody()
if(bodyCensor)
- bodyCensorTime.Add(news_network.lastAction*-1)
+ bodyCensorTime.Add(GLOB.news_network.lastAction*-1)
else
- bodyCensorTime.Add(news_network.lastAction)
+ bodyCensorTime.Add(GLOB.news_network.lastAction)
bodyCensor = !bodyCensor
- news_network.lastAction ++
+ GLOB.news_network.lastAction ++
/datum/newscaster/feed_channel
var/channel_name = ""
@@ -69,26 +69,26 @@ var/list/obj/machinery/newscaster/allCasters = list()
/datum/newscaster/feed_channel/proc/returnAuthor(censor)
if(censor == -1)
censor = authorCensor
- var/txt = "[news_network.redactedText]"
+ var/txt = "[GLOB.news_network.redactedText]"
if(!censor)
txt = author
return txt
/datum/newscaster/feed_channel/proc/toggleCensorDclass()
if(censored)
- DclassCensorTime.Add(news_network.lastAction*-1)
+ DclassCensorTime.Add(GLOB.news_network.lastAction*-1)
else
- DclassCensorTime.Add(news_network.lastAction)
+ DclassCensorTime.Add(GLOB.news_network.lastAction)
censored = !censored
- news_network.lastAction ++
+ GLOB.news_network.lastAction ++
/datum/newscaster/feed_channel/proc/toggleCensorAuthor()
if(authorCensor)
- authorCensorTime.Add(news_network.lastAction*-1)
+ authorCensorTime.Add(GLOB.news_network.lastAction*-1)
else
- authorCensorTime.Add(news_network.lastAction)
+ authorCensorTime.Add(GLOB.news_network.lastAction)
authorCensor = !authorCensor
- news_network.lastAction ++
+ GLOB.news_network.lastAction ++
/datum/newscaster/wanted_message
var/active
@@ -130,7 +130,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(FC.channel_name == channel_name)
FC.messages += newMsg
break
- for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
+ for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.newsAlert(channel_name)
lastAction ++
newMsg.creationTime = lastAction
@@ -144,7 +144,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(photo)
wanted_issue.img = photo.img
if(newMessage)
- for(var/obj/machinery/newscaster/N in allCasters)
+ for(var/obj/machinery/newscaster/N in GLOB.allCasters)
N.newsAlert()
N.update_icon()
@@ -154,7 +154,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
wanted_issue.body = null
wanted_issue.scannedUser = null
wanted_issue.img = null
- for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
+ for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.update_icon()
@@ -205,13 +205,13 @@ var/list/obj/machinery/newscaster/allCasters = list()
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0
- allCasters += src
- for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
+ GLOB.allCasters += src
+ for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
unit_no++
update_icon()
/obj/machinery/newscaster/Destroy()
- allCasters -= src
+ GLOB.allCasters -= src
viewing_channel = null
photo = null
return ..()
@@ -221,7 +221,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(stat & (NOPOWER|BROKEN))
icon_state = "newscaster_off"
else
- if(news_network.wanted_issue.active)
+ if(GLOB.news_network.wanted_issue.active)
icon_state = "newscaster_wanted"
else
icon_state = "newscaster_normal"
@@ -268,7 +268,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(0)
dat += "Welcome to Newscasting Unit #[unit_no]. Interface & News networks Operational."
dat += " Property of Nanotrasen Inc"
- if(news_network.wanted_issue.active)
+ if(GLOB.news_network.wanted_issue.active)
dat+= "Read Wanted Issue"
dat+= " Create Feed Channel"
dat+= " View Feed Channels"
@@ -278,7 +278,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+= "
Exit"
if(securityCaster)
var/wanted_already = 0
- if(news_network.wanted_issue.active)
+ if(GLOB.news_network.wanted_issue.active)
wanted_already = 1
dat+="Feed Security functions: "
dat+=" [(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue"
@@ -287,10 +287,10 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+=" The newscaster recognises you as: [scanned_user]"
if(1)
dat+= "Station Feed Channels"
- if( isemptylist(news_network.network_channels) )
+ if( isemptylist(GLOB.news_network.network_channels) )
dat+="No active channels found..."
else
- for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
if(CHANNEL.is_admin_channel)
dat+="[CHANNEL.channel_name] "
else
@@ -329,9 +329,9 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(7)
dat+="ERROR: Could not submit Feed Channel to Network. "
var/list/existing_authors = list()
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.authorCensor)
- existing_authors += news_network.redactedText
+ existing_authors += GLOB.news_network.redactedText
else
existing_authors += FC.author
if(scanned_user in existing_authors)
@@ -339,7 +339,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(channel_name=="" || channel_name == "\[REDACTED\]")
dat+="Invalid channel name. "
var/check = 0
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == channel_name)
check = 1
break
@@ -349,10 +349,10 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="Channel author unverified. "
dat+=" Return "
if(8)
- var/total_num=length(news_network.network_channels)
+ var/total_num=length(GLOB.news_network.network_channels)
var/active_num=total_num
var/message_num=0
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(!FC.censored)
message_num += length(FC.messages)
else
@@ -395,10 +395,10 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible. "
dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it."
dat+="Select Feed channel to get Stories from: "
- if(isemptylist(news_network.network_channels))
+ if(isemptylist(GLOB.news_network.network_channels))
dat+="No feed channels found active... "
else
- for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()] "
dat+=" Cancel"
if(11)
@@ -406,10 +406,10 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's"
dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed"
dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time."
- if(isemptylist(news_network.network_channels))
+ if(isemptylist(GLOB.news_network.network_channels))
dat+="No feed channels found active... "
else
- for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()] "
dat+=" Back"
if(12)
@@ -442,7 +442,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="Wanted Issue Handler:"
var/wanted_already = 0
var/end_param = 1
- if(news_network.wanted_issue.active)
+ if(GLOB.news_network.wanted_issue.active)
wanted_already = 1
end_param = 2
if(wanted_already)
@@ -452,7 +452,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="Description: [msg] "
dat+="Attach Photo: [(photo ? "Photo Attached" : "No Photo")]"
if(wanted_already)
- dat+="Wanted Issue created by:[news_network.wanted_issue.scannedUser] "
+ dat+="Wanted Issue created by:[GLOB.news_network.wanted_issue.scannedUser] "
else
dat+="Wanted Issue will be created under prosecutor:[scanned_user] "
dat+=" [(wanted_already) ? ("Edit Issue") : ("Submit")]"
@@ -475,13 +475,13 @@ var/list/obj/machinery/newscaster/allCasters = list()
dat+="Wanted Issue successfully deleted from Circulation "
dat+=" Return "
if(18)
- if(news_network.wanted_issue.active)
- dat+="-- STATIONWIDE WANTED ISSUE -- \[Submitted by: [news_network.wanted_issue.scannedUser]\]"
- dat+="Criminal: [news_network.wanted_issue.criminal] "
- dat+="Description: [news_network.wanted_issue.body] "
+ if(GLOB.news_network.wanted_issue.active)
+ dat+="-- STATIONWIDE WANTED ISSUE -- \[Submitted by: [GLOB.news_network.wanted_issue.scannedUser]\]"
+ dat+="Criminal: [GLOB.news_network.wanted_issue.criminal] "
+ dat+="Description: [GLOB.news_network.wanted_issue.body] "
dat+="Photo:: "
- if(news_network.wanted_issue.img)
- usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
+ if(GLOB.news_network.wanted_issue.img)
+ usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png")
dat+=" "
else
dat+="None"
@@ -518,13 +518,13 @@ var/list/obj/machinery/newscaster/allCasters = list()
updateUsrDialog()
else if(href_list["submit_new_channel"])
var/list/existing_authors = list()
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.authorCensor)
- existing_authors += news_network.redactedText
+ existing_authors += GLOB.news_network.redactedText
else
existing_authors += FC.author
var/check = 0
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == channel_name)
check = 1
break
@@ -534,13 +534,13 @@ var/list/obj/machinery/newscaster/allCasters = list()
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
if(choice=="Confirm")
scan_user(usr)
- news_network.CreateFeedChannel(channel_name, scanned_user, c_locked)
+ GLOB.news_network.CreateFeedChannel(channel_name, scanned_user, c_locked)
feedback_inc("newscaster_channels",1)
screen=5
updateUsrDialog()
else if(href_list["set_channel_receiving"])
var/list/available_channels = list()
- for(var/datum/newscaster/feed_channel/F in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
if( (!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels
@@ -557,7 +557,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(msg =="" || msg=="\[REDACTED\]" || scanned_user == "Unknown" || channel_name == "" )
screen=6
else
- news_network.SubmitArticle("[parsepencode(msg, usr, SIGNFONT)]", scanned_user, channel_name, photo, 0, allow_comments)
+ GLOB.news_network.SubmitArticle("[parsepencode(msg, usr, SIGNFONT)]", scanned_user, channel_name, photo, 0, allow_comments)
feedback_inc("newscaster_stories",1)
screen=4
msg = ""
@@ -586,11 +586,11 @@ var/list/obj/machinery/newscaster/allCasters = list()
updateUsrDialog()
else if(href_list["menu_wanted"])
var/already_wanted = 0
- if(news_network.wanted_issue.active)
+ if(GLOB.news_network.wanted_issue.active)
already_wanted = 1
if(already_wanted)
- channel_name = news_network.wanted_issue.criminal
- msg = news_network.wanted_issue.body
+ channel_name = GLOB.news_network.wanted_issue.criminal
+ msg = GLOB.news_network.wanted_issue.body
screen = 14
updateUsrDialog()
else if(href_list["set_wanted_name"])
@@ -608,22 +608,22 @@ var/list/obj/machinery/newscaster/allCasters = list()
if(choice=="Confirm")
scan_user(usr)
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one.
- news_network.submitWanted(channel_name, msg, scanned_user, photo, 0 , 1)
+ GLOB.news_network.submitWanted(channel_name, msg, scanned_user, photo, 0 , 1)
screen = 15
else
- if(news_network.wanted_issue.isAdminMsg)
+ if(GLOB.news_network.wanted_issue.isAdminMsg)
alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot edit it.","Ok")
return
- news_network.submitWanted(channel_name, msg, scanned_user, photo)
+ GLOB.news_network.submitWanted(channel_name, msg, scanned_user, photo)
screen = 19
updateUsrDialog()
else if(href_list["cancel_wanted"])
- if(news_network.wanted_issue.isAdminMsg)
+ if(GLOB.news_network.wanted_issue.isAdminMsg)
alert("The wanted issue has been distributed by a Nanotrasen higherup. You cannot take it down.","Ok")
return
var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
- news_network.deleteWanted()
+ GLOB.news_network.deleteWanted()
screen=17
updateUsrDialog()
else if(href_list["view_wanted"])
@@ -852,16 +852,16 @@ var/list/obj/machinery/newscaster/allCasters = list()
/obj/machinery/newscaster/proc/print_paper()
feedback_inc("newscaster_newspapers_printed",1)
var/obj/item/weapon/newspaper/NEWSPAPER = new /obj/item/weapon/newspaper
- for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
+ for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
NEWSPAPER.news_content += FC
- if(news_network.wanted_issue.active)
- NEWSPAPER.wantedAuthor = news_network.wanted_issue.scannedUser
- NEWSPAPER.wantedCriminal = news_network.wanted_issue.criminal
- NEWSPAPER.wantedBody = news_network.wanted_issue.body
- if(news_network.wanted_issue.img)
- NEWSPAPER.wantedPhoto = news_network.wanted_issue.img
+ if(GLOB.news_network.wanted_issue.active)
+ NEWSPAPER.wantedAuthor = GLOB.news_network.wanted_issue.scannedUser
+ NEWSPAPER.wantedCriminal = GLOB.news_network.wanted_issue.criminal
+ NEWSPAPER.wantedBody = GLOB.news_network.wanted_issue.body
+ if(GLOB.news_network.wanted_issue.img)
+ NEWSPAPER.wantedPhoto = GLOB.news_network.wanted_issue.img
NEWSPAPER.loc = get_turf(src)
- NEWSPAPER.creationTime = news_network.lastAction
+ NEWSPAPER.creationTime = GLOB.news_network.lastAction
paper_remaining--
/obj/machinery/newscaster/proc/newsAlert(channel)
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index ca4a96f1dd2b7..11b21d275d34d 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -22,7 +22,7 @@ Buildable meters
var/flipped = 0
var/is_bent = 0
- var/global/list/pipe_types = list(
+ var/static/list/pipe_types = list(
PIPE_SIMPLE, \
PIPE_MANIFOLD, \
PIPE_4WAYMANIFOLD, \
@@ -73,7 +73,7 @@ Buildable meters
src.pipe_type = pipe_type
src.setDir(dir)
- if(src.dir in diagonals)
+ if(src.dir in GLOB.diagonals)
is_bent = 1
update()
@@ -81,7 +81,7 @@ Buildable meters
src.pixel_y = rand(-5, 5)
//update the name and icon of the pipe item depending on the type
-var/global/list/pipeID2State = list(
+GLOBAL_LIST_INIT(pipeID2State, list(
"[PIPE_SIMPLE]" = "simple", \
"[PIPE_MANIFOLD]" = "manifold", \
"[PIPE_4WAYMANIFOLD]" = "manifold4w", \
@@ -103,7 +103,7 @@ var/global/list/pipeID2State = list(
\
"[PIPE_GAS_FILTER]" = "filter", \
"[PIPE_GAS_MIXER]" = "mixer", \
-)
+))
/obj/item/pipe/proc/update()
var/list/nlist = list(\
@@ -133,7 +133,7 @@ var/global/list/pipeID2State = list(
)
//fix_pipe_type()
name = nlist["[pipe_type][is_bent ? "_b" : ""]"] + " fitting"
- icon_state = pipeID2State["[pipe_type]"]
+ icon_state = GLOB.pipeID2State["[pipe_type]"]
// rotate the pipe item clockwise
@@ -186,7 +186,7 @@ var/global/list/pipeID2State = list(
setDir(old_dir )//pipes changing direction when moved is just annoying and buggy
/obj/item/pipe/proc/unflip(direction)
- if(direction in diagonals)
+ if(direction in GLOB.diagonals)
return turn(direction, 45)
return direction
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index 29a3a57b98759..4caf258853270 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -12,7 +12,7 @@
use_power = 1 //this turret uses and requires power
idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power
active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power
- req_access = list(access_security)
+ req_access = list(GLOB.access_security)
power_channel = EQUIP //drains power from the EQUIPMENT channel
var/base_icon_state = "standard"
@@ -467,7 +467,7 @@
if(check_records) //if the turret can check the records, check if they are set to *Arrest* on records
var/perpname = perp.get_face_name(perp.get_id_name())
- var/datum/data/record/R = find_record("name", perpname, data_core.security)
+ var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
if(!R || (R.fields["criminal"] == "*Arrest*"))
threatcount += 4
@@ -634,7 +634,7 @@
var/locked = 1
var/control_area = null //can be area name, path or nothing.
var/ailock = 0 // AI cannot use this
- req_access = list(access_ai_upload)
+ req_access = list(GLOB.access_ai_upload)
var/list/obj/machinery/porta_turret/turrets = list()
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
@@ -656,7 +656,7 @@
if(!mapload)
return
if(control_area && istext(control_area))
- for(var/V in sortedAreas)
+ for(var/V in GLOB.sortedAreas)
var/area/A = V
if(A.name == control_area)
control_area = A
@@ -845,7 +845,7 @@
. = ..()
/obj/machinery/porta_turret/lasertag
- req_access = list(access_maint_tunnels, access_theatre)
+ req_access = list(GLOB.access_maint_tunnels, GLOB.access_theatre)
check_records = 0
criminals = 0
auth_weapons = 1
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index fa71f8e68de8e..0ebc0a096e649 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 5
active_power_usage = 1000
- req_access = list(access_robotics)
+ req_access = list(GLOB.access_robotics)
var/recharge_speed
var/repairs
state_open = 1
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index c81900c1cdb54..03a9bc2d0b916 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -1,4 +1,4 @@
-var/const/SAFETY_COOLDOWN = 100
+#define SAFETY_COOLDOWN 100
/obj/machinery/recycler
name = "recycler"
@@ -204,3 +204,5 @@ var/const/SAFETY_COOLDOWN = 100
/obj/item/weapon/paper/recycler
name = "paper - 'garbage duty instructions'"
info = "
New Assignment
You have been assigned to collect garbage from trash bins, located around the station. The crewmembers will put their trash into it and you will collect the said trash.
There is a recycling machine near your closet, inside maintenance; use it to recycle the trash for a small chance to get useful minerals. Then deliver these minerals to cargo or engineering. You are our last hope for a clean station, do not screw this up!"
+
+#undef SAFETY_COOLDOWN
\ No newline at end of file
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index ee72082f1eac2..fd494dd156053 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -1,10 +1,10 @@
/******************** Requests Console ********************/
/** Originally written by errorage, updated by: Carn, needs more work though. I just added some security fixes */
-var/req_console_assistance = list()
-var/req_console_supplies = list()
-var/req_console_information = list()
-var/list/obj/machinery/requests_console/allConsoles = list()
+GLOBAL_LIST_EMPTY(req_console_assistance)
+GLOBAL_LIST_EMPTY(req_console_supplies)
+GLOBAL_LIST_EMPTY(req_console_information)
+GLOBAL_LIST_EMPTY(allConsoles)
/obj/machinery/requests_console
name = "requests console"
@@ -91,46 +91,46 @@ var/list/obj/machinery/requests_console/allConsoles = list()
/obj/machinery/requests_console/Initialize()
..()
name = "\improper [department] requests console"
- allConsoles += src
+ GLOB.allConsoles += src
switch(departmentType)
if(1)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
+ if(!("[department]" in GLOB.req_console_assistance))
+ GLOB.req_console_assistance += department
if(2)
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
+ if(!("[department]" in GLOB.req_console_supplies))
+ GLOB.req_console_supplies += department
if(3)
- if(!("[department]" in req_console_information))
- req_console_information += department
+ if(!("[department]" in GLOB.req_console_information))
+ GLOB.req_console_information += department
if(4)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
+ if(!("[department]" in GLOB.req_console_assistance))
+ GLOB.req_console_assistance += department
+ if(!("[department]" in GLOB.req_console_supplies))
+ GLOB.req_console_supplies += department
if(5)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ if(!("[department]" in GLOB.req_console_assistance))
+ GLOB.req_console_assistance += department
+ if(!("[department]" in GLOB.req_console_information))
+ GLOB.req_console_information += department
if(6)
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ if(!("[department]" in GLOB.req_console_supplies))
+ GLOB.req_console_supplies += department
+ if(!("[department]" in GLOB.req_console_information))
+ GLOB.req_console_information += department
if(7)
- if(!("[department]" in req_console_assistance))
- req_console_assistance += department
- if(!("[department]" in req_console_supplies))
- req_console_supplies += department
- if(!("[department]" in req_console_information))
- req_console_information += department
+ if(!("[department]" in GLOB.req_console_assistance))
+ GLOB.req_console_assistance += department
+ if(!("[department]" in GLOB.req_console_supplies))
+ GLOB.req_console_supplies += department
+ if(!("[department]" in GLOB.req_console_information))
+ GLOB.req_console_information += department
Radio = new /obj/item/device/radio(src)
Radio.listening = 0
/obj/machinery/requests_console/Destroy()
QDEL_NULL(Radio)
- allConsoles -= src
+ GLOB.allConsoles -= src
return ..()
/obj/machinery/requests_console/attack_hand(mob/user)
@@ -142,7 +142,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(1) //req. assistance
dat += "Which department do you need assistance from?
"
dat += "
"
- for(var/dpt in req_console_assistance)
+ for(var/dpt in GLOB.req_console_assistance)
if (dpt != department)
dat += "
"
dat += "
[dpt]
"
@@ -157,7 +157,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(2) //req. supplies
dat += "Which department do you need supplies from?
"
dat += "
"
- for(var/dpt in req_console_supplies)
+ for(var/dpt in GLOB.req_console_supplies)
if (dpt != department)
dat += "
"
dat += "
[dpt]
"
@@ -172,7 +172,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(3) //relay information
dat += "Which department would you like to send information to?
"
dat += "
"
- for(var/dpt in req_console_information)
+ for(var/dpt in GLOB.req_console_information)
if (dpt != department)
dat += "
"
dat += "
[dpt]
"
@@ -193,7 +193,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
dat += "Continue "
if(8) //view messages
- for (var/obj/machinery/requests_console/Console in allConsoles)
+ for (var/obj/machinery/requests_console/Console in GLOB.allConsoles)
if (Console.department == department)
Console.newmessagepriority = 0
Console.update_icon()
@@ -304,7 +304,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(!announcementConsole)
return
minor_announce(message, "[department] Announcement:")
- news_network.SubmitArticle(message, department, "Station Announcements", null)
+ GLOB.news_network.SubmitArticle(message, department, "Station Announcements", null)
log_say("[key_name(usr)] has made a station announcement: [message]")
message_admins("[key_name_admin(usr)] has made a station announcement.")
announceAuth = 0
@@ -316,13 +316,13 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/radio_freq
switch(text2num(href_list["emergency"]))
if(1) //Security
- radio_freq = SEC_FREQ
+ radio_freq = GLOB.SEC_FREQ
emergency = "Security"
if(2) //Engineering
- radio_freq = ENG_FREQ
+ radio_freq = GLOB.ENG_FREQ
emergency = "Engineering"
if(3) //Medical
- radio_freq = MED_FREQ
+ radio_freq = GLOB.MED_FREQ
emergency = "Medical"
if(radio_freq)
Radio.set_frequency(radio_freq)
@@ -343,7 +343,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
screen = 7 //if it's successful, this will get overrwritten (7 = unsufccessfull, 6 = successfull)
if (sending)
var/pass = 0
- for (var/obj/machinery/message_server/MS in machines)
+ for (var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
pass = 1
@@ -352,24 +352,24 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/radio_freq = 0
switch(href_list["department"])
if("bridge")
- radio_freq = COMM_FREQ
+ radio_freq = GLOB.COMM_FREQ
if("medbay")
- radio_freq = MED_FREQ
+ radio_freq = GLOB.MED_FREQ
if("science")
- radio_freq = SCI_FREQ
+ radio_freq = GLOB.SCI_FREQ
if("engineering")
- radio_freq = ENG_FREQ
+ radio_freq = GLOB.ENG_FREQ
if("security")
- radio_freq = SEC_FREQ
+ radio_freq = GLOB.SEC_FREQ
if("cargobay" || "mining")
- radio_freq = SUPP_FREQ
+ radio_freq = GLOB.SUPP_FREQ
Radio.set_frequency(radio_freq)
var/authentic
if(msgVerified || msgStamped)
authentic = " (Authenticated)"
var/alert = ""
- for (var/obj/machinery/requests_console/Console in allConsoles)
+ for (var/obj/machinery/requests_console/Console in GLOB.allConsoles)
if (ckey(Console.department) == ckey(href_list["department"]))
switch(priority)
if(2) //High priority
@@ -515,7 +515,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
msgVerified = "Verified by [ID.registered_name] ([ID.assignment])"
updateUsrDialog()
if(screen == 10)
- if (access_RC_announce in ID.access)
+ if (GLOB.access_RC_announce in ID.access)
announceAuth = 1
else
announceAuth = 0
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 562328810bc8e..b6cea7c1cd6f1 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -81,7 +81,7 @@
opacity = 0
anchored = 0
pressure_resistance = 2*ONE_ATMOSPHERE
- req_access = list(access_engine)
+ req_access = list(GLOB.access_engine)
max_integrity = 100
obj_integrity = 100
var/active = 0
@@ -232,7 +232,7 @@
icon_state = "Shield_Gen"
anchored = 0
density = 1
- req_access = list(access_teleporter)
+ req_access = list(GLOB.access_teleporter)
flags = CONDUCT
use_power = 0
obj_integrity = 300
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 0f29c50de5568..df76fef5a9f51 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -175,7 +175,7 @@
return ..()
/obj/machinery/space_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "space_heater", name, 400, 305, master_ui, state)
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 5a924b2bfa2f8..5db4276333ff7 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -322,7 +322,7 @@
return ..()
/obj/machinery/suit_storage_unit/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
- datum/tgui/master_ui = null, datum/ui_state/state = notcontained_state)
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "suit_storage_unit", name, 400, 305, master_ui, state)
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 1531ca8844d3a..8fce85a04bbab 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -22,7 +22,7 @@
if(surplus() < 1500)
if(user) to_chat(user, "The connected wire doesn't have enough current.")
return
- for(var/obj/singularity/singulo in singularities)
+ for(var/obj/singularity/singulo in GLOB.singularities)
if(singulo.z == z)
singulo.target = src
icon_state = "[icontype]1"
@@ -32,7 +32,7 @@
/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null)
- for(var/obj/singularity/singulo in singularities)
+ for(var/obj/singularity/singulo in GLOB.singularities)
if(singulo.target == src)
singulo.target = null
icon_state = "[icontype]0"
@@ -88,7 +88,7 @@
add_load(1500)
if(cooldown <= world.time)
cooldown = world.time + 100
- for(var/obj/singularity/singulo in singularities)
+ for(var/obj/singularity/singulo in GLOB.singularities)
if(singulo.z == z)
say("The [singulo] is now [get_dist(src,singulo)] standard lengths away to the [dir2text(get_dir(src,singulo))]")
else
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index 6f7e7ec90254a..4d8ad29941397 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -533,7 +533,7 @@
/obj/item/device/syndicatedetonator/attack_self(mob/user)
if(timer < world.time)
- for(var/obj/machinery/syndicatebomb/B in machines)
+ for(var/obj/machinery/syndicatebomb/B in GLOB.machines)
if(B.active)
B.detonation_timer = world.time + BUTTON_DELAY
detonated++
@@ -545,7 +545,7 @@
var/area/A = get_area(T)
detonated--
var/log_str = "[ADMIN_LOOKUPFLW(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] [ADMIN_JMP(T)]."
- bombers += log_str
+ GLOB.bombers += log_str
message_admins(log_str)
log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name][COORD(T)]")
detonated = 0
diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm
index 566fe74f0f97a..84321a1760497 100644
--- a/code/game/machinery/telecomms/broadcasting.dm
+++ b/code/game/machinery/telecomms/broadcasting.dm
@@ -83,7 +83,7 @@
// --- Broadcast only to intercom devices ---
if(data == 1)
- for(var/obj/item/device/radio/intercom/R in all_radios["[freq]"])
+ for(var/obj/item/device/radio/intercom/R in GLOB.all_radios["[freq]"])
if(R.receive_range(freq, level) > -1)
radios += R
@@ -91,7 +91,7 @@
else if(data == 2)
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ for(var/obj/item/device/radio/R in GLOB.all_radios["[freq]"])
if(R.subspace_transmission)
continue
@@ -104,7 +104,7 @@
else if(data == 5)
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ for(var/obj/item/device/radio/R in GLOB.all_radios["[freq]"])
if(!R.independent)
continue
@@ -114,13 +114,13 @@
// --- Broadcast to ALL radio devices ---
else
- for(var/obj/item/device/radio/R in all_radios["[freq]"])
+ for(var/obj/item/device/radio/R in GLOB.all_radios["[freq]"])
if(R.receive_range(freq, level) > -1)
radios += R
var/freqtext = num2text(freq)
- for(var/obj/item/device/radio/R in all_radios["[SYND_FREQ]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving.
- if(R.receive_range(SYND_FREQ, list(R.z)) > -1 && freqtext in radiochannelsreverse)
+ for(var/obj/item/device/radio/R in GLOB.all_radios["[GLOB.SYND_FREQ]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving.
+ if(R.receive_range(GLOB.SYND_FREQ, list(R.z)) > -1 && freqtext in GLOB.reverseradiochannels)
radios |= R
// Get a list of mobs who can hear from the radios we collected.
@@ -130,7 +130,7 @@
if (R.client && R.client.holder && !(R.client.prefs.chat_toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
receive -= R
- for(var/mob/M in player_list)
+ for(var/mob/M in GLOB.player_list)
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTRADIO))
receive |= M
@@ -142,30 +142,30 @@
// --- This following recording is intended for research and feedback in the use of department radio channels ---
var/blackbox_msg = "[AM] [AM.say_quote(message, spans)]"
- if(istype(blackbox))
+ if(istype(GLOB.blackbox))
switch(freq)
if(1459)
- blackbox.msg_common += blackbox_msg
+ GLOB.blackbox.msg_common += blackbox_msg
if(1351)
- blackbox.msg_science += blackbox_msg
+ GLOB.blackbox.msg_science += blackbox_msg
if(1353)
- blackbox.msg_command += blackbox_msg
+ GLOB.blackbox.msg_command += blackbox_msg
if(1355)
- blackbox.msg_medical += blackbox_msg
+ GLOB.blackbox.msg_medical += blackbox_msg
if(1357)
- blackbox.msg_engineering += blackbox_msg
+ GLOB.blackbox.msg_engineering += blackbox_msg
if(1359)
- blackbox.msg_security += blackbox_msg
+ GLOB.blackbox.msg_security += blackbox_msg
if(1441)
- blackbox.msg_deathsquad += blackbox_msg
+ GLOB.blackbox.msg_deathsquad += blackbox_msg
if(1213)
- blackbox.msg_syndicate += blackbox_msg
+ GLOB.blackbox.msg_syndicate += blackbox_msg
if(1349)
- blackbox.msg_service += blackbox_msg
+ GLOB.blackbox.msg_service += blackbox_msg
if(1347)
- blackbox.msg_cargo += blackbox_msg
+ GLOB.blackbox.msg_cargo += blackbox_msg
else
- blackbox.messages += blackbox_msg
+ GLOB.blackbox.messages += blackbox_msg
spawn(50)
qdel(virt)
@@ -198,7 +198,7 @@
signal.frequency = 1459// Common channel
//#### Sending the signal to all subspace receivers ####//
- for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
+ for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
R.receive_signal(signal)
sleep(rand(10,25))
diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm
index ab71f51c57c1d..31cbe7412c64a 100644
--- a/code/game/machinery/telecomms/computers/logbrowser.dm
+++ b/code/game/machinery/telecomms/computers/logbrowser.dm
@@ -13,7 +13,7 @@
var/universal_translate = 0 // set to 1 if it can translate nonhuman speech
- req_access = list(access_tcomsat)
+ req_access = list(GLOB.access_tcomsat)
circuit = /obj/item/weapon/circuitboard/computer/comm_server
/obj/machinery/computer/telecomms/server/attack_hand(mob/user)
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 643efd81df45f..6568d14211a26 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -256,7 +256,7 @@
if(newfreq && canAccess(usr))
if(findtext(num2text(newfreq), "."))
newfreq *= 10 // shift the decimal one place
- if(newfreq == SYND_FREQ)
+ if(newfreq == GLOB.SYND_FREQ)
temp = "-% Error: Interference preventing filtering frequency: \"[newfreq] GHz\" %-"
else
if(!(newfreq in freq_listening) && newfreq < 10000)
diff --git a/code/game/machinery/telecomms/machines/allinone.dm b/code/game/machinery/telecomms/machines/allinone.dm
index 367a9896f01cd..5589a1be248e8 100644
--- a/code/game/machinery/telecomms/machines/allinone.dm
+++ b/code/game/machinery/telecomms/machines/allinone.dm
@@ -33,7 +33,7 @@
sleep(signal.data["slow"]) // simulate the network lag if necessary
/* ###### Broadcast a message using signal.data ###### */
- if(signal.frequency == SYND_FREQ) // if syndicate broadcast, just
+ if(signal.frequency == GLOB.SYND_FREQ) // if syndicate broadcast, just
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm
index 877f80dbcb7ac..dd83638c57744 100644
--- a/code/game/machinery/telecomms/machines/broadcaster.dm
+++ b/code/game/machinery/telecomms/machines/broadcaster.dm
@@ -5,8 +5,8 @@
They receive their message from a server after the message has been logged.
*/
-var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam
-var/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync
+GLOBAL_LIST_EMPTY(recentmessages) // global list of recent messages broadcasted : used to circumvent massive radio spam
+GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages list is kept in sync
/obj/machinery/telecomms/broadcaster
name = "subspace broadcaster"
@@ -38,9 +38,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
original.data["level"] = signal.data["level"]
var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
- if(signal_message in recentmessages)
+ if(signal_message in GLOB.recentmessages)
return
- recentmessages.Add(signal_message)
+ GLOB.recentmessages.Add(signal_message)
if(signal.data["slow"] > 0)
sleep(signal.data["slow"]) // simulate the network lag if necessary
@@ -73,11 +73,11 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
signal.data["realname"], 4, signal.data["compression"], signal.data["level"], signal.frequency, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"], signal.data["language"])
- if(!message_delay)
- message_delay = 1
+ if(!GLOB.message_delay)
+ GLOB.message_delay = 1
spawn(10)
- message_delay = 0
- recentmessages = list()
+ GLOB.message_delay = 0
+ GLOB.recentmessages = list()
/* --- Do a snazzy animation! --- */
flick("broadcaster_send", src)
@@ -100,8 +100,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/obj/machinery/telecomms/broadcaster/Destroy()
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
- if(message_delay)
- message_delay = 0
+ if(GLOB.message_delay)
+ GLOB.message_delay = 0
return ..()
diff --git a/code/game/machinery/telecomms/machines/bus.dm b/code/game/machinery/telecomms/machines/bus.dm
index ae43084253ec0..81392f956efa6 100644
--- a/code/game/machinery/telecomms/machines/bus.dm
+++ b/code/game/machinery/telecomms/machines/bus.dm
@@ -25,7 +25,7 @@
if(is_freq_listening(signal))
if(change_frequency)
- if(signal.frequency != SYND_FREQ)
+ if(signal.frequency != GLOB.SYND_FREQ)
signal.frequency = change_frequency
if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it
@@ -72,25 +72,25 @@
/obj/machinery/telecomms/bus/preset_one
id = "Bus 1"
network = "tcommsat"
- freq_listening = list(SCI_FREQ, MED_FREQ)
+ freq_listening = list(GLOB.SCI_FREQ, GLOB.MED_FREQ)
autolinkers = list("processor1", "science", "medical")
/obj/machinery/telecomms/bus/preset_two
id = "Bus 2"
network = "tcommsat"
- freq_listening = list(SUPP_FREQ,SERV_FREQ)
+ freq_listening = list(GLOB.SUPP_FREQ,GLOB.SERV_FREQ)
autolinkers = list("processor2", "supply", "service")
/obj/machinery/telecomms/bus/preset_three
id = "Bus 3"
network = "tcommsat"
- freq_listening = list(SEC_FREQ, COMM_FREQ)
+ freq_listening = list(GLOB.SEC_FREQ, GLOB.COMM_FREQ)
autolinkers = list("processor3", "security", "command")
/obj/machinery/telecomms/bus/preset_four
id = "Bus 4"
network = "tcommsat"
- freq_listening = list(ENG_FREQ)
+ freq_listening = list(GLOB.ENG_FREQ)
autolinkers = list("processor4", "engineering", "common")
/obj/machinery/telecomms/bus/preset_four/New()
diff --git a/code/game/machinery/telecomms/machines/receiver.dm b/code/game/machinery/telecomms/machines/receiver.dm
index f66d860664f18..1b872b5d15314 100644
--- a/code/game/machinery/telecomms/machines/receiver.dm
+++ b/code/game/machinery/telecomms/machines/receiver.dm
@@ -77,7 +77,7 @@
id = "Receiver A"
network = "tcommsat"
autolinkers = list("receiverA") // link to relay
- freq_listening = list(SCI_FREQ, MED_FREQ, SUPP_FREQ, SERV_FREQ) // science, medical, supply, service
+ freq_listening = list(GLOB.SCI_FREQ, GLOB.MED_FREQ, GLOB.SUPP_FREQ, GLOB.SERV_FREQ) // science, medical, supply, service
//--PRESET RIGHT--//
@@ -86,7 +86,7 @@
id = "Receiver B"
network = "tcommsat"
autolinkers = list("receiverB") // link to relay
- freq_listening = list(COMM_FREQ, ENG_FREQ, SEC_FREQ) //command, engineering, security
+ freq_listening = list(GLOB.COMM_FREQ, GLOB.ENG_FREQ, GLOB.SEC_FREQ) //command, engineering, security
//Common and other radio frequencies for people to freely use
/obj/machinery/telecomms/receiver/preset_right/New()
diff --git a/code/game/machinery/telecomms/machines/server.dm b/code/game/machinery/telecomms/machines/server.dm
index f26e7cfe4d02d..519e5771c135e 100644
--- a/code/game/machinery/telecomms/machines/server.dm
+++ b/code/game/machinery/telecomms/machines/server.dm
@@ -142,22 +142,22 @@
/obj/machinery/telecomms/server/presets/science
id = "Science Server"
- freq_listening = list(SCI_FREQ)
+ freq_listening = list(GLOB.SCI_FREQ)
autolinkers = list("science")
/obj/machinery/telecomms/server/presets/medical
id = "Medical Server"
- freq_listening = list(MED_FREQ)
+ freq_listening = list(GLOB.MED_FREQ)
autolinkers = list("medical")
/obj/machinery/telecomms/server/presets/supply
id = "Supply Server"
- freq_listening = list(SUPP_FREQ)
+ freq_listening = list(GLOB.SUPP_FREQ)
autolinkers = list("supply")
/obj/machinery/telecomms/server/presets/service
id = "Service Server"
- freq_listening = list(SERV_FREQ)
+ freq_listening = list(GLOB.SERV_FREQ)
autolinkers = list("service")
/obj/machinery/telecomms/server/presets/common
@@ -174,17 +174,17 @@
/obj/machinery/telecomms/server/presets/command
id = "Command Server"
- freq_listening = list(COMM_FREQ)
+ freq_listening = list(GLOB.COMM_FREQ)
autolinkers = list("command")
/obj/machinery/telecomms/server/presets/engineering
id = "Engineering Server"
- freq_listening = list(ENG_FREQ)
+ freq_listening = list(GLOB.ENG_FREQ)
autolinkers = list("engineering")
/obj/machinery/telecomms/server/presets/security
id = "Security Server"
- freq_listening = list(SEC_FREQ)
+ freq_listening = list(GLOB.SEC_FREQ)
autolinkers = list("security")
/obj/machinery/telecomms/server/presets/common/birdstation/New()
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index d7792ec314b7c..acbe6792b2d07 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -12,7 +12,7 @@
Look at radio.dm for the prequel to this code.
*/
-var/global/list/obj/machinery/telecomms/telecomms_list = list()
+GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms
icon = 'icons/obj/machines/telecomms.dmi'
@@ -134,7 +134,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/New()
- telecomms_list += src
+ GLOB.telecomms_list += src
..()
//Set the listening_level if there's none.
@@ -156,13 +156,13 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
for(var/obj/machinery/telecomms/T in urange(20, src, 1))
add_link(T)
else
- for(var/obj/machinery/telecomms/T in telecomms_list)
+ for(var/obj/machinery/telecomms/T in GLOB.telecomms_list)
add_link(T)
/obj/machinery/telecomms/Destroy()
- telecomms_list -= src
- for(var/obj/machinery/telecomms/comm in telecomms_list)
+ GLOB.telecomms_list -= src
+ for(var/obj/machinery/telecomms/comm in GLOB.telecomms_list)
comm.links -= src
links = list()
return ..()
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 55d9fac2eddda..396214d2245a4 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -165,7 +165,7 @@
var/list/L = list()
var/list/areaindex = list()
if(regime_set == "Teleporter")
- for(var/obj/item/device/radio/beacon/R in teleportbeacons)
+ for(var/obj/item/device/radio/beacon/R in GLOB.teleportbeacons)
var/turf/T = get_turf(R)
if(!T)
continue
@@ -173,7 +173,7 @@
continue
L[avoid_assoc_duplicate_keys(T.loc.name, areaindex)] = R
- for(var/obj/item/weapon/implant/tracking/I in tracked_implants)
+ for(var/obj/item/weapon/implant/tracking/I in GLOB.tracked_implants)
if(!I.imp_in || !ismob(I.loc))
continue
else
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index b81522d5bbf40..4e9534b508f0b 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -162,7 +162,7 @@
while(R.amount>0)
var/obj/O = new dump_path(loc)
- step(O, pick(alldirs)) //we only drop 20% of the total of each products and spread it
+ step(O, pick(GLOB.alldirs)) //we only drop 20% of the total of each products and spread it
R.amount -= 5 //around to not fill the turf with too many objects.
dump_amount++
if(dump_amount > 15) //so we don't drop too many items (e.g. ClothesMate)
diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm
index 597ed7827a274..768c6cd1f0c4e 100644
--- a/code/game/mecha/combat/gygax.dm
+++ b/code/game/mecha/combat/gygax.dm
@@ -23,7 +23,7 @@
armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 35000
leg_overload_coeff = 100
- operation_req_access = list(access_syndicate)
+ operation_req_access = list(GLOB.access_syndicate)
wreckage = /obj/structure/mecha_wreckage/gygax/dark
max_equip = 4
diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm
index 3f8bf6bd35a8f..cee8c641fdc2f 100644
--- a/code/game/mecha/combat/honker.dm
+++ b/code/game/mecha/combat/honker.dm
@@ -10,7 +10,7 @@
armor = list(melee = -20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 25000
infra_luminosity = 5
- operation_req_access = list(access_theatre)
+ operation_req_access = list(GLOB.access_theatre)
wreckage = /obj/structure/mecha_wreckage/honker
add_req_access = 0
max_equip = 3
diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm
index ea0e307525527..5f14a9f89a500 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/game/mecha/combat/marauder.dm
@@ -10,7 +10,7 @@
max_temperature = 60000
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
infra_luminosity = 3
- operation_req_access = list(access_cent_specops)
+ operation_req_access = list(GLOB.access_cent_specops)
wreckage = /obj/structure/mecha_wreckage/marauder
add_req_access = 0
internal_damage_threshold = 25
@@ -45,7 +45,7 @@
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
name = "\improper Seraph"
icon_state = "seraph"
- operation_req_access = list(access_cent_specops)
+ operation_req_access = list(GLOB.access_cent_specops)
step_in = 3
obj_integrity = 550
wreckage = /obj/structure/mecha_wreckage/seraph
@@ -71,7 +71,7 @@
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
name = "\improper Mauler"
icon_state = "mauler"
- operation_req_access = list(access_syndicate)
+ operation_req_access = list(GLOB.access_syndicate)
wreckage = /obj/structure/mecha_wreckage/mauler
max_equip = 5
diff --git a/code/game/mecha/combat/reticence.dm b/code/game/mecha/combat/reticence.dm
index d0b0d00b176bf..41ddacc748797 100644
--- a/code/game/mecha/combat/reticence.dm
+++ b/code/game/mecha/combat/reticence.dm
@@ -10,7 +10,7 @@
armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
max_temperature = 15000
wreckage = /obj/structure/mecha_wreckage/reticence
- operation_req_access = list(access_theatre)
+ operation_req_access = list(GLOB.access_theatre)
add_req_access = 0
internal_damage_threshold = 25
max_equip = 2
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index 09f12d207e91f..e7e837909530f 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -199,11 +199,11 @@
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
/obj/item/mecha_parts/mecha_equipment/rcd/New()
- rcd_list += src
+ GLOB.rcd_list += src
..()
/obj/item/mecha_parts/mecha_equipment/rcd/Destroy()
- rcd_list -= src
+ GLOB.rcd_list -= src
return ..()
/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
@@ -420,7 +420,7 @@
if(!PN)
PN = new()
- powernets += PN
+ GLOB.powernets += PN
NC.powernet = PN
PN.cables += NC
NC.mergeConnectedNetworks(NC.d2)
diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm
index f669960f88352..134bd78e8420b 100644
--- a/code/game/mecha/mech_bay.dm
+++ b/code/game/mecha/mech_bay.dm
@@ -95,7 +95,7 @@
return
interact(user)
-/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = default_state)
+/obj/machinery/computer/mech_bay_power_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "mech_bay_power_console", "Mech Bay Power Control Console", 400, 170, master_ui, state)
@@ -130,7 +130,7 @@
return
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in range(1)
if(!recharge_port )
- for(var/D in cardinal)
+ for(var/D in GLOB.cardinal)
var/turf/A = get_step(src, D)
A = get_step(A, D)
recharge_port = locate(/obj/machinery/mech_bay_recharge_port) in A
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index e94aca889dfc5..f5a6e9fac4922 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -8,7 +8,7 @@
use_power = 1
idle_power_usage = 20
active_power_usage = 5000
- req_access = list(access_robotics)
+ req_access = list(GLOB.access_robotics)
var/time_coeff = 1
var/component_coeff = 1
var/datum/material_container/materials
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index b2fac45c4c835..f4c52c03003f9 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -65,7 +65,7 @@
var/internal_damage = 0 //contains bitflags
var/list/operation_req_access = list()//required access level for mecha operation
- var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment
+ var/list/internals_req_access = list(GLOB.access_engine,GLOB.access_robotics)//required access level to open cell compartment
var/wreckage
@@ -132,11 +132,11 @@
smoke_system.attach(src)
add_cell()
START_PROCESSING(SSobj, src)
- poi_list |= src
+ GLOB.poi_list |= src
log_message("[src.name] created.")
- mechas_list += src //global mech list
+ GLOB.mechas_list += src //global mech list
prepare_huds()
- var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
+ var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC]
diag_hud.add_to_hud(src)
diag_hud_set_mechhealth()
diag_hud_set_mechcell()
@@ -185,7 +185,7 @@
if(AI)
AI.gib() //No wreck, no AI to recover
STOP_PROCESSING(SSobj, src)
- poi_list.Remove(src)
+ GLOB.poi_list.Remove(src)
equipment.Cut()
cell = null
internal_tank = null
@@ -200,7 +200,7 @@
qdel(smoke_system)
smoke_system = null
- mechas_list -= src //global mech list
+ GLOB.mechas_list -= src //global mech list
return ..()
////////////////////////
@@ -1011,7 +1011,7 @@
/obj/mecha/proc/log_message(message as text,red=null)
log.len++
- log[log.len] = list("time"="[worldtime2text()]","date","year"="[year_integer+540]","message"="[red?"":null][message][red?"":null]")
+ log[log.len] = list("time"="[worldtime2text()]","date","year"="[GLOB.year_integer+540]","message"="[red?"":null][message][red?"":null]")
return log.len
/obj/mecha/proc/log_append_to_last(message as text,red=null)
@@ -1019,8 +1019,8 @@
last_entry["message"] += " [red?"":null][message][red?"":null]"
return
-var/year = time2text(world.realtime,"YYYY")
-var/year_integer = text2num(year) // = 2013???
+GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
+GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
///////////////////////
///// Power stuff /////
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index bbafd46dd2488..96c59f62f359d 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -3,7 +3,7 @@
desc = "Used to remotely locate or lockdown exosuits."
icon_screen = "mecha"
icon_keyboard = "tech_key"
- req_access = list(access_robotics)
+ req_access = list(GLOB.access_robotics)
circuit = /obj/item/weapon/circuitboard/computer/mecha_control
var/list/located = list()
var/screen = 0
@@ -17,7 +17,7 @@
if(screen == 0)
dat += "
Tracking beacons data
"
var/list/trackerlist = list()
- for(var/obj/mecha/MC in mechas_list)
+ for(var/obj/mecha/MC in GLOB.mechas_list)
trackerlist += MC.trackers
for(var/obj/item/mecha_parts/mecha_tracking/TR in trackerlist)
var/answer = TR.get_mecha_info()
diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm
index 512629cae358c..564b59f7868e9 100644
--- a/code/game/mecha/mecha_defense.dm
+++ b/code/game/mecha/mecha_defense.dm
@@ -312,7 +312,7 @@
L.narsie_act()
/obj/mecha/ratvar_act()
- if((ratvar_awakens || clockwork_gateway_activated) && occupant)
+ if((GLOB.ratvar_awakens || GLOB.clockwork_gateway_activated) && occupant)
if(is_servant_of_ratvar(occupant)) //reward the minion that got a mech by repairing it
full_repair(TRUE)
else
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index f9ae636dff922..d9539cfcd16f7 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -17,7 +17,7 @@
if(H.glasses && istype(H.glasses, /obj/item/clothing/glasses/hud))
occupant_message("Your [H.glasses] prevent you from using the built-in medical hud.")
else
- var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED]
+ var/datum/atom_hud/data/human/medical/advanced/A = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
A.add_hud_to(H)
builtin_hud_user = 1
return 1
@@ -27,7 +27,7 @@
/obj/mecha/medical/odysseus/go_out()
if(ishuman(occupant) && builtin_hud_user)
var/mob/living/carbon/human/H = occupant
- var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED]
+ var/datum/atom_hud/data/human/medical/advanced/A = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
A.remove_hud_from(H)
..()
return
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index a501e59981df9..071c95cb46de2 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -19,7 +19,7 @@
/obj/effect/anomaly/Initialize(mapload, new_lifespan)
..()
- poi_list |= src
+ GLOB.poi_list |= src
START_PROCESSING(SSobj, src)
impact_area = get_area(src)
@@ -47,14 +47,14 @@
qdel(src)
/obj/effect/anomaly/Destroy()
- poi_list.Remove(src)
+ GLOB.poi_list.Remove(src)
STOP_PROCESSING(SSobj, src)
qdel(countdown)
return ..()
/obj/effect/anomaly/proc/anomalyEffect()
if(prob(movechance))
- step(src,pick(alldirs))
+ step(src,pick(GLOB.alldirs))
/obj/effect/anomaly/proc/detonate()
return
@@ -198,7 +198,7 @@
// Calculate new position (searches through beacons in world)
var/obj/item/device/radio/beacon/chosen
var/list/possible = list()
- for(var/obj/item/device/radio/beacon/W in teleportbeacons)
+ for(var/obj/item/device/radio/beacon/W in GLOB.teleportbeacons)
possible += W
if(possible.len > 0)
diff --git a/code/game/objects/effects/bump_teleporter.dm b/code/game/objects/effects/bump_teleporter.dm
index 722f29e913247..a804a2d4c7dde 100644
--- a/code/game/objects/effects/bump_teleporter.dm
+++ b/code/game/objects/effects/bump_teleporter.dm
@@ -1,5 +1,3 @@
-var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
-
/obj/effect/bump_teleporter
name = "bump-teleporter"
icon = 'icons/mob/screen_gen.dmi'
@@ -11,12 +9,14 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
density = 1
opacity = 0
+ var/static/list/AllTeleporters
+
/obj/effect/bump_teleporter/New()
..()
- BUMP_TELEPORTERS += src
+ LAZYADD(AllTeleporters, src)
/obj/effect/bump_teleporter/Destroy()
- BUMP_TELEPORTERS -= src
+ LAZYREMOVE(AllTeleporters, src)
return ..()
/obj/effect/bump_teleporter/Bumped(atom/user)
@@ -28,7 +28,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
//user.loc = src.loc //Stop at teleporter location, there is nowhere to teleport to.
return
- for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
+ for(var/obj/effect/bump_teleporter/BT in AllTeleporters)
if(BT.id == src.id_target)
usr.loc = BT.loc //Teleport to location with correct id.
return
\ No newline at end of file
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index d94a68a1afcf5..58007fc050dcd 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -139,23 +139,23 @@
/obj/effect/decal/cleanable/blood/footprints/update_icon()
cut_overlays()
- for(var/Ddir in cardinal)
+ for(var/Ddir in GLOB.cardinal)
if(entered_dirs & Ddir)
var/image/I
- if(bloody_footprints_cache["entered-[blood_state]-[Ddir]"])
- I = bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
+ if(GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"])
+ I = GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
else
I = image(icon,"[blood_state]1",dir = Ddir)
- bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = I
+ GLOB.bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = I
if(I)
add_overlay(I)
if(exited_dirs & Ddir)
var/image/I
- if(bloody_footprints_cache["exited-[blood_state]-[Ddir]"])
- I = bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
+ if(GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"])
+ I = GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
else
I = image(icon,"[blood_state]2",dir = Ddir)
- bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = I
+ GLOB.bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = I
if(I)
add_overlay(I)
diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm
index 0b80d6b0d92fe..6a41809eb1778 100644
--- a/code/game/objects/effects/decals/crayon.dm
+++ b/code/game/objects/effects/decals/crayon.dm
@@ -12,7 +12,7 @@
name = e_name
desc = "A [name] vandalizing the station."
if(type == "poseur tag")
- type = pick(gang_name_pool)
+ type = pick(GLOB.gang_name_pool)
if(alt_icon)
icon = alt_icon
diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm
index f544263fda8d5..34b20fde6f3b0 100644
--- a/code/game/objects/effects/effect_system/effect_system.dm
+++ b/code/game/objects/effects/effect_system/effect_system.dm
@@ -14,11 +14,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/particle_effect/New()
..()
if(SSticker)
- cameranet.updateVisibility(src)
+ GLOB.cameranet.updateVisibility(src)
/obj/effect/particle_effect/Destroy()
if(SSticker)
- cameranet.updateVisibility(src)
+ GLOB.cameranet.updateVisibility(src)
. = ..()
/datum/effect_system
@@ -60,9 +60,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
total_effects++
var/direction
if(cardinals)
- direction = pick(cardinal)
+ direction = pick(GLOB.cardinal)
else
- direction = pick(alldirs)
+ direction = pick(GLOB.alldirs)
var/steps_amt = pick(1,2,3)
for(var/j in 1 to steps_amt)
sleep(5)
diff --git a/code/game/objects/effects/effect_system/effects_explosion.dm b/code/game/objects/effects/effect_system/effects_explosion.dm
index c8d54842b6cec..bd9a54880da46 100644
--- a/code/game/objects/effects/effect_system/effects_explosion.dm
+++ b/code/game/objects/effects/effect_system/effects_explosion.dm
@@ -15,7 +15,7 @@
for(var/i in 1 to number)
spawn(0)
var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location)
- var/direct = pick(alldirs)
+ var/direct = pick(GLOB.alldirs)
var/steps_amt = pick(1;25,2;50,3,4;200)
for(var/j in 1 to steps_amt)
sleep(1)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index c41acdcf85357..a34e30e689f1e 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -84,7 +84,7 @@
smoke_mob(L)
var/obj/effect/particle_effect/smoke/S = new type(T)
reagents.copy_to(S, reagents.total_volume)
- S.setDir(pick(cardinal))
+ S.setDir(pick(GLOB.cardinal))
S.amount = amount-1
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
S.lifetime = lifetime
diff --git a/code/game/objects/effects/effect_system/effects_water.dm b/code/game/objects/effects/effect_system/effects_water.dm
index e12894d970e0a..0cd476e00160a 100644
--- a/code/game/objects/effects/effect_system/effects_water.dm
+++ b/code/game/objects/effects/effect_system/effects_water.dm
@@ -34,7 +34,7 @@
// will always spawn at the items location, even if it's moved.
/* Example:
-var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
+ var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
steam.set_up(5, 0, mob.loc) -- sets up variables
OPTIONAL: steam.attach(mob)
steam.start() -- spawns the effect
diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm
index 80255d3e6cd77..9b0702edbec59 100644
--- a/code/game/objects/effects/glowshroom.dm
+++ b/code/game/objects/effects/glowshroom.dm
@@ -1,9 +1,5 @@
//separate dm since hydro is getting bloated already
-var/list/blacklisted_glowshroom_turfs = typecacheof(list(
- /turf/open/floor/plating/lava,
- /turf/open/floor/plating/beach/water))
-
/obj/structure/glowshroom
name = "glowshroom"
desc = "Mycena Bregprox, a species of mushroom that glows in the dark."
@@ -20,6 +16,9 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list(
var/generation = 1
var/spreadIntoAdjacentChance = 60
var/obj/item/seeds/myseed = /obj/item/seeds/glowshroom
+ var/static/list/blacklisted_glowshroom_turfs = typecacheof(list(
+ /turf/open/floor/plating/lava,
+ /turf/open/floor/plating/beach/water))
/obj/structure/glowshroom/glowcap
name = "glowcap"
@@ -110,7 +109,7 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list(
var/placeCount = 1
for(var/obj/structure/glowshroom/shroom in newLoc)
shroomCount++
- for(var/wallDir in cardinal)
+ for(var/wallDir in GLOB.cardinal)
var/turf/isWall = get_step(newLoc,wallDir)
if(isWall.density)
placeCount++
@@ -131,7 +130,7 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list(
/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
var/direction = 16
- for(var/wallDir in cardinal)
+ for(var/wallDir in GLOB.cardinal)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
direction |= wallDir
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index 3bb66f30095ac..57e3763ef70d9 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -8,10 +8,10 @@
/obj/effect/landmark/New()
..()
tag = text("landmark*[]", name)
- landmarks_list += src
+ GLOB.landmarks_list += src
/obj/effect/landmark/Destroy()
- landmarks_list -= src
+ GLOB.landmarks_list -= src
return ..()
/obj/effect/landmark/start
@@ -21,13 +21,13 @@
anchored = 1
/obj/effect/landmark/start/New()
- start_landmarks_list += src
+ GLOB.start_landmarks_list += src
..()
if(name != "start")
tag = "start*[name]"
/obj/effect/landmark/start/Destroy()
- start_landmarks_list -= src
+ GLOB.start_landmarks_list -= src
return ..()
// START LANDMARKS FOLLOW. Don't change the names unless
@@ -136,10 +136,10 @@
/obj/effect/landmark/start/depsec/New()
..()
- department_security_spawns += src
+ GLOB.department_security_spawns += src
/obj/effect/landmark/start/depsec/Destroy()
- department_security_spawns -= src
+ GLOB.department_security_spawns -= src
return ..()
/obj/effect/landmark/start/depsec/supply
@@ -159,7 +159,7 @@
/obj/effect/landmark/start/wizard/Initialize(mapload)
..()
- wizardstart += loc
+ GLOB.wizardstart += loc
qdel(src)
/obj/effect/landmark/start/new_player
@@ -169,7 +169,7 @@
// join before SSatom initializes everything.
/obj/effect/landmark/start/new_player/New(loc)
..()
- newplayer_start += loc
+ GLOB.newplayer_start += loc
/obj/effect/landmark/start/new_player/Initialize(mapload)
..()
@@ -182,7 +182,7 @@
/obj/effect/landmark/latejoin/Initialize(mapload)
..()
- latejoin += loc
+ GLOB.latejoin += loc
qdel(src)
// carp.
@@ -228,7 +228,7 @@
/obj/effect/landmark/xeno_spawn/Initialize(mapload)
..()
- xeno_spawn += loc
+ GLOB.xeno_spawn += loc
qdel(src)
// blobs.
@@ -237,7 +237,7 @@
/obj/effect/landmark/blobstart/Initialize(mapload)
..()
- blobstart += loc
+ GLOB.blobstart += loc
qdel(src)
/obj/effect/landmark/secequipment
@@ -245,7 +245,7 @@
/obj/effect/landmark/secequipment/Initialize(mapload)
..()
- secequipment += loc
+ GLOB.secequipment += loc
qdel(src)
/obj/effect/landmark/prisonwarp
@@ -253,7 +253,7 @@
/obj/effect/landmark/prisonwarp/Initialize(mapload)
..()
- prisonwarp += loc
+ GLOB.prisonwarp += loc
qdel(src)
/obj/effect/landmark/ert_spawn
@@ -261,7 +261,7 @@
/obj/effect/landmark/ert_spawn/Initialize(mapload)
..()
- emergencyresponseteamspawn += loc
+ GLOB.emergencyresponseteamspawn += loc
qdel(src)
/obj/effect/landmark/holding_facility
@@ -269,7 +269,7 @@
/obj/effect/landmark/holding_facility/Initialize(mapload)
..()
- holdingfacility += loc
+ GLOB.holdingfacility += loc
qdel(src)
/obj/effect/landmark/thunderdome/observe
@@ -277,7 +277,7 @@
/obj/effect/landmark/thunderdome/observe/Initialize(mapload)
..()
- tdomeobserve += loc
+ GLOB.tdomeobserve += loc
qdel(src)
/obj/effect/landmark/thunderdome/one
@@ -285,7 +285,7 @@
/obj/effect/landmark/thunderdome/one/Initialize(mapload)
..()
- tdome1 += loc
+ GLOB.tdome1 += loc
qdel(src)
/obj/effect/landmark/thunderdome/two
@@ -293,7 +293,7 @@
/obj/effect/landmark/thunderdome/two/Initialize(mapload)
..()
- tdome2 += loc
+ GLOB.tdome2 += loc
qdel(src)
/obj/effect/landmark/thunderdome/admin
@@ -301,7 +301,7 @@
/obj/effect/landmark/thunderdome/admin/Initialize(mapload)
..()
- tdomeadmin += loc
+ GLOB.tdomeadmin += loc
qdel(src)
//generic event spawns
@@ -312,22 +312,22 @@
/obj/effect/landmark/event_spawn/New()
..()
- generic_event_spawns += src
+ GLOB.generic_event_spawns += src
/obj/effect/landmark/event_spawn/Destroy()
- generic_event_spawns -= src
+ GLOB.generic_event_spawns -= src
return ..()
/obj/effect/landmark/ruin
var/datum/map_template/ruin/ruin_template
/obj/effect/landmark/ruin/New(loc, my_ruin_template)
- name = "ruin_[ruin_landmarks.len + 1]"
+ name = "ruin_[GLOB.ruin_landmarks.len + 1]"
..(loc)
ruin_template = my_ruin_template
- ruin_landmarks |= src
+ GLOB.ruin_landmarks |= src
/obj/effect/landmark/ruin/Destroy()
- ruin_landmarks -= src
+ GLOB.ruin_landmarks -= src
ruin_template = null
. = ..()
diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm
index 5052531cf38cc..6981329bc68f4 100644
--- a/code/game/objects/effects/manifest.dm
+++ b/code/game/objects/effects/manifest.dm
@@ -8,7 +8,7 @@
/obj/effect/manifest/proc/manifest()
var/dat = "Crew Manifest: "
- for(var/mob/living/carbon/human/M in mob_list)
+ for(var/mob/living/carbon/human/M in GLOB.mob_list)
dat += text(" [] - [] ", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 1310523669f5e..e83ecda8094b7 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -34,7 +34,7 @@
/obj/effect/overlay/temp/New()
..()
if(randomdir)
- setDir(pick(cardinal))
+ setDir(pick(GLOB.cardinal))
flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation.
timerid = QDEL_IN(src, duration)
@@ -58,7 +58,7 @@
var/splatter_type = "splatter"
/obj/effect/overlay/temp/dir_setting/bloodsplatter/New(loc, set_dir)
- if(set_dir in diagonals)
+ if(set_dir in GLOB.diagonals)
icon_state = "[splatter_type][pick(1, 2, 6)]"
else
icon_state = "[splatter_type][pick(3, 4, 5)]"
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index 9a51c63ca721f..6aff1855fb5f8 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -30,7 +30,7 @@
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
..()
- portals += src
+ GLOB.portals += src
src.target = target
src.creator = creator
@@ -42,7 +42,7 @@
QDEL_IN(src, lifespan)
/obj/effect/portal/Destroy()
- portals -= src
+ GLOB.portals -= src
if(istype(creator, /obj/item/weapon/hand_tele))
var/obj/item/weapon/hand_tele/O = creator
O.active_portals--
diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm
index 19a7250d87c8a..43c0990c69801 100644
--- a/code/game/objects/effects/spawners/gibspawner.dm
+++ b/code/game/objects/effects/spawners/gibspawner.dm
@@ -64,7 +64,7 @@
/obj/effect/gibspawner/human/Initialize()
playsound(src, 'sound/effects/blobattack.ogg', 50, 1)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
..()
@@ -74,7 +74,7 @@
/obj/effect/gibspawner/humanbodypartless/Initialize()
playsound(src, 'sound/effects/blobattack.ogg', 50, 1)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, list())
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
..()
@@ -84,7 +84,7 @@
/obj/effect/gibspawner/xeno/Initialize()
playsound(src, 'sound/effects/blobattack.ogg', 60, 1)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs, list())
..()
@@ -95,7 +95,7 @@
/obj/effect/gibspawner/xenobodypartless/Initialize()
playsound(src, 'sound/effects/blobattack.ogg', 60, 1)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, list())
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, list())
..()
/obj/effect/gibspawner/larva
@@ -104,7 +104,7 @@
/obj/effect/gibspawner/larva/Initialize()
playsound(src, 'sound/effects/blobattack.ogg', 60, 1)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list(), alldirs)
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST), list(), GLOB.alldirs)
..()
/obj/effect/gibspawner/larvabodypartless
@@ -122,6 +122,6 @@
gibamounts = list(1,1,1,1,1,1)
/obj/effect/gibspawner/robot/Initialize()
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
gibamounts[6] = pick(0,1,2)
..()
diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm
index 90ef6857d4711..2c57f4930b341 100644
--- a/code/game/objects/explosion.dm
+++ b/code/game/objects/explosion.dm
@@ -1,5 +1,3 @@
-var/explosionid = 1
-
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0 ,silent = 0, smoke = 1)
set waitfor = 0
src = null //so we don't abort once src is deleted
@@ -14,11 +12,11 @@ var/explosionid = 1
if(!ignorecap && epicenter.z != ZLEVEL_MINING)
//Clamp all values to MAX_EXPLOSION_RANGE
- devastation_range = min(MAX_EX_DEVESTATION_RANGE, devastation_range)
- heavy_impact_range = min(MAX_EX_HEAVY_RANGE, heavy_impact_range)
- light_impact_range = min(MAX_EX_LIGHT_RANGE, light_impact_range)
- flash_range = min(MAX_EX_FLASH_RANGE, flash_range)
- flame_range = min(MAX_EX_FLAME_RANGE, flame_range)
+ devastation_range = min(GLOB.MAX_EX_DEVESTATION_RANGE, devastation_range)
+ heavy_impact_range = min(GLOB.MAX_EX_HEAVY_RANGE, heavy_impact_range)
+ light_impact_range = min(GLOB.MAX_EX_LIGHT_RANGE, light_impact_range)
+ flash_range = min(GLOB.MAX_EX_FLASH_RANGE, flash_range)
+ flame_range = min(GLOB.MAX_EX_FLAME_RANGE, flame_range)
//DO NOT REMOVE THIS SLEEP, IT BREAKS THINGS
//not sleeping causes us to ex_act() the thing that triggered the explosion
@@ -29,6 +27,7 @@ var/explosionid = 1
//and somethings expect us to ex_act them so they can qdel()
sleep(1) //tldr, let the calling proc call qdel(src) before we explode
+ var/static/explosionid = 1
var/id = explosionid++
var/start = world.timeofday
@@ -52,7 +51,7 @@ var/explosionid = 1
if(!silent)
var/frequency = get_rand_frequency()
var/ex_sound = get_sfx("explosion")
- for(var/mob/M in player_list)
+ for(var/mob/M in GLOB.player_list)
// Double check for client
if(M && M.client)
var/turf/M_turf = get_turf(M)
@@ -180,11 +179,11 @@ var/explosionid = 1
var/took = (world.timeofday-start)/10
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
- if(Debug2)
+ if(GLOB.Debug2)
log_world("## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds.")
//Machines which report explosions.
- for(var/array in doppler_arrays)
+ for(var/array in GLOB.doppler_arrays)
var/obj/machinery/doppler_array/A = array
A.sense_explosion(epicenter,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
@@ -278,7 +277,7 @@ var/explosionid = 1
if(!power)
return
var/range = 0
- range = round((2 * power)**DYN_EX_SCALE)
+ range = round((2 * power)**GLOB.DYN_EX_SCALE)
explosion(epicenter, round(range * 0.25), round(range * 0.5), round(range), flash_range*range, adminlog, ignorecap, flame_range*range, silent, smoke)
// Using default dyn_ex scale:
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 85b1886e6c986..9e962ddeecaaa 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -1,4 +1,4 @@
-var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire")
+GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire"))
/obj/item
name = "item"
@@ -502,7 +502,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
if(.)
if(initial(icon) && initial(icon_state))
var/index = blood_splatter_index()
- var/icon/blood_splatter_icon = blood_splatter_icons[index]
+ var/icon/blood_splatter_icon = GLOB.blood_splatter_icons[index]
if(blood_splatter_icon)
cut_overlay(blood_splatter_icon)
diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm
index fb6c349f17731..edc7d0f3fe841 100644
--- a/code/game/objects/items/apc_frame.dm
+++ b/code/game/objects/items/apc_frame.dm
@@ -12,7 +12,7 @@
if(get_dist(on_wall,user)>1)
return
var/ndir = get_dir(on_wall, user)
- if(!(ndir in cardinal))
+ if(!(ndir in GLOB.cardinal))
return
var/turf/T = get_turf(user)
var/area/A = get_area(T)
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index f1e5b7f83bf69..f1535db19d2b1 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -168,18 +168,18 @@
/obj/item/areaeditor/blueprints/proc/view_wire_devices(mob/user)
var/message = " You examine the wire legend. "
- for(var/wireset in wire_color_directory)
- message += " [wire_name_directory[wireset]]"
+ for(var/wireset in GLOB.wire_color_directory)
+ message += " [GLOB.wire_name_directory[wireset]]"
message += ""
return message
/obj/item/areaeditor/blueprints/proc/view_wire_set(mob/user, wireset)
//for some reason you can't use wireset directly as a derefencer so this is the next best :/
- for(var/device in wire_color_directory)
+ for(var/device in GLOB.wire_color_directory)
if("[device]" == wireset) //I know... don't change it...
- var/message = "
[GLOB.wire_name_directory[device]]:"
+ for(var/Col in GLOB.wire_color_directory[device])
+ var/wire_name = GLOB.wire_color_directory[device][Col]
if(!findtext(wire_name, WIRE_DUD_PREFIX)) //don't show duds
message += "
[Col]: [wire_name]
"
message += ""
@@ -309,7 +309,7 @@
return ROOM_ERR_TOOLARGE
var/turf/T = pending[1] //why byond havent list::pop()?
pending -= T
- for (var/dir in cardinal)
+ for (var/dir in GLOB.cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
@@ -343,7 +343,7 @@
for(var/V in border) //lazy but works
var/turf/F = V
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinal)
if(direction == border[F])
continue //don't want to grab turfs from outside the border
var/turf/U = get_step(F, direction)
diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm
index b7e5e9edf8f3c..352a4fb9a7bc4 100644
--- a/code/game/objects/items/cardboard_cutouts.dm
+++ b/code/game/objects/items/cardboard_cutouts.dm
@@ -97,15 +97,15 @@
add_atom_colour("#FFD7A7", FIXED_COLOUR_PRIORITY)
switch(new_appearance)
if("Assistant")
- name = "[pick(first_names_male)] [pick(last_names)]"
+ name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
desc = "A cardboat cutout of an assistant."
icon_state = "cutout_greytide"
if("Clown")
- name = pick(clown_names)
+ name = pick(GLOB.clown_names)
desc = "A cardboard cutout of a clown. You get the feeling that it should be in a corner."
icon_state = "cutout_clown"
if("Mime")
- name = pick(mime_names)
+ name = pick(GLOB.mime_names)
desc = "...(A cardboard cutout of a mime.)"
icon_state = "cutout_mime"
if("Traitor")
@@ -121,7 +121,7 @@
desc = "A cardboard cutout of a cultist."
icon_state = "cutout_cultist"
if("Clockwork Cultist")
- name = "[pick(first_names_male)] [pick(last_names)]"
+ name = "[pick(GLOB.first_names_male)] [pick(GLOB.last_names)]"
desc = "A cardboard cutout of a servant of Ratvar."
icon_state = "cutout_servant"
if("Revolutionary")
@@ -129,7 +129,7 @@
desc = "A cardboard cutout of a revolutionary."
icon_state = "cutout_viva"
if("Wizard")
- name = "[pick(wizard_first)], [pick(wizard_second)]"
+ name = "[pick(GLOB.wizard_first)], [pick(GLOB.wizard_second)]"
desc = "A cardboard cutout of a wizard."
icon_state = "cutout_wizard"
if("Shadowling")
@@ -151,7 +151,7 @@
desc = "A cardboard cutout of an ash walker."
icon_state = "cutout_free_antag"
if("Deathsquad Officer")
- name = pick(commando_names)
+ name = pick(GLOB.commando_names)
desc = "A cardboard cutout of a death commando."
icon_state = "cutout_deathsquad"
if("Ian")
diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm
index ad23d12754abb..e5f4ac1cb75bc 100644
--- a/code/game/objects/items/charter.dm
+++ b/code/game/objects/items/charter.dm
@@ -18,10 +18,10 @@
/obj/item/station_charter/New()
. = ..()
if(!standard_station_regex)
- var/prefixes = jointext(station_prefixes, "|")
- var/names = jointext(station_names, "|")
- var/suffixes = jointext(station_suffixes, "|")
- var/numerals = jointext(station_numerals, "|")
+ var/prefixes = jointext(GLOB.station_prefixes, "|")
+ var/names = jointext(GLOB.station_names, "|")
+ var/suffixes = jointext(GLOB.station_suffixes, "|")
+ var/numerals = jointext(GLOB.station_numerals, "|")
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
standard_station_regex = new(regexstr)
@@ -35,7 +35,7 @@
if(used)
to_chat(user, "This charter has already been used to name the station.")
return
- if(!ignores_timeout && (world.time-round_start_time > STATION_RENAME_TIME_LIMIT)) //5 minutes
+ if(!ignores_timeout && (world.time-SSticker.round_start_time > STATION_RENAME_TIME_LIMIT)) //5 minutes
to_chat(user, "The crew has already settled into the shift. It probably wouldn't be good to rename the station right now.")
return
if(response_timer_id)
@@ -60,7 +60,7 @@
to_chat(user, "Your name has been sent to your employers for approval.")
// Autoapproves after a certain time
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
- to_chat(admins, "CUSTOM STATION RENAME:[key_name_admin(user)] (?) proposes to rename the station to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (REJECT) (RPLY)")
+ to_chat(GLOB.admins, "CUSTOM STATION RENAME:[key_name_admin(user)] (?) proposes to rename the station to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (REJECT) (RPLY)")
/obj/item/station_charter/proc/reject_proposed(user)
if(!user)
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 9268536ca9b5a..098d33712338f 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -137,7 +137,7 @@
qdel(src)
. = TRUE
-/obj/item/toy/crayon/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = hands_state)
+/obj/item/toy/crayon/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
// tgui is a plague upon this codebase
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index c6c940c623b36..1f8ef2cde222b 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -1,7 +1,7 @@
//The advanced pea-green monochrome lcd of tomorrow.
-var/global/list/obj/item/device/pda/PDAs = list()
+GLOBAL_LIST_EMPTY(PDAs)
/obj/item/device/pda
@@ -62,7 +62,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(fon)
set_light(f_lum)
- PDAs += src
+ GLOB.PDAs += src
if(default_cartridge)
cartridge = new default_cartridge(src)
inserted_item = new /obj/item/weapon/pen(src)
@@ -138,7 +138,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += text(" [id ? "Update PDA Info" : ""]
")
dat += "[worldtime2text()] " //:[world.time / 100 % 6][world.time / 100 % 10]"
- dat += "[time2text(world.realtime, "MMM DD")] [year_integer+540]"
+ dat += "[time2text(world.realtime, "MMM DD")] [GLOB.year_integer+540]"
dat += "
"
@@ -474,7 +474,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Toggle Door")
if(cartridge && cartridge.access_remote_door)
- for(var/obj/machinery/door/poddoor/M in machines)
+ for(var/obj/machinery/door/poddoor/M in GLOB.machines)
if(M.id == cartridge.remote_door_id)
if(M.density)
M.open()
@@ -636,7 +636,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
add_overlay(image(icon, icon_alert))
/obj/item/device/pda/proc/show_to_ghosts(mob/living/user, datum/data_pda_msg/msg,multiple = 0)
- for(var/mob/M in player_list)
+ for(var/mob/M in GLOB.player_list)
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [msg.sender] PDA Message --> [multiple ? "Everyone" : msg.recipient]: [msg.message][msg.get_photo_ref()]")
@@ -646,8 +646,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
return null
var/obj/machinery/message_server/useMS = null
- if(message_servers)
- for (var/obj/machinery/message_server/MS in message_servers)
+ if(GLOB.message_servers)
+ for (var/obj/machinery/message_server/MS in GLOB.message_servers)
//PDAs are now dependant on the Message Server.
if(MS.active)
useMS = MS
@@ -895,7 +895,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
/obj/item/device/pda/Destroy()
- PDAs -= src
+ GLOB.PDAs -= src
if(id)
qdel(id)
id = null
@@ -1004,7 +1004,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/proc/get_viewable_pdas()
. = list()
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
- for(var/obj/item/device/pda/P in PDAs)
+ for(var/obj/item/device/pda/P in GLOB.PDAs)
if(!P.owner || P.toff || P.hidden) continue
. += P
return .
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index 8336fae85f5c9..3e044cb4a5239 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -305,8 +305,8 @@ Code:
menu = "
Crew Manifest
"
menu += "Entries cannot be modified from this terminal.
"
- if(data_core.general)
- for (var/datum/data/record/t in sortRecord(data_core.general))
+ if(GLOB.data_core.general)
+ for (var/datum/data/record/t in sortRecord(GLOB.data_core.general))
menu += "[t.fields["name"]] - [t.fields["rank"]] "
menu += " "
@@ -332,7 +332,7 @@ Code:
- for(var/obj/machinery/computer/monitor/pMon in machines)
+ for(var/obj/machinery/computer/monitor/pMon in GLOB.machines)
if(!(pMon.stat & (NOPOWER|BROKEN)) )
powercount++
powermonitors += pMon
@@ -379,14 +379,14 @@ Code:
if (44) //medical records //This thing only displays a single screen so it's hard to really get the sub-menu stuff working.
menu = "
Medical Record List
"
- if(data_core.general)
- for(var/datum/data/record/R in sortRecord(data_core.general))
+ if(GLOB.data_core.general)
+ for(var/datum/data/record/R in sortRecord(GLOB.data_core.general))
menu += "[R.fields["id"]]: [R.fields["name"]] "
menu += " "
if(441)
menu = "