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 01:16:02 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 19292f01d3
commit cadd19beac
966 changed files with 4785 additions and 4784 deletions
@@ -15,7 +15,7 @@
/turf/simulated/floor/exoplanet/New()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(istype(E))
if(E.atmosphere)
initial_gas = E.atmosphere.gas.Copy()
@@ -72,7 +72,7 @@
add_overlay(resource_indicator)
if(LAZYLEN(decals))
add_overlay(decals)
for(var/direction in cardinal)
for(var/direction in GLOB.cardinal)
var/turf/turf_to_check = get_step(src,direction)
if(!istype(turf_to_check, type))
var/image/rock_side = image(icon, "edge[pick(0,1,2)]", dir = turn(direction, 180))
@@ -168,7 +168,7 @@
/turf/simulated/floor/exoplanet/grass/Initialize()
. = ..()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(istype(E) && E.grass_color)
color = E.grass_color
if(!resources)
@@ -223,7 +223,7 @@
/turf/unsimulated/planet_edge/Initialize()
. = ..()
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(!istype(E))
return
var/nx = x
@@ -250,7 +250,7 @@
/turf/unsimulated/planet_edge/CollidedWith(atom/movable/A)
. = ..()
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(!istype(E))
return
if(E.planetary_area && istype(loc, world.area))
@@ -49,5 +49,5 @@
icon_state = "drift"
/obj/effect/floor_decal/dune/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
supplied_dir = pick(cardinal)
supplied_dir = pick(GLOB.cardinal)
. = ..()
@@ -9,7 +9,7 @@
/turf/simulated/floor/exoplanet/grass/Initialize()
. = ..()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(color && istype(E) && E.grass_color)
color = E.grass_color
if(!resources)
+5 -5
View File
@@ -166,8 +166,8 @@
var/mob_type = pick(repopulate_types)
var/mob/S = new mob_type(T)
animals += S
death_event.register(S, src, PROC_REF(remove_animal))
destroyed_event.register(S, src, PROC_REF(remove_animal))
GLOB.death_event.register(S, src, PROC_REF(remove_animal))
GLOB.destroyed_event.register(S, src, PROC_REF(remove_animal))
adapt_animal(S)
if(animals.len >= max_animal_count)
repopulating = 0
@@ -188,8 +188,8 @@
/obj/effect/overmap/visitable/sector/exoplanet/proc/remove_animal(var/mob/M)
animals -= M
death_event.unregister(M, src)
destroyed_event.unregister(M, src)
GLOB.death_event.unregister(M, src)
GLOB.destroyed_event.unregister(M, src)
repopulate_types |= M.type
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_map()
@@ -445,7 +445,7 @@
return INITIALIZE_HINT_LATELOAD
/obj/effect/landmark/exoplanet_spawn/LateInitialize(mapload)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if (istype(E))
do_spawn(E)
@@ -258,7 +258,7 @@
gen_turf.resources[ORE_SAND] = rand(3, 5)
gen_turf.resources[ORE_COAL] = rand(3, 5)
if(ground_resources_roll)
var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(cardinal))
var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(GLOB.cardinal))
resource_indicator.alpha = rand(30, 60)
gen_turf.resource_indicator = resource_indicator
if(!gen_turf.density)
@@ -351,7 +351,7 @@
var/coord_to_str = (world.maxx * M.y) + M.x
for(var/ore in ore_seeds)
if(text2num(ore_seeds[ore][coord_to_str]))
M.mineral = ore_data[ore]
M.mineral = GLOB.ore_data[ore]
M.UpdateMineral() // It's already a mineral turf, so we can avoid changeturf here
/datum/exoplanet_theme/proc/get_planet_image_extra()