Cleans up a lot of globals a few other vars (#23246)

* i hate globals i hate globals

* more fucking of these

* sirryan review
This commit is contained in:
Contrabang
2023-12-06 10:30:41 -05:00
committed by GitHub
parent 8046d5b267
commit c8dce33a8a
42 changed files with 11 additions and 157 deletions
-3
View File
@@ -1,6 +1,3 @@
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of", "monkey", "alien", "as"))
/client/verb/adminhelp()
set category = "Admin"
set name = "Adminhelp"
@@ -28,8 +28,6 @@
reconcile_air()
return
GLOBAL_VAR_INIT(pipenetwarnings, 10)
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/base)
var/volume = 0
if(istype(base, /obj/machinery/atmospherics/pipe))
@@ -16,7 +16,6 @@
/*
* Color adjustment
*/
GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
/datum/gear_tweak/color
var/list/valid_colors
@@ -1,20 +0,0 @@
GLOBAL_LIST_EMPTY(spawntypes)
/proc/populate_spawn_points()
// GLOB.spawntypes = list() | This is already done, is it not
for(var/type in subtypesof(/datum/spawnpoint))
var/datum/spawnpoint/S = new type()
GLOB.spawntypes[S.display_name] = S
/datum/spawnpoint
var/msg //Message to display on the arrivals computer.
var/list/turfs //List of turfs to spawn on.
var/display_name //Name used in preference setup.
/datum/spawnpoint/arrivals
display_name = "Arrivals Shuttle"
msg = "has arrived on the station"
/datum/spawnpoint/arrivals/New()
..()
turfs = GLOB.latejoin
@@ -14,7 +14,6 @@
/obj/structure/blob/core/Initialize(mapload, client/new_overmind = null, new_rate = 2, offspring)
. = ..()
GLOB.blob_cores += src
START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
adjustcolors(color) //so it atleast appears
@@ -38,7 +37,6 @@
/obj/structure/blob/core/Destroy()
GLOB.blob_cores -= src
if(overmind)
overmind.blob_core = null
overmind = null
-1
View File
@@ -1,7 +1,6 @@
//I will need to recode parts of this but I am way too tired atm
GLOBAL_LIST_EMPTY(blobs)
GLOBAL_LIST_EMPTY(blob_cores)
GLOBAL_LIST_EMPTY(blob_nodes)
/obj/structure/blob
@@ -1,5 +1,3 @@
GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
/datum/event/spider_infestation
announceWhen = 400
var/spawncount = 1
@@ -8,7 +6,6 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = round(num_players() * 0.8)
GLOB.sent_spiders_to_station = 1
/datum/event/spider_infestation/announce(false_alarm)
if(successSpawn || false_alarm)
@@ -1,6 +1,5 @@
GLOBAL_LIST_EMPTY(ts_ckey_blacklist)
GLOBAL_VAR_INIT(ts_count_dead, 0)
GLOBAL_VAR_INIT(ts_count_alive_awaymission, 0)
GLOBAL_VAR_INIT(ts_count_alive_station, 0)
GLOBAL_VAR_INIT(ts_death_last, 0)
GLOBAL_VAR_INIT(ts_death_window, 9000) // 15 minutes
-6
View File
@@ -66,12 +66,6 @@
if((ckey in GLOB.de_admins) || (ckey in GLOB.de_mentors))
client.verbs += /client/proc/readmin
//Clear ability list and update from mob.
client.verbs -= GLOB.ability_verbs
if(abilities)
client.verbs |= abilities
client.update_active_keybindings()
//HUD updates (antag hud, etc)
-1
View File
@@ -403,7 +403,6 @@
return 0
//converts intent-strings into numbers and back
GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM))
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
-1
View File
@@ -54,7 +54,6 @@
var/lastpuke = 0
var/can_strip = TRUE
var/list/languages = list() // For speaking/listening.
var/list/abilities = list() // For species-derived or admin-given powers.
var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null.
var/emote_type = EMOTE_VISIBLE // Define emote default type, 1 for seen emotes, 2 for heard emotes
var/name_archive //For admin things like possession
@@ -4,8 +4,6 @@
#define RAD_COLLECTOR_STORED_OUT 0.04 // (this * 100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source
#define RAD_COLLECTOR_OUTPUT min(stored_energy, (stored_energy * RAD_COLLECTOR_STORED_OUT) + 1000) //Produces at least 1000 watts if it has more than that stored
GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector
name = "\improper radiation collector array"
desc = "A device which uses Hawking Radiation and plasma to produce power."
@@ -24,14 +22,6 @@ GLOBAL_LIST_EMPTY(rad_collectors)
var/drainratio = 1
var/powerproduction_drain = 0.001
/obj/machinery/power/rad_collector/Initialize(mapload)
. = ..()
GLOB.rad_collectors += src
/obj/machinery/power/rad_collector/Destroy()
GLOB.rad_collectors -= src
return ..()
/obj/machinery/power/rad_collector/process()
if(!loaded_tank)
return
@@ -1,5 +1,3 @@
GLOBAL_LIST_EMPTY(limb_icon_cache)
/obj/item/organ/external/proc/compile_icon()
// I do this so the head's overlays don't get obliterated
for(var/child_i in child_icons)
-1
View File
@@ -1,5 +1,4 @@
GLOBAL_LIST_EMPTY(all_robolimbs)
GLOBAL_LIST_EMPTY(chargen_robolimbs)
GLOBAL_LIST_EMPTY(selectable_robolimbs)
GLOBAL_DATUM(basic_robolimb, /datum/robolimb)
+2
View File
@@ -4,9 +4,11 @@
* Checks that the user is inside the src_object.
*/
/*
GLOBAL_DATUM_INIT(contained_state, /datum/ui_state/contained_state, new)
/datum/ui_state/contained_state/can_use_topic(atom/src_object, mob/user)
if(!src_object.contains(user))
return STATUS_CLOSE
return user.shared_ui_interaction(src_object)
*/
+2
View File
@@ -4,6 +4,7 @@
* Checks that the user is not inside src_object, and then makes the default checks.
*/
/*
GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new)
/datum/ui_state/notcontained_state/can_use_topic(atom/src_object, mob/user)
@@ -21,3 +22,4 @@ GLOBAL_DATUM_INIT(notcontained_state, /datum/ui_state/notcontained_state, new)
/mob/living/silicon/notcontained_can_use_topic(src_object)
return default_can_use_topic(src_object) // Silicons use default bevhavior.
*/
+2
View File
@@ -4,6 +4,7 @@
* Only checks that the Z-level of the user and src_object are the same.
*/
/*
GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new)
/datum/ui_state/z_state/can_use_topic(src_object, mob/user)
@@ -12,3 +13,4 @@ GLOBAL_DATUM_INIT(z_state, /datum/ui_state/z_state, new)
if(turf_obj && turf_usr && turf_obj.z == turf_usr.z)
return STATUS_INTERACTIVE
return STATUS_CLOSE
*/