mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Turn more unmanaged global vars into GLOB (#20446)
Turned a ton of unmanaged globals into managed globals. Refactored some UT output. Removed some unused things, including vars. Added a test to ensure people don't keep adding new unmanaged vars.
This commit is contained in:
@@ -884,7 +884,7 @@
|
||||
|
||||
/**********************"Fultons"**********************/
|
||||
|
||||
var/list/total_extraction_beacons = list()
|
||||
GLOBAL_LIST_INIT_TYPED(total_extraction_beacons, /obj/structure/extraction_point, list())
|
||||
|
||||
/obj/item/extraction_pack
|
||||
name = "warp extraction pack"
|
||||
@@ -904,7 +904,7 @@ var/list/total_extraction_beacons = list()
|
||||
|
||||
/obj/item/extraction_pack/attack_self(mob/user)
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in total_extraction_beacons)
|
||||
for(var/B in GLOB.total_extraction_beacons)
|
||||
var/obj/structure/extraction_point/EP = B
|
||||
if(EP.beacon_network in beacon_networks)
|
||||
possible_beacons += EP
|
||||
@@ -936,7 +936,7 @@ var/list/total_extraction_beacons = list()
|
||||
if(A.anchored)
|
||||
return
|
||||
var/turf/T = get_turf(A)
|
||||
for(var/found_inhibitor in bluespace_inhibitors)
|
||||
for(var/found_inhibitor in GLOB.bluespace_inhibitors)
|
||||
var/obj/machinery/anti_bluespace/AB = found_inhibitor
|
||||
if(T.z != AB.z || get_dist(T, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
|
||||
continue
|
||||
@@ -989,10 +989,10 @@ var/list/total_extraction_beacons = list()
|
||||
. = ..()
|
||||
var/area/area_name = get_area(src)
|
||||
name += " ([rand(100,999)]) ([area_name.name])"
|
||||
total_extraction_beacons += src
|
||||
GLOB.total_extraction_beacons += src
|
||||
|
||||
/obj/structure/extraction_point/Destroy()
|
||||
total_extraction_beacons -= src
|
||||
GLOB.total_extraction_beacons -= src
|
||||
return ..()
|
||||
|
||||
/**********************Resonator**********************/
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
/turf/unsimulated/mineral/konyang
|
||||
color = "#514e5c"
|
||||
|
||||
// This is a global list so we can share the same list with all mineral turfs; it's the same for all of them anyways.
|
||||
var/list/mineral_can_smooth_with = list(
|
||||
/// This is a global list so we can share the same list with all mineral turfs; it's the same for all of them anyways.
|
||||
GLOBAL_LIST_INIT(mineral_can_smooth_with, list(
|
||||
/turf/simulated/mineral,
|
||||
/turf/simulated/wall,
|
||||
/turf/unsimulated/wall
|
||||
)
|
||||
))
|
||||
|
||||
/turf/simulated/mineral
|
||||
name = "rock"
|
||||
@@ -84,7 +84,7 @@ var/list/mineral_can_smooth_with = list(
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
if(smoothing_flags)
|
||||
canSmoothWith = mineral_can_smooth_with
|
||||
canSmoothWith = GLOB.mineral_can_smooth_with
|
||||
|
||||
rock_health = rand(10,20)
|
||||
|
||||
@@ -730,13 +730,13 @@ var/list/mineral_can_smooth_with = list(
|
||||
roof_type = null
|
||||
turf_flags = TURF_FLAG_BACKGROUND
|
||||
|
||||
// Same as the other, this is a global so we don't have a lot of pointless lists floating around.
|
||||
// Basalt is explicitly omitted so ash will spill onto basalt turfs.
|
||||
var/list/asteroid_floor_smooth = list(
|
||||
/// Same as the other, this is a global so we don't have a lot of pointless lists floating around.
|
||||
/// Basalt is explicitly omitted so ash will spill onto basalt turfs.
|
||||
GLOBAL_LIST_INIT(asteroid_floor_smooth, list(
|
||||
/turf/simulated/floor/exoplanet/asteroid/ash,
|
||||
/turf/simulated/mineral,
|
||||
/turf/simulated/wall
|
||||
)
|
||||
))
|
||||
|
||||
// Copypaste parent for performance.
|
||||
/turf/simulated/floor/exoplanet/asteroid/Initialize(mapload)
|
||||
@@ -762,7 +762,7 @@ var/list/asteroid_floor_smooth = list(
|
||||
queue_ao()
|
||||
|
||||
if(smoothing_flags)
|
||||
canSmoothWith = asteroid_floor_smooth
|
||||
canSmoothWith = GLOB.asteroid_floor_smooth
|
||||
pixel_x = -4
|
||||
pixel_y = -4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user