From ca87534d467ccfa80b6893423f087ee0662ae420 Mon Sep 17 00:00:00 2001
From: dearmochi <1496804+dearmochi@users.noreply.github.com>
Date: Sun, 28 Nov 2021 10:18:27 +0100
Subject: [PATCH] Revert "Removes some unnecessary global variables (#16353)"
(#17170)
---
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 +-
paradise.dme | 1 +
{config => strings}/names/megacarp1.txt | 0
{config => strings}/names/megacarp2.txt | 2 +-
31 files changed, 219 insertions(+), 51 deletions(-)
create mode 100644 code/game/magic/Uristrunes.dm
rename {config => strings}/names/megacarp1.txt (100%)
rename {config => strings}/names/megacarp2.txt (98%)
diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm
index 89bd2d9b214..3b7d061ace3 100644
--- a/code/_globalvars/configuration.dm
+++ b/code/_globalvars/configuration.dm
@@ -23,5 +23,8 @@ 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 9a8d0176764..e88e6a6047c 100644
--- a/code/_globalvars/game_modes.dm
+++ b/code/_globalvars/game_modes.dm
@@ -2,6 +2,7 @@
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 35b12180a1a..2c49057e636 100644
--- a/code/_globalvars/genetics.dm
+++ b/code/_globalvars/genetics.dm
@@ -15,6 +15,9 @@ 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 b9761bc863f..17444f66207 100644
--- a/code/_globalvars/lists/mobs.dm
+++ b/code/_globalvars/lists/mobs.dm
@@ -20,6 +20,7 @@ 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 a7ad349a95e..1350d83c0b2 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("config/names/megacarp1.txt"))
-GLOBAL_LIST_INIT(megacarp_last_names, file2list("config/names/megacarp2.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(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 4c86c655937..ee2fb9b16a1 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -4,6 +4,7 @@ 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
@@ -46,6 +47,8 @@ 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 51f916c5d31..ab8358a5db1 100644
--- a/code/_globalvars/misc.dm
+++ b/code/_globalvars/misc.dm
@@ -45,4 +45,6 @@ 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 eb8af32b9b4..3dbea1c3c15 100644
--- a/code/controllers/subsystem/acid.dm
+++ b/code/controllers/subsystem/acid.dm
@@ -8,14 +8,8 @@ SUBSYSTEM_DEF(acid)
var/list/currentrun = list()
var/list/processing = list()
- var/acid_overlay
-
/datum/controller/subsystem/acid/stat_entry()
- ..("P:[length(processing)]")
-
-/datum/controller/subsystem/acid/Initialize(start_timeofday)
- acid_overlay = mutable_appearance('icons/effects/effects.dmi', "acid")
- return ..()
+ ..("P:[processing.len]")
/datum/controller/subsystem/acid/get_metrics()
. = ..()
@@ -41,7 +35,7 @@ SUBSYSTEM_DEF(acid)
if(O.acid_level && O.acid_processing())
else
- O.cut_overlay(acid_overlay, TRUE)
+ O.cut_overlay(GLOB.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 09a18281ca3..132ddf6ff66 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -8,6 +8,14 @@
*/
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
@@ -15,6 +23,7 @@ GLOBAL_LIST_EMPTY(archive_diseases)
*/
/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.
@@ -29,14 +38,6 @@ GLOBAL_LIST_EMPTY(archive_diseases)
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
@@ -244,15 +245,18 @@ GLOBAL_LIST_EMPTY(archive_diseases)
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
/datum/disease/advance/proc/GenerateCure(list/properties = list())
- if(length(properties))
- var/res = clamp(properties["resistance"] - (length(symptoms) / 2), 1, length(advance_cures))
+ if(properties && properties.len)
+ var/res = clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len)
// to_chat(world, "Res = [res]")
- cures = list(advance_cures[res])
+ cures = list(GLOB.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 57a3e5c9730..96d8c7fff30 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -1,3 +1,5 @@
+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 914879d4b14..a0f8cf0e1ae 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -211,6 +211,16 @@
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."
@@ -226,22 +236,10 @@
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
@@ -287,7 +285,7 @@
if(istype(T, /turf/simulated/floor/engine/cult))
cultturfs |= T
continue
- if(is_type_in_typecache(T, blacklisted_turfs))
+ if(is_type_in_typecache(T, GLOB.blacklisted_pylon_turfs))
continue
else
validturfs |= T
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index c7eb1aab06b..9129f928888 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -1,4 +1,5 @@
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
/*
@@ -221,6 +222,14 @@ 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"
@@ -651,10 +660,12 @@ 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 ..()
@@ -982,6 +993,9 @@ 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 6990ff92d9b..7315b52b062 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -15,6 +15,13 @@
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 2ba70abcfa9..d26872bacd0 100644
--- a/code/game/jobs/jobs.dm
+++ b/code/game/jobs/jobs.dm
@@ -1,3 +1,4 @@
+
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 b8d0a86c1d9..e3abb5b4842 100644
--- a/code/game/machinery/computer/station_alert.dm
+++ b/code/game/machinery/computer/station_alert.dm
@@ -12,9 +12,14 @@
/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 20cf61accb2..027259adb79 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -144,9 +144,14 @@
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 += image(icon, "openTurretCover")
+ underlays += GLOB.turret_icons["open"]
if(stat & BROKEN)
icon_state = "destroyed_target_prism"
diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm
new file mode 100644
index 00000000000..11ca1467918
--- /dev/null
+++ b/code/game/magic/Uristrunes.dm
@@ -0,0 +1,95 @@
+/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 9a4a946a5d6..29ef7eb3ad5 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -1,5 +1,7 @@
#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 d127768c2e1..c6a66c2d40e 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -163,13 +163,15 @@
///// 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(SSacid.acid_overlay, TRUE)
+ add_overlay(GLOB.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 bb4f1a9793b..939bfd10f54 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -1,3 +1,6 @@
+//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 0ce9d5175b4..ff9fb9a4ab1 100644
--- a/code/modules/atmospherics/machinery/datum_pipeline.dm
+++ b/code/modules/atmospherics/machinery/datum_pipeline.dm
@@ -28,6 +28,8 @@
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 c27240cfcce..ba50cbbfd8f 100644
--- a/code/modules/events/money_hacker.dm
+++ b/code/modules/events/money_hacker.dm
@@ -1,6 +1,8 @@
#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
@@ -10,6 +12,8 @@
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 9c73be880a2..39f16c183f7 100644
--- a/code/modules/events/spider_infestation.dm
+++ b/code/modules/events/spider_infestation.dm
@@ -1,3 +1,5 @@
+GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
+
/datum/event/spider_infestation
announceWhen = 400
var/spawncount = 1
@@ -6,6 +8,7 @@
/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 bdbdefc22bc..46a13021aab 100644
--- a/code/modules/mob/living/simple_animal/tribbles.dm
+++ b/code/modules/mob/living/simple_animal/tribbles.dm
@@ -1,3 +1,6 @@
+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."
@@ -19,8 +22,7 @@
response_harm = "whacks"
harm_intent_damage = 5
var/gestation = 0
- var/static/total_tribbles = 0
- var/static/max_tribbles = 50 //change this to change the max limit
+ var/maxtribbles = 50 //change this to change the max limit
wander = 1
@@ -33,7 +35,7 @@
//random pixel offsets so they cover the floor
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
- total_tribbles++
+ GLOB.totaltribbles += 1
/mob/living/simple_animal/tribble/attack_hand(mob/user as mob)
@@ -58,7 +60,7 @@
/mob/living/simple_animal/tribble/proc/procreate()
- if(total_tribbles <= max_tribbles)
+ if(GLOB.totaltribbles <= maxtribbles)
for(var/mob/living/simple_animal/tribble/F in src.loc)
if(!F || F == src)
new /mob/living/simple_animal/tribble(src.loc)
@@ -81,7 +83,7 @@
. = ..(gibbed)
if(!.)
return FALSE
- total_tribbles--
+ GLOB.totaltribbles -= 1
//||Item version of the trible ||
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index d6118d94b4b..12ee29ebb1f 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -52,6 +52,9 @@
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 5f421e65b95..3448ea52462 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1130,14 +1130,13 @@ 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 <= MOUSE_RESPAWN_TIME)
+ if(client.time_died_as_mouse && timedifference <= GLOB.mouse_respawn_time * 600)
var/timedifference_text
- 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.")
+ 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.")
return
//find a viable mouse candidate
@@ -1150,8 +1149,6 @@ 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 7488e5341d1..2277e096a30 100644
--- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
@@ -137,12 +137,19 @@
/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 b68efba7ca3..44c692363af 100644
--- a/code/modules/space_management/space_level.dm
+++ b/code/modules/space_management/space_level.dm
@@ -143,6 +143,10 @@
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]'")
@@ -152,9 +156,9 @@
init_list = list()
var/watch = start_watch()
listclearnulls(our_atoms)
- 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))
+ 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)
// 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/paradise.dme b/paradise.dme
index 812df2d5adb..456ab1bf3d5 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -759,6 +759,7 @@
#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"
diff --git a/config/names/megacarp1.txt b/strings/names/megacarp1.txt
similarity index 100%
rename from config/names/megacarp1.txt
rename to strings/names/megacarp1.txt
diff --git a/config/names/megacarp2.txt b/strings/names/megacarp2.txt
similarity index 98%
rename from config/names/megacarp2.txt
rename to strings/names/megacarp2.txt
index 31542a93657..f00ec8bb2ce 100644
--- a/config/names/megacarp2.txt
+++ b/strings/names/megacarp2.txt
@@ -51,4 +51,4 @@ Freon Shark
Plasma Shark
Guru Shark
Toxic Shark
-Spider Shark
\ No newline at end of file
+Spider Shark