Ports the TG globals controller and converts globals. (#18057)

* SDQL2 update

* fix that verb

* cl

* fix that

* toworld

* this is pointless

* update info

* siiiiick..

* vv edit update

* fix that

* fix editing vars

* fix VV

* Port the /TG/ globals controller.

* part 1

* part 2

* oops

* part 3

* Hollow Purple

* sadas

* bsbsdb

* muda na agaki ta

* ids 1-15

* 16-31

* 41-75

* bring me back to how things used to be before i lost it all

* the strength of mayhem

* final touches

* cl

* protect some vars

* update sdql2 to use glob

* stuff?

* forgot that is not defined there

* whoops

* observ

* but it never gets better

* a

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-12-26 02:16:02 +01:00
committed by GitHub
parent 19292f01d3
commit cadd19beac
966 changed files with 4785 additions and 4784 deletions
+1 -1
View File
@@ -554,7 +554,7 @@
return ..()
/obj/machinery/mining/brace/proc/connect()
for(var/angle in cardinal) // make it face any drill in cardinal direction from it
for(var/angle in GLOB.cardinal) // make it face any drill in GLOB.cardinal direction from it
var/obj/machinery/mining/drill/D = locate() in get_step(src, angle)
if(D)
src.dir = angle
+7 -7
View File
@@ -98,7 +98,7 @@
for(var/ore in machine.ores_processing)
if(!machine.ores_stored[ore] && !show_all_ores)
continue
var/ore/O = ore_data[ore]
var/ore/O = GLOB.ore_data[ore]
if(!O)
continue
var/processing_type = ""
@@ -300,24 +300,24 @@
for(var/alloytype in subtypesof(/datum/alloy))
alloy_data += new alloytype()
for(var/O in ore_data)
for(var/O in GLOB.ore_data)
ores_processing[O] = 0
ores_stored[O] = 0
//Locate our output and input machinery.
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(input_spot)
input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine
break
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(output)
output = get_turf(output_spot)
break
if(!input)
input = get_step(src, reverse_dir[dir])
input = get_step(src, GLOB.reverse_dir[dir])
if(!output)
output = get_step(src, dir)
@@ -366,7 +366,7 @@
break
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
var/ore/O = ore_data[metal]
var/ore/O = GLOB.ore_data[metal]
if(!O)
continue
@@ -394,7 +394,7 @@
var/total
for(var/needs_metal in A.requires)
if(console)
var/ore/Ore = ore_data[needs_metal]
var/ore/Ore = GLOB.ore_data[needs_metal]
console.points += Ore.worth
use_power_oneoff(100)
ores_stored[needs_metal] -= A.requires[needs_metal]
+3 -3
View File
@@ -143,19 +143,19 @@
stack_paths[stacktype] = capitalize(initial(S.name))
//Locate our output and input machinery.
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(input_spot)
input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine
break
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(output)
output = get_turf(output_spot)
break
if(!input)
input = get_step(src, reverse_dir[dir])
input = get_step(src, GLOB.reverse_dir[dir])
if(!output)
output = get_step(src, dir)
+3 -3
View File
@@ -22,19 +22,19 @@
. = ..()
//Locate our output and input machinery.
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/input_spot = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(input_spot)
input = get_turf(input_spot) // thought of qdeling the spots here, but it's useful when rebuilding a destroyed machine
break
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/output_spot = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(output)
output = get_turf(output_spot)
break
if(!input)
input = get_step(src, reverse_dir[dir])
input = get_step(src, GLOB.reverse_dir[dir])
if(!output)
output = get_step(src, dir)
+4 -4
View File
@@ -488,13 +488,13 @@
qdel(src)
return
updateOverlays()
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir))
if(R)
R.updateOverlays()
/obj/structure/track/Destroy()
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
var/obj/structure/track/R = locate(/obj/structure/track, get_step(src, dir))
if(R)
R.updateOverlays()
@@ -527,7 +527,7 @@
var/dir_sum = 0
for(var/direction in cardinal)
for(var/direction in GLOB.cardinal)
if(locate(/obj/structure/track, get_step(src, direction)))
dir_sum += direction
@@ -708,7 +708,7 @@
/obj/item/device/wormhole_jaunter/proc/get_destinations(mob/user)
var/list/destinations = list()
for(var/obj/item/device/radio/beacon/B in teleportbeacons)
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
if(isStationLevel(T.z))
destinations += B
+7 -7
View File
@@ -72,7 +72,7 @@ var/list/mineral_can_smooth_with = list(
icon = actual_icon
if(isStationLevel(z))
station_turfs += src
GLOB.station_turfs += src
if(dynamic_lighting)
luminosity = 0
@@ -191,7 +191,7 @@ var/list/mineral_can_smooth_with = list(
icon = actual_icon
if(isStationLevel(z))
station_turfs += src
GLOB.station_turfs += src
if(dynamic_lighting)
luminosity = 0
@@ -487,10 +487,10 @@ var/list/mineral_can_smooth_with = list(
R.amount = rand(5, 25)
/turf/simulated/mineral/proc/change_mineral(mineral_name, force = FALSE)
if(mineral_name && (mineral_name in ore_data))
if(mineral_name && (mineral_name in GLOB.ore_data))
if(mineral && !force)
return FALSE
mineral = ore_data[mineral_name]
mineral = GLOB.ore_data[mineral_name]
UpdateMineral()
/turf/simulated/mineral/random
@@ -521,8 +521,8 @@ var/list/mineral_can_smooth_with = list(
/turf/simulated/mineral/random/Initialize()
if(prob(mineralChance) && !mineral)
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
if(mineral_name && (mineral_name in ore_data))
mineral = ore_data[mineral_name]
if(mineral_name && (mineral_name in GLOB.ore_data))
mineral = GLOB.ore_data[mineral_name]
UpdateMineral()
MineralSpread()
. = ..()
@@ -661,7 +661,7 @@ var/list/asteroid_floor_smooth = list(
base_name = name
if(isStationLevel(z))
station_turfs += src
GLOB.station_turfs += src
if(dynamic_lighting)
luminosity = 0
+2 -2
View File
@@ -9,7 +9,7 @@
maxHealth = 45
health = 45
pass_flags = PASSTABLE|PASSRAILING
req_access = list(access_mining, access_robotics)
req_access = list(ACCESS_MINING, ACCESS_ROBOTICS)
id_card_type = /obj/item/card/id/minedrone
speed = -1
hat_x_offset = 1
@@ -104,7 +104,7 @@
if(seeking_player)
to_chat(user, SPAN_WARNING("\The [src] is already in the reboot process."))
return
if(!config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
if(!GLOB.config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
to_chat(user, SPAN_WARNING("The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one."))
return
+1 -1
View File
@@ -34,7 +34,7 @@
/obj/effect/mineral/proc/get_scan_overlay()
if(!scanner_image)
var/ore/O = ore_data[ore_key]
var/ore/O = GLOB.ore_data[ore_key]
if(O)
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
else
+2 -2
View File
@@ -22,11 +22,11 @@
/obj/machinery/mineral/mint/Initialize()
. = ..()
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input)
break
for(var/dir in cardinal)
for(var/dir in GLOB.cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output)
break
+1 -1
View File
@@ -1,4 +1,4 @@
var/global/list/ore_data = list()
GLOBAL_LIST_EMPTY(ore_data)
/ore
var/name
+2 -2
View File
@@ -48,8 +48,8 @@
/obj/item/ore_detector/ui_data(mob/user)
if(!length(ore_names))
ore_names = list()
for(var/ore_n in ore_data)
var/ore/O = ore_data[ore_n]
for(var/ore_n in GLOB.ore_data)
var/ore/O = GLOB.ore_data[ore_n]
var/ore_name = O.display_name
ore_names += ore_name
ore_names += SURFACE_MINERALS