mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 23:51:17 +01:00
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:
@@ -111,7 +111,7 @@
|
||||
// Paths and all the subpaths excluded
|
||||
|
||||
//Needs a holodeck area linked to it which is not guarenteed to exist and technically is supposed to have a 1:1 relationship with computer anyway.
|
||||
ignore += typesof(/obj/machinery/computer/HolodeckControl)
|
||||
ignore += typesof(/obj/machinery/computer/holodeck_control)
|
||||
|
||||
// Spells require an owner, which would not work here
|
||||
ignore += typesof(/obj/item/spell)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/min_antag_count = 0
|
||||
for(var/antag_type in GM.antag_tags)
|
||||
var/datum/antagonist/A = all_antag_types[antag_type]
|
||||
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
|
||||
|
||||
if(GM.require_all_templates)
|
||||
min_antag_count += A.initial_spawn_req
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
var/list/exempt_from_apc = typecacheof(current_map.ut_apc_exempt_areas)
|
||||
var/list/exempt_from_fire = typecacheof(current_map.ut_fire_exempt_areas)
|
||||
|
||||
for(var/area/A in typecache_filter_list_reverse(all_areas, exempt_areas))
|
||||
for(var/area/A in typecache_filter_list_reverse(GLOB.all_areas, exempt_areas))
|
||||
if(isStationLevel(A.z))
|
||||
area_test_count++
|
||||
var/bad_msg = "[ascii_red]--------------- [A.name] ([A.type])"
|
||||
@@ -118,7 +118,7 @@
|
||||
var/turf/above
|
||||
var/area/A
|
||||
var/thing
|
||||
for (thing in the_station_areas)
|
||||
for (thing in GLOB.the_station_areas)
|
||||
A = thing
|
||||
|
||||
for (var/turf/T in A) // Areas don't just contain turfs, so typed loop it is.
|
||||
@@ -264,7 +264,7 @@
|
||||
|
||||
next_turf:
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0)
|
||||
for(var/obj/machinery/atmospherics/pipe in T)
|
||||
checks++
|
||||
@@ -321,7 +321,7 @@
|
||||
for(var/excluded in exclude)
|
||||
exclude_types += typesof(excluded)
|
||||
|
||||
for(var/area/A as anything in list_keys(the_station_areas))
|
||||
for(var/area/A as anything in list_keys(GLOB.the_station_areas))
|
||||
if(A.type in exclude_types)
|
||||
continue
|
||||
checks++
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
/datum/unit_test/mob_hear/start_test()
|
||||
var/mobloc = pick(tdome1)
|
||||
var/mobloc = pick(GLOB.tdome1)
|
||||
if(!mobloc)
|
||||
TEST_FAIL("Unable to find a location to create test mob")
|
||||
return 0
|
||||
@@ -125,7 +125,7 @@
|
||||
var/list/test_result = list("result" = FAILURE, "msg" = "", "mobref" = null)
|
||||
|
||||
if(isnull(mobloc))
|
||||
mobloc = pick(tdome1)
|
||||
mobloc = pick(GLOB.tdome1)
|
||||
if(!mobloc)
|
||||
test_result["msg"] = "Unable to find a location to create test mob"
|
||||
return test_result
|
||||
@@ -139,7 +139,7 @@
|
||||
test_result["mobref"] = "\ref[L]"
|
||||
|
||||
if(add_to_playerlist)
|
||||
player_list |= L
|
||||
GLOB.player_list |= L
|
||||
testing("Adding test subject to the player list")
|
||||
world << "Adding test subject to the player list"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/proc/is_listening_to_movement(var/atom/movable/listening_to, var/listener)
|
||||
return moved_event.is_listening(listening_to, listener)
|
||||
return GLOB.moved_event.is_listening(listening_to, listener)
|
||||
|
||||
/datum/unit_test/observation
|
||||
name = "OBSERVATION template"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/datum/unit_test/roundstart_cable_connectivity/proc/get_connected_neighbours(var/obj/structure/cable/self, var/dir)
|
||||
var/turf/T = get_step(get_turf(self), dir)
|
||||
var/reverse = reverse_dir[dir]
|
||||
var/reverse = GLOB.reverse_dir[dir]
|
||||
|
||||
. = list() //can have multiple connected neighbours for a dir, e.g. Y-junctions
|
||||
for(var/obj/structure/cable/other in T)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
groups = list("generic")
|
||||
|
||||
/datum/unit_test/sql_preferences_columns/start_test()
|
||||
if(!config.sql_enabled)
|
||||
if(!GLOB.config.sql_enabled)
|
||||
TEST_WARN("--------------- Database not Configured - Skipping Preference Column UT")
|
||||
return UNIT_TEST_PASSED
|
||||
|
||||
TEST_DEBUG("--------------- Database Configured - Running SQL Preference UTs")
|
||||
|
||||
if(!establish_db_connection(dbcon))
|
||||
if(!establish_db_connection(GLOB.dbcon))
|
||||
TEST_FAIL("Database connection could not be established.")
|
||||
return UNIT_TEST_FAILED
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"ss13_characters_ipc_tags"
|
||||
)
|
||||
for (var/T in table_names)
|
||||
var/DBQuery/get_cs = dbcon.NewQuery("SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_NAME` = :table:")
|
||||
var/DBQuery/get_cs = GLOB.dbcon.NewQuery("SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_NAME` = :table:")
|
||||
get_cs.Execute(list("table" = T))
|
||||
|
||||
if (get_cs.ErrorMsg())
|
||||
|
||||
@@ -12,13 +12,12 @@
|
||||
The Unit Tests Configuration subsystem
|
||||
*/
|
||||
|
||||
var/datum/controller/subsystem/unit_tests_config/SSunit_tests_config = new
|
||||
/datum/controller/subsystem/unit_tests_config
|
||||
SUBSYSTEM_DEF(unit_tests_config)
|
||||
name = "Unit Test Config"
|
||||
init_order = SS_INIT_PERSISTENT_CONFIG
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/datum/unit_test/UT = new // Logging/output, use this to log things from outside where a specific unit_test is defined
|
||||
var/datum/unit_test/UT // Logging/output, use this to log things from outside where a specific unit_test is defined
|
||||
|
||||
///What is our identifier, what pod are we, and hence what are we supposed to run
|
||||
var/identifier = null
|
||||
@@ -35,6 +34,8 @@ var/datum/controller/subsystem/unit_tests_config/SSunit_tests_config = new
|
||||
/datum/controller/subsystem/unit_tests_config/New()
|
||||
. = ..()
|
||||
|
||||
UT = new
|
||||
|
||||
world.fps = 10
|
||||
|
||||
//Acquire our identifier, or enter Hopper mode if failing to do so
|
||||
|
||||
@@ -144,7 +144,7 @@ var/ascii_reset = "[ascii_esc]\[0m"
|
||||
/proc/load_unit_test_changes()
|
||||
/*
|
||||
//This takes about 60 seconds to run on Travis and is only used for the ZAS vacume check on The Asteroid.
|
||||
if(config.generate_asteroid != 1)
|
||||
if(GLOB.config.generate_asteroid != 1)
|
||||
log_unit_test("Overiding Configuration option for Asteroid Generation to ENABLED")
|
||||
config.generate_asteroid = 1 // The default map requires it, the example config doesn't have this enabled.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user