From 5397d28c4f195fbf76f5f067377ee5e4b1bf87f8 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Sun, 28 Nov 2021 08:50:27 +0000 Subject: [PATCH] Removes some unnecessary global variables (#16353) Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> --- code/_globalvars/configuration.dm | 3 - code/_globalvars/game_modes.dm | 1 - code/_globalvars/genetics.dm | 3 - code/_globalvars/lists/mobs.dm | 1 - code/_globalvars/lists/names.dm | 4 +- code/_globalvars/lists/objects.dm | 3 - code/_globalvars/misc.dm | 2 - code/controllers/subsystem/acid.dm | 10 +- code/datums/diseases/advance/advance.dm | 26 +++-- code/game/gamemodes/cult/cult.dm | 2 - code/game/gamemodes/cult/cult_structures.dm | 24 ++--- code/game/gamemodes/cult/runes.dm | 14 --- code/game/gamemodes/setupgame.dm | 7 -- code/game/jobs/jobs.dm | 1 - code/game/machinery/computer/station_alert.dm | 5 - code/game/machinery/portable_turret.dm | 7 +- code/game/magic/Uristrunes.dm | 95 ------------------- .../effects/decals/Cleanable/humans.dm | 2 - code/game/objects/obj_defense.dm | 4 +- code/modules/admin/verbs/adminhelp.dm | 3 - .../atmospherics/machinery/datum_pipeline.dm | 2 - code/modules/events/money_hacker.dm | 4 - code/modules/events/spider_infestation.dm | 3 - .../mob/living/simple_animal/tribbles.dm | 12 +-- code/modules/mob/login.dm | 3 - code/modules/mob/mob.dm | 9 +- .../ruins/objects_and_mobs/necropolis_gate.dm | 7 -- code/modules/space_management/space_level.dm | 10 +- {strings => config}/names/megacarp1.txt | 0 {strings => config}/names/megacarp2.txt | 2 +- paradise.dme | 1 - 31 files changed, 51 insertions(+), 219 deletions(-) delete mode 100644 code/game/magic/Uristrunes.dm rename {strings => config}/names/megacarp1.txt (100%) rename {strings => config}/names/megacarp2.txt (98%) diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index 3b7d061ace3..89bd2d9b214 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -23,8 +23,5 @@ GLOBAL_VAR_INIT(dooc_enabled, TRUE) /// Is deadchat currently enabled? GLOBAL_VAR_INIT(dsay_enabled, TRUE) -/// Amount of time (in minutes) that must pass between a player dying as a mouse and repawning as a mouse -GLOBAL_VAR_INIT(mouse_respawn_time, 5) - /// Enable debugging of things such as job starts and other things GLOBAL_VAR_INIT(debug2, TRUE) diff --git a/code/_globalvars/game_modes.dm b/code/_globalvars/game_modes.dm index e88e6a6047c..9a8d0176764 100644 --- a/code/_globalvars/game_modes.dm +++ b/code/_globalvars/game_modes.dm @@ -2,7 +2,6 @@ GLOBAL_VAR_INIT(master_mode, "extended") //"extended" GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode -GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null GLOBAL_VAR(custom_event_msg) diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 2c49057e636..35b12180a1a 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -15,9 +15,6 @@ GLOBAL_VAR_INIT(nervousblock, 0) GLOBAL_VAR_INIT(wingdingsblock, 0) GLOBAL_VAR_INIT(monkeyblock, DNA_SE_LENGTH) // Monkey block will always be the DNA_SE_LENGTH -GLOBAL_VAR_INIT(blockadd, 0) -GLOBAL_VAR_INIT(diffmut, 0) - GLOBAL_VAR_INIT(breathlessblock, 0) GLOBAL_VAR_INIT(remoteviewblock, 0) GLOBAL_VAR_INIT(regenerateblock, 0) diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 17444f66207..b9761bc863f 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -20,7 +20,6 @@ GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clie GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain simple animals GLOBAL_LIST_EMPTY(human_list) //all instances of /mob/living/carbon/human and subtypes -GLOBAL_LIST_EMPTY(spirits) //List of all the spirits, including Masks GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player GLOBAL_LIST_EMPTY(respawnable_list) //List of all mobs, dead or in mindless creatures that still be respawned. diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm index 1350d83c0b2..a7ad349a95e 100644 --- a/code/_globalvars/lists/names.dm +++ b/code/_globalvars/lists/names.dm @@ -10,8 +10,8 @@ GLOBAL_LIST_INIT(last_names, file2list("config/names/last.txt")) GLOBAL_LIST_INIT(clown_names, file2list("config/names/clown.txt")) GLOBAL_LIST_INIT(mime_names, file2list("config/names/mime.txt")) GLOBAL_LIST_INIT(golem_names, file2list("config/names/golem.txt")) -GLOBAL_LIST_INIT(megacarp_first_names, file2list("strings/names/megacarp1.txt")) -GLOBAL_LIST_INIT(megacarp_last_names, file2list("strings/names/megacarp2.txt")) +GLOBAL_LIST_INIT(megacarp_first_names, file2list("config/names/megacarp1.txt")) +GLOBAL_LIST_INIT(megacarp_last_names, file2list("config/names/megacarp2.txt")) GLOBAL_LIST_INIT(verbs, file2list("config/names/verbs.txt")) GLOBAL_LIST_INIT(nouns, file2list("config/names/nouns.txt")) diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index ee2fb9b16a1..4c86c655937 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -4,7 +4,6 @@ GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction da GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff GLOBAL_LIST_INIT(landmarks_list, list()) //list of all landmarks created GLOBAL_LIST_INIT(surgery_steps, list()) //list of all surgery steps |BS12 -GLOBAL_LIST_INIT(side_effects, list()) //list of all medical sideeffects types by thier names |BS12 GLOBAL_LIST_INIT(mechas_list, list()) //list of all mechs. Used by hostile mobs target tracking. GLOBAL_LIST_INIT(joblist, list()) //list of all jobstypes, minus borg and AI GLOBAL_LIST_INIT(airlocks, list()) //list of all airlocks @@ -47,8 +46,6 @@ GLOBAL_LIST_EMPTY(ladders) GLOBAL_LIST_INIT(active_diseases, list()) //List of Active disease in all mobs; purely for quick referencing. GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects -GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert -GLOBAL_LIST_EMPTY(explosive_walls) GLOBAL_LIST_EMPTY(engine_beacon_list) diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index ab8358a5db1..51f916c5d31 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -45,6 +45,4 @@ GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds GLOBAL_DATUM_INIT(data_core, /datum/datacore, new) // Station datacore, manifest, etc -GLOBAL_LIST_EMPTY(ability_verbs) // Create-level abilities GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)) - diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm index 3dbea1c3c15..eb8af32b9b4 100644 --- a/code/controllers/subsystem/acid.dm +++ b/code/controllers/subsystem/acid.dm @@ -8,8 +8,14 @@ SUBSYSTEM_DEF(acid) var/list/currentrun = list() var/list/processing = list() + var/acid_overlay + /datum/controller/subsystem/acid/stat_entry() - ..("P:[processing.len]") + ..("P:[length(processing)]") + +/datum/controller/subsystem/acid/Initialize(start_timeofday) + acid_overlay = mutable_appearance('icons/effects/effects.dmi', "acid") + return ..() /datum/controller/subsystem/acid/get_metrics() . = ..() @@ -35,7 +41,7 @@ SUBSYSTEM_DEF(acid) if(O.acid_level && O.acid_processing()) else - O.cut_overlay(GLOB.acid_overlay, TRUE) + O.cut_overlay(acid_overlay, TRUE) processing -= O if(MC_TICK_CHECK) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 132ddf6ff66..09a18281ca3 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -8,14 +8,6 @@ */ GLOBAL_LIST_EMPTY(archive_diseases) -// The order goes from easy to cure to hard to cure. -GLOBAL_LIST_INIT(advance_cures, list( - "sodiumchloride", "sugar", "orangejuice", - "spaceacillin", "salglu_solution", "ethanol", - "teporone", "diphenhydramine", "lipolicide", - "silver", "gold" -)) - /* PROPERTIES @@ -23,7 +15,6 @@ GLOBAL_LIST_INIT(advance_cures, list( */ /datum/disease/advance - name = "Unknown" // We will always let our Virologist name our disease. desc = "An engineered disease which can contain a multitude of symptoms." form = "Advance Disease" // Will let med-scanners know that this disease was engineered. @@ -38,6 +29,14 @@ GLOBAL_LIST_INIT(advance_cures, list( var/id = "" var/processing = 0 + // The order goes from easy to cure to hard to cure. + var/static/list/advance_cures = list( + "sodiumchloride", "sugar", "orangejuice", + "spaceacillin", "salglu_solution", "ethanol", + "teporone", "diphenhydramine", "lipolicide", + "silver", "gold" + ) + /* OLD PROCS @@ -245,18 +244,15 @@ GLOBAL_LIST_INIT(advance_cures, list( // Will generate a random cure, the less resistance the symptoms have, the harder the cure. /datum/disease/advance/proc/GenerateCure(list/properties = list()) - if(properties && properties.len) - var/res = clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len) + if(length(properties)) + var/res = clamp(properties["resistance"] - (length(symptoms) / 2), 1, length(advance_cures)) // to_chat(world, "Res = [res]") - cures = list(GLOB.advance_cures[res]) + cures = list(advance_cures[res]) // Get the cure name from the cure_id var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]] cure_text = D.name - - return - // Randomly generate a symptom, has a chance to lose or gain a symptom. /datum/disease/advance/proc/Evolve(min_level, max_level) var/s = safepick(GenerateSymptoms(min_level, max_level, 1)) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 96d8c7fff30..57a3e5c9730 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -1,5 +1,3 @@ -GLOBAL_LIST_EMPTY(all_cults) - /datum/game_mode /// A list of all minds currently in the cult var/list/datum/mind/cult = list() diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index a0f8cf0e1ae..914879d4b14 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -211,16 +211,6 @@ return TRUE return ..() -GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( - /turf/simulated/floor/engine/cult, - /turf/space, - /turf/simulated/wall/indestructible, - /turf/simulated/floor/plating/lava, - /turf/simulated/floor/chasm, - /turf/simulated/wall/cult, - /turf/simulated/wall/cult/artificer - ))) - /obj/structure/cult/functional/pylon name = "pylon" desc = "A floating crystal that slowly heals those faithful to a cult." @@ -236,10 +226,22 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( var/corrupt_delay = 50 var/last_corrupt = 0 + var/static/list/blacklisted_turfs + /obj/structure/cult/functional/pylon/Initialize(mapload) . = ..() START_PROCESSING(SSobj, src) icon_state = SSticker.cultdat?.pylon_icon_state + if(!blacklisted_turfs) + blacklisted_turfs = typecacheof(list( + /turf/simulated/floor/engine/cult, + /turf/space, + /turf/simulated/wall/indestructible, + /turf/simulated/floor/plating/lava, + /turf/simulated/floor/chasm, + /turf/simulated/wall/cult, + /turf/simulated/wall/cult/artificer + )) /obj/structure/cult/functional/pylon/attack_hand(mob/living/user)//override as it should not create anything return @@ -285,7 +287,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( if(istype(T, /turf/simulated/floor/engine/cult)) cultturfs |= T continue - if(is_type_in_typecache(T, GLOB.blacklisted_pylon_turfs)) + if(is_type_in_typecache(T, blacklisted_turfs)) continue else validturfs |= T diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 9129f928888..c7eb1aab06b 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,5 +1,4 @@ GLOBAL_LIST_EMPTY(sacrificed) // A mixed list of minds and mobs -GLOBAL_LIST_EMPTY(wall_runes) // A list of all cult shield walls GLOBAL_LIST_EMPTY(teleport_runes) // I'll give you two guesses /* @@ -222,14 +221,6 @@ structure_check() searches for nearby cultist structures required for the invoca animate(src, color = rune_blood_color, time = 5) -/obj/effect/rune/proc/check_icon() - if(!SSticker.mode)//work around for maps with runes and cultdat is not loaded all the way - var/bits = make_bit_triplet() - icon = get_rune(bits) - else - icon = get_rune_cult(invocation) - - //Malformed Rune: This forms if a rune is not drawn correctly. Invoking it does nothing but hurt the user. /obj/effect/rune/malformed cultist_name = "Malformed" @@ -660,12 +651,10 @@ structure_check() searches for nearby cultist structures required for the invoca /obj/effect/rune/wall/Initialize(mapload) . = ..() - GLOB.wall_runes += src B = new /obj/machinery/shield/cult/barrier(loc) B.parent_rune = src /obj/effect/rune/wall/Destroy() - GLOB.wall_runes -= src if(B && !QDELETED(B)) QDEL_NULL(B) return ..() @@ -993,9 +982,6 @@ structure_check() searches for nearby cultist structures required for the invoca cultist_name = "Summon [SSticker.cultdat ? SSticker.cultdat.entity_name : "your god"]" cultist_desc = "tears apart dimensional barriers, calling forth [SSticker.cultdat ? SSticker.cultdat.entity_title3 : "your god"]." -/obj/effect/rune/narsie/check_icon() - return - /obj/effect/rune/narsie/cult_conceal() //can't hide this, and you wouldn't want to return diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 7315b52b062..6990ff92d9b 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -15,13 +15,6 @@ return assigned /proc/setupgenetics() - - if(prob(50)) - GLOB.blockadd = rand(-300,300) - if(prob(75)) - GLOB.diffmut = rand(0,20) - - //Thanks to nexis for the fancy code // BITCH I AIN'T DONE YET diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index d26872bacd0..2ba70abcfa9 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -1,4 +1,3 @@ - GLOBAL_LIST_INIT(command_positions, list( "Captain", "Head of Personnel", diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index e3abb5b4842..b8d0a86c1d9 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -12,14 +12,9 @@ /obj/machinery/computer/station_alert/Initialize(mapload) . = ..() - GLOB.alert_consoles += src RegisterSignal(SSalarm, COMSIG_TRIGGERED_ALARM, .proc/alarm_triggered) RegisterSignal(SSalarm, COMSIG_CANCELLED_ALARM, .proc/alarm_cancelled) -/obj/machinery/computer/station_alert/Destroy() - GLOB.alert_consoles -= src - return ..() - /obj/machinery/computer/station_alert/attack_ai(mob/user) add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 027259adb79..20cf61accb2 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -144,14 +144,9 @@ eprojectile = /obj/item/projectile/beam/pulse eshot_sound = 'sound/weapons/pulse.ogg' -GLOBAL_LIST_EMPTY(turret_icons) /obj/machinery/porta_turret/update_icon() - if(!GLOB.turret_icons) - GLOB.turret_icons = list() - GLOB.turret_icons["open"] = image(icon, "openTurretCover") - underlays.Cut() - underlays += GLOB.turret_icons["open"] + underlays += image(icon, "openTurretCover") if(stat & BROKEN) icon_state = "destroyed_target_prism" diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm deleted file mode 100644 index 11ca1467918..00000000000 --- a/code/game/magic/Uristrunes.dm +++ /dev/null @@ -1,95 +0,0 @@ -/proc/get_rune_cult(word) - var/animated - - if(word && !(SSticker.cultdat.theme == "fire" || SSticker.cultdat.theme == "death")) - animated = 1 - else - animated = 0 - - var/bits = make_bit_triplet() - - return get_rune(bits, animated) - - -GLOBAL_LIST_EMPTY(cult_rune_cache) -GLOBAL_VAR_INIT(cult_rune_style, "rune") // Style of run the cult is using (fire, death, regular, etc) - -/proc/get_rune(symbol_bits, animated = 0) - var/lookup = "[symbol_bits]-[animated]" - - - if(!SSticker.mode)//work around for maps with runes and cultdat is not loaded all the way - GLOB.cult_rune_style = "rune" - else if(SSticker.cultdat.theme == "fire") - GLOB.cult_rune_style = "fire-rune" - else if(SSticker.cultdat.theme == "death") - GLOB.cult_rune_style = "death-rune" - - - if(lookup in GLOB.cult_rune_cache) - return GLOB.cult_rune_cache[lookup] - - var/icon/I = icon('icons/effects/uristrunes.dmi', "[GLOB.cult_rune_style]-179") - - for(var/i = 0, i < 10, i++) - if(symbol_bits & (1 << i)) - I.Blend(icon('icons/effects/uristrunes.dmi', "[GLOB.cult_rune_style]-[1 << i]"), ICON_OVERLAY) - - - I.SwapColor(rgb(0, 0, 0, 100), rgb(100, 0, 0, 200))//TO DO COMMENT:NEED TO ADJUST FOR DIFFRNET CULTS - I.SwapColor(rgb(0, 0, 0, 50), rgb(150, 0, 0, 200)) - - for(var/x = 1, x <= 32, x++) - for(var/y = 1, y <= 32, y++) - var/p = I.GetPixel(x, y) - - if(p == null) - var/n = I.GetPixel(x, y + 1) - var/s = I.GetPixel(x, y - 1) - var/e = I.GetPixel(x + 1, y) - var/w = I.GetPixel(x - 1, y) - - if(n == "#000000" || s == "#000000" || e == "#000000" || w == "#000000") - I.DrawBox(rgb(200, 0, 0, 200), x, y) - - else - var/ne = I.GetPixel(x + 1, y + 1) - var/se = I.GetPixel(x + 1, y - 1) - var/nw = I.GetPixel(x - 1, y + 1) - var/sw = I.GetPixel(x - 1, y - 1) - - if(ne == "#000000" || se == "#000000" || nw == "#000000" || sw == "#000000") - I.DrawBox(rgb(200, 0, 0, 100), x, y) - - var/icon/result = icon(I, "") - - result.Insert(I, "", frame = 1, delay = 10) - - if(animated == 1) - var/icon/I2 = icon(I, "") - I2.MapColors(rgb(0xff,0x0c,0,0), rgb(0,0,0,0), rgb(0,0,0,0), rgb(0,0,0,0xff)) - I2.SetIntensity(1.04) - - var/icon/I3 = icon(I, "") - I3.MapColors(rgb(0xff,0x18,0,0), rgb(0,0,0,0), rgb(0,0,0,0), rgb(0,0,0,0xff)) - I3.SetIntensity(1.08) - - var/icon/I4 = icon(I, "") - I4.MapColors(rgb(0xff,0x24,0,0), rgb(0,0,0,0), rgb(0,0,0,0), rgb(0,0,0,0xff)) - I4.SetIntensity(1.12) - - var/icon/I5 = icon(I, "") - I5.MapColors(rgb(0xff,0x30,0,0), rgb(0,0,0,0), rgb(0,0,0,0), rgb(0,0,0,0xff)) - I5.SetIntensity(1.16) - - result.Insert(I2, "", frame = 2, delay = 4) - result.Insert(I3, "", frame = 3, delay = 3) - result.Insert(I4, "", frame = 4, delay = 2) - result.Insert(I5, "", frame = 5, delay = 6) - result.Insert(I4, "", frame = 6, delay = 2) - result.Insert(I3, "", frame = 7, delay = 2) - result.Insert(I2, "", frame = 8, delay = 2) - - GLOB.cult_rune_cache[lookup] = result - - return result diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 29ef7eb3ad5..9a4a946a5d6 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -1,7 +1,5 @@ #define DRYING_TIME 5 * 60 * 10 //for 1 unit of depth in puddle (amount var) -GLOBAL_LIST_EMPTY(splatter_cache) - /obj/effect/decal/cleanable/blood name = "blood" var/dryname = "dried blood" diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index c6a66c2d40e..d127768c2e1 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -163,15 +163,13 @@ ///// ACID -GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/effects/effects.dmi', "acid")) - ///the obj's reaction when touched by acid /obj/acid_act(acidpwr, acid_volume) if(!(resistance_flags & UNACIDABLE) && acid_volume) if(!acid_level) SSacid.processing[src] = src - add_overlay(GLOB.acid_overlay, TRUE) + add_overlay(SSacid.acid_overlay, TRUE) var/acid_cap = acidpwr * 300 //so we cannot use huge amounts of weak acids to do as well as strong acids. if(acid_level < acid_cap) acid_level = min(acid_level + acidpwr * acid_volume, acid_cap) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 939bfd10f54..bb4f1a9793b 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -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" diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index ff9fb9a4ab1..0ce9d5175b4 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -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)) diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index ba50cbbfd8f..c27240cfcce 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -1,8 +1,6 @@ #define MINIMUM_PERCENTAGE_LOSS 0.5 #define VARIABLE_LOSS 2 // Invariant: 1 - VARIABLE_LOSS/10 >= MINIMUM_PERCENTAGE_LOSS -GLOBAL_VAR_INIT(account_hack_attempted, 0) - /datum/event/money_hacker var/datum/money_account/affected_account endWhen = 100 @@ -12,8 +10,6 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0) end_time = world.time + 6000 if(GLOB.all_money_accounts.len) affected_account = pick(GLOB.all_money_accounts) - - GLOB.account_hack_attempted = 1 else kill() diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 39f16c183f7..9c73be880a2 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -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() if(successSpawn) diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index 46a13021aab..bdbdefc22bc 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -1,6 +1,3 @@ -GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all tribbles, not just the new one being made. - - /mob/living/simple_animal/tribble name = "tribble" desc = "It's a small furry creature that makes a soft trill." @@ -22,7 +19,8 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib response_harm = "whacks" harm_intent_damage = 5 var/gestation = 0 - var/maxtribbles = 50 //change this to change the max limit + var/static/total_tribbles = 0 + var/static/max_tribbles = 50 //change this to change the max limit wander = 1 @@ -35,7 +33,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib //random pixel offsets so they cover the floor src.pixel_x = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5) - GLOB.totaltribbles += 1 + total_tribbles++ /mob/living/simple_animal/tribble/attack_hand(mob/user as mob) @@ -60,7 +58,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib /mob/living/simple_animal/tribble/proc/procreate() - if(GLOB.totaltribbles <= maxtribbles) + if(total_tribbles <= max_tribbles) for(var/mob/living/simple_animal/tribble/F in src.loc) if(!F || F == src) new /mob/living/simple_animal/tribble(src.loc) @@ -83,7 +81,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib . = ..(gibbed) if(!.) return FALSE - GLOB.totaltribbles -= 1 + total_tribbles-- //||Item version of the trible || diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 12ee29ebb1f..d6118d94b4b 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -52,9 +52,6 @@ if(ckey in GLOB.deadmins) verbs += /client/proc/readmin - //Clear ability list and update from mob. - client.verbs -= GLOB.ability_verbs - if(abilities) client.verbs |= abilities diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3448ea52462..5f421e65b95 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1130,13 +1130,14 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ to_chat(usr, "You are not dead or you have given up your right to be respawned!") return +#define MOUSE_RESPAWN_TIME 5 MINUTES /mob/proc/become_mouse() var/timedifference = world.time - client.time_died_as_mouse - if(client.time_died_as_mouse && timedifference <= GLOB.mouse_respawn_time * 600) + if(client.time_died_as_mouse && timedifference <= MOUSE_RESPAWN_TIME) var/timedifference_text - timedifference_text = time2text(GLOB.mouse_respawn_time * 600 - timedifference,"mm:ss") - to_chat(src, "You may only spawn again as a mouse more than [GLOB.mouse_respawn_time] minutes after your death. You have [timedifference_text] left.") + timedifference_text = time2text(MOUSE_RESPAWN_TIME - timedifference, "mm:ss") + to_chat(src, "You may only spawn again as a mouse more than [MOUSE_RESPAWN_TIME / 600] minutes after your death. You have [timedifference_text] left.") return //find a viable mouse candidate @@ -1149,6 +1150,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ else to_chat(src, "Unable to find any unwelded vents to spawn mice at.") +#undef MOUSE_RESPAWN_TIME + /mob/proc/assess_threat() //For sec bot threat assessment return 5 diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index 2277e096a30..7488e5341d1 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -137,19 +137,12 @@ /obj/structure/necropolis_gate/locked locked = TRUE -GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) /obj/structure/necropolis_gate/legion_gate desc = "A tremendous, impossibly large gateway, set into a massive tower of stone." sight_blocker_distance = 2 -/obj/structure/necropolis_gate/legion_gate/Initialize() - . = ..() - GLOB.necropolis_gate = src - /obj/structure/necropolis_gate/legion_gate/Destroy(force) if(force) - if(GLOB.necropolis_gate == src) - GLOB.necropolis_gate = null . = ..() else return QDEL_HINT_LETMELIVE diff --git a/code/modules/space_management/space_level.dm b/code/modules/space_management/space_level.dm index 44c692363af..b68efba7ca3 100644 --- a/code/modules/space_management/space_level.dm +++ b/code/modules/space_management/space_level.dm @@ -143,10 +143,6 @@ D.register() D.forceMove(locate(200, 200, zpos)) -GLOBAL_LIST_INIT(atmos_machine_typecache, typecacheof(/obj/machinery/atmospherics)) -GLOBAL_LIST_INIT(cable_typecache, typecacheof(/obj/structure/cable)) -GLOBAL_LIST_INIT(maploader_typecache, typecacheof(/obj/effect/landmark/map_loader)) - /datum/space_level/proc/resume_init() if(dirt_count > 0) throw EXCEPTION("Init told to resume when z-level still dirty. Z level: '[zpos]'") @@ -156,9 +152,9 @@ GLOBAL_LIST_INIT(maploader_typecache, typecacheof(/obj/effect/landmark/map_loade init_list = list() var/watch = start_watch() listclearnulls(our_atoms) - var/list/late_maps = typecache_filter_list(our_atoms, GLOB.maploader_typecache) - var/list/pipes = typecache_filter_list(our_atoms, GLOB.atmos_machine_typecache) - var/list/cables = typecache_filter_list(our_atoms, GLOB.cable_typecache) + var/list/late_maps = typecache_filter_list(our_atoms, typecacheof(/obj/effect/landmark/map_loader)) + var/list/pipes = typecache_filter_list(our_atoms, typecacheof(/obj/machinery/atmospherics)) + var/list/cables = typecache_filter_list(our_atoms, typecacheof(/obj/structure/cable)) // If we don't carefully add dirt around the map templates, bad stuff happens // so we separate them out here our_atoms -= late_maps diff --git a/strings/names/megacarp1.txt b/config/names/megacarp1.txt similarity index 100% rename from strings/names/megacarp1.txt rename to config/names/megacarp1.txt diff --git a/strings/names/megacarp2.txt b/config/names/megacarp2.txt similarity index 98% rename from strings/names/megacarp2.txt rename to config/names/megacarp2.txt index f00ec8bb2ce..31542a93657 100644 --- a/strings/names/megacarp2.txt +++ b/config/names/megacarp2.txt @@ -51,4 +51,4 @@ Freon Shark Plasma Shark Guru Shark Toxic Shark -Spider Shark +Spider Shark \ No newline at end of file diff --git a/paradise.dme b/paradise.dme index 456ab1bf3d5..812df2d5adb 100644 --- a/paradise.dme +++ b/paradise.dme @@ -759,7 +759,6 @@ #include "code\game\machinery\tcomms\nttc.dm" #include "code\game\machinery\tcomms\presets.dm" #include "code\game\machinery\tcomms\relay.dm" -#include "code\game\magic\Uristrunes.dm" #include "code\game\mecha\mech_bay.dm" #include "code\game\mecha\mech_fabricator.dm" #include "code\game\mecha\mecha.dm"