Convert some more globals (#19231)

* move ref lists from world new to ref list creation

* tg styl

* .

* next globals

* ugh

* some more

* pain

* .

* horror

* .

* .

* .

* shoe me

* ye

* .

* eh

* .

* .

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Kashargul
2026-03-02 23:57:41 +01:00
committed by GitHub
co-authored by Cameron Lennox
parent ecca95d008
commit 1fcbb216e7
100 changed files with 547 additions and 797 deletions
@@ -24,12 +24,12 @@
cam.wires.cut(WIRE_CAM_ALARM)
/datum/event2/event/camera_damage/proc/acquire_random_camera(var/remaining_attempts = 5)
if(!cameranet.cameras.len)
if(!GLOB.cameranet.cameras.len)
return
if(!remaining_attempts)
return
var/obj/machinery/camera/C = pick(cameranet.cameras)
var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras)
if(is_valid_camera(C))
return C
// It is very important to use --var and not var-- for recursive calls, as var-- will cause an infinite loop.
@@ -138,5 +138,5 @@
/datum/event2/event/pda_spam/proc/pick_message_server()
if(LAZYLEN(message_servers))
return pick(message_servers)
if(LAZYLEN(GLOB.message_servers))
return pick(GLOB.message_servers)
@@ -49,14 +49,13 @@
// Messaging server spam filters.
// This might be better served as a seperate event since it seems more like a hacker attack than a natural occurance.
if(message_servers)
for(var/obj/machinery/message_server/MS in message_servers)
if(MS.z in get_location_z_levels())
MS.spamfilter.Cut()
for (var/i = 1, i <= MS.spamfilter_limit, i++)
MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \
"admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\
"director", "Hello", "Hi!"," ","nuke","crate","taj","xeno")
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
if(MS.z in get_location_z_levels())
MS.spamfilter.Cut()
for (var/i = 1, i <= MS.spamfilter_limit, i++)
MS.spamfilter += pick("warble","help","almach","ai","liberty","freedom","drugs", "[using_map.station_short]", \
"admin","sol","security","meow","_","monkey","-","moron","pizza","message","spam",\
"director", "Hello", "Hi!"," ","nuke","crate","taj","xeno")
/datum/event2/event/ion_storm/announce()
if(prob(announce_odds))