From bf7f08587d1cc3d5b8bda2e5b20df0f94e6bb677 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Thu, 7 Mar 2024 10:06:01 +0100
Subject: [PATCH 01/12] sdfsd
---
code/controllers/subsystems/mob.dm | 5 ++++-
code/defines/mutable_appearance.dm | 6 +++---
.../game/objects/items/weapons/implants/implantpad.dm | 4 ++--
.../client/preference_setup/preference_setup.dm | 4 ++--
code/modules/client/preferences.dm | 11 ++++++-----
code/modules/mob/living/carbon/human/human.dm | 7 +++----
code/modules/mob/living/carbon/human/human_species.dm | 4 ++++
code/modules/mob/living/living.dm | 2 --
code/modules/mob/mob.dm | 4 +++-
9 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/code/controllers/subsystems/mob.dm b/code/controllers/subsystems/mob.dm
index b1800bb888f..8d643869ff4 100644
--- a/code/controllers/subsystems/mob.dm
+++ b/code/controllers/subsystems/mob.dm
@@ -10,7 +10,10 @@ SUBSYSTEM_DEF(mobs)
var/list/processing = list()
var/list/all_rats = list() // Contains all *living* rats.
- var/list/mannequins = list() //Contains all mannequins used by character preview
+
+ ///Contains all mannequins used by character preview
+ var/list/mob/living/carbon/human/dummy/mannequin/mannequins = list()
+
var/list/greatworms = list()
var/list/greatasses = list()
diff --git a/code/defines/mutable_appearance.dm b/code/defines/mutable_appearance.dm
index 1b095c555d5..183435996b6 100644
--- a/code/defines/mutable_appearance.dm
+++ b/code/defines/mutable_appearance.dm
@@ -4,10 +4,10 @@
// Mutable appearances are children of images, just so you know.
-/mutable_appearance/New()
+/mutable_appearance/New(mutable_appearance/to_copy)
..()
- plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE
- // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var
+ if(!to_copy)
+ plane = FLOAT_PLANE
// Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE)
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index 61a19c49a12..27754764dfb 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -14,7 +14,7 @@
/obj/item/implantpad/update_icon()
cut_overlays()
icon_state = "implantpad-[case ? "1" : "0"]"
- if(case.imp)
+ if(case?.imp)
var/obj/item/implant/caseimplant = case.imp
var/implant_overlay_icon_state = "implantstorage_[caseimplant.implant_icon]"
var/mutable_appearance/implant_case_implant_overlay = mutable_appearance(icon, implant_overlay_icon_state)
@@ -44,7 +44,7 @@
..()
/obj/item/implantpad/attack_self(mob/user)
- if(case.imp)
+ if(case?.imp)
case.imp.interact(user)
else
to_chat(user, SPAN_WARNING("There's no implant loaded in \the [src]!"))
diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm
index 8be5a8721e2..c3cf89ef4a9 100644
--- a/code/modules/client/preference_setup/preference_setup.dm
+++ b/code/modules/client/preference_setup/preference_setup.dm
@@ -322,9 +322,9 @@
var/datum/category_group/player_setup_category/cat = category
cat.modified = 1
if (. & TOPIC_REFRESH)
- user.client.prefs.ShowChoices(user)
+ user.client?.prefs?.ShowChoices(user)
if(. & TOPIC_UPDATE_PREVIEW)
- user.client.prefs.update_preview_icon()
+ user.client?.prefs?.update_preview_icon()
/datum/category_item/player_setup_item/CanUseTopic(var/mob/user)
return 1
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index a100f5b2d53..0089d5f7988 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -323,6 +323,7 @@ var/list/preferences_datums = list()
var/obj/screen/S = char_render_holders[index]
client?.screen -= S
qdel(S)
+ QDEL_LIST_ASSOC_VAL(char_render_holders)
char_render_holders = null
/datum/preferences/proc/process_link(mob/user, list/href_list)
@@ -338,10 +339,6 @@ var/list/preferences_datums = list()
else
to_chat(user, "The forum URL is not set in the server configuration.")
return
- else if(href_list["close"])
- // User closed preferences window, cleanup anything we need to.
- clear_character_previews()
- return 1
return 1
/datum/preferences/Topic(href, list/href_list)
@@ -377,8 +374,12 @@ var/list/preferences_datums = list()
if (alert(usr, "You will be unable to re-create a character with the same name! Are you sure you want to permanently [real_name]? The slot can not be restored.", "Permanently Delete Character", "No", "Yes") == "Yes")
if(alert(usr, "Are you sure you want to PERMANENTLY delete your character?","Confirm Permanent Deletion","Yes","No") == "Yes")
delete_character_sql(usr.client)
+ else if(href_list["close"])
+ // User closed preferences window, cleanup anything we need to.
+ clear_character_previews()
+ return 1
else
- return 0
+ return
ShowChoices(usr)
return 1
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index c4e2d6461f4..8b99a1460f0 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1448,10 +1448,9 @@
maxHealth = species.total_health
health = maxHealth
- spawn(0)
- regenerate_icons()
- if (vessel)
- restore_blood()
+ regenerate_icons()
+ if (vessel)
+ restore_blood()
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
if(client && client.screen)
diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm
index 269d501c785..a0ed0a64b5b 100644
--- a/code/modules/mob/living/carbon/human/human_species.dm
+++ b/code/modules/mob/living/carbon/human/human_species.dm
@@ -8,6 +8,10 @@
INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin)
+/mob/living/carbon/human/dummy/mannequin/New(loc, ...)
+ . = ..()
+
+
/mob/living/carbon/human/dummy/mannequin/Initialize()
. = ..()
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 0073505b0e4..485e4648bd3 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -942,8 +942,6 @@ default behaviour is:
for(var/a in auras)
remove_aura(a)
- QDEL_NULL(ability_master)
-
return ..()
/mob/living/proc/nervous_system_failure()
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 0ad321e8077..20fa8478109 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -3,6 +3,8 @@
#define FULLY_BUCKLED 2
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
+ MOB_STOP_THINKING(src)
+
GLOB.mob_list -= src
GLOB.dead_mob_list -= src
GLOB.living_mob_list -= src
@@ -41,7 +43,7 @@
var/atom/movable/AM = src.loc
LAZYREMOVE(AM.contained_mobs, src)
- MOB_STOP_THINKING(src)
+ QDEL_NULL(ability_master)
return ..()
From 07315602e066e2fce195f39e77a64b569322935f Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Fri, 8 Mar 2024 17:46:41 +0100
Subject: [PATCH 02/12] fdsaf
---
code/modules/reagents/reagent_containers/hypospray.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index d321ad0f17a..3b740022cca 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -149,7 +149,7 @@
if(is_open_container())
to_chat(user, SPAN_WARNING("\The [src] hasn't been secured yet!"))
return
- if(do_after(user, 1 SECOND, TRUE))
+ if(do_after(user, 1 SECOND))
inject(user, user, TRUE)
/obj/item/reagent_containers/hypospray/autoinjector/AltClick(mob/user)
From 0ccf45be2241fcf293971fcc4da56648a00ca76b Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sat, 9 Mar 2024 00:28:55 +0100
Subject: [PATCH 03/12] sdafsad
---
code/_compile_options.dm | 4 +-
.../modules/ghostroles/spawner/human/human.dm | 1 -
code/modules/mob/living/carbon/human/human.dm | 3 +-
code/modules/mob/living/silicon/silicon.dm | 3 ++
code/modules/shareddream/dream_entry.dm | 1 -
...luffyghost-attempt3mannequinharddelfix.yml | 42 +++++++++++++++++++
6 files changed, 49 insertions(+), 5 deletions(-)
create mode 100644 html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 25fefdf36f9..5670ee1ede1 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -31,7 +31,7 @@
*/
// !!! For manual use only, remember to recomment before PRing !!!
-// #define TESTING // Creates debug feedback messages and enables many optional testing procs/checks
+#define TESTING // Creates debug feedback messages and enables many optional testing procs/checks
// #define UNIT_TEST
// #define MANUAL_UNIT_TEST
@@ -41,7 +41,7 @@
#ifdef TESTING
///Used to find the sources of harddels, quite laggy, don't be surpised if it freezes your client for a good while
- // #define REFERENCE_TRACKING
+ #define REFERENCE_TRACKING
#ifdef REFERENCE_TRACKING
//Run a lookup on things hard deleting by default.
diff --git a/code/modules/ghostroles/spawner/human/human.dm b/code/modules/ghostroles/spawner/human/human.dm
index 4468e5a78a1..4a741bfb2aa 100644
--- a/code/modules/ghostroles/spawner/human/human.dm
+++ b/code/modules/ghostroles/spawner/human/human.dm
@@ -185,4 +185,3 @@
/mob/living/carbon/human/Destroy()
ghost_spawner = null
. = ..()
- GC_TEMPORARY_HARDDEL
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 8b99a1460f0..4fbdf7b4888 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -127,11 +127,12 @@
QDEL_NULL(l_store)
QDEL_NULL(s_store)
QDEL_NULL(wear_suit)
+ QDEL_NULL(wear_mask)
// Do this last so the mob's stuff doesn't drop on del.
QDEL_NULL(w_uniform)
+ QDEL_LIST_ASSOC_VAL(hud_list)
. = ..()
- GC_TEMPORARY_HARDDEL
/mob/living/carbon/human/can_devour(atom/movable/victim, var/silent = FALSE)
if(!should_have_organ(BP_STOMACH))
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 55781588b0b..8d9376162a8 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -74,6 +74,9 @@
QDEL_NULL(common_radio)
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
AH.unregister_alarm(src)
+
+ QDEL_LIST_ASSOC_VAL(hud_list)
+
return ..()
/mob/living/silicon/proc/init_id()
diff --git a/code/modules/shareddream/dream_entry.dm b/code/modules/shareddream/dream_entry.dm
index 9d05bbefde8..39f0e5d32bc 100644
--- a/code/modules/shareddream/dream_entry.dm
+++ b/code/modules/shareddream/dream_entry.dm
@@ -12,7 +12,6 @@ var/list/dream_entries = list()
srom_pulling = null
bg = null //Just to be sure.
. = ..()
- GC_TEMPORARY_HARDDEL
/mob/living/carbon/human/proc/handle_shared_dreaming(var/force_wakeup = FALSE)
// If they're an Unconsious person with the abillity to do Skrellepathy.
diff --git a/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml b/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
new file mode 100644
index 00000000000..5df926cded4
--- /dev/null
+++ b/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
@@ -0,0 +1,42 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: FluffyGhost
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - bugfix: "Yet another attempt to reduce mannequin harddels."
+ - bugfix: "Fixed various bugs found along the way."
From bec083a63af2672f778893e5d22cd5b5dddddf3e Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sat, 9 Mar 2024 00:31:02 +0100
Subject: [PATCH 04/12] wops
---
code/_compile_options.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 5670ee1ede1..25fefdf36f9 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -31,7 +31,7 @@
*/
// !!! For manual use only, remember to recomment before PRing !!!
-#define TESTING // Creates debug feedback messages and enables many optional testing procs/checks
+// #define TESTING // Creates debug feedback messages and enables many optional testing procs/checks
// #define UNIT_TEST
// #define MANUAL_UNIT_TEST
@@ -41,7 +41,7 @@
#ifdef TESTING
///Used to find the sources of harddels, quite laggy, don't be surpised if it freezes your client for a good while
- #define REFERENCE_TRACKING
+ // #define REFERENCE_TRACKING
#ifdef REFERENCE_TRACKING
//Run a lookup on things hard deleting by default.
From 5dc156978f2dae9ffad5ebd24eac8a42e7374f98 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sat, 9 Mar 2024 01:07:51 +0100
Subject: [PATCH 05/12] sfadsa
---
code/controllers/subsystems/virtual_reality.dm | 9 +++++++--
.../modules/mob/living/carbon/human/human_species.dm | 3 +++
code/modules/mob/mob.dm | 12 +++++++++---
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/code/controllers/subsystems/virtual_reality.dm b/code/controllers/subsystems/virtual_reality.dm
index 33dd447bbba..99ed054457b 100644
--- a/code/controllers/subsystems/virtual_reality.dm
+++ b/code/controllers/subsystems/virtual_reality.dm
@@ -37,10 +37,15 @@ SUBSYSTEM_DEF(virtualreality)
/datum/controller/subsystem/virtualreality/proc/add_robot(var/mob/living/robot, var/network)
if(robot && network)
robots[network] += robot
+ RegisterSignal(robot, COMSIG_QDELETING, PROC_REF(remove_robot), TRUE)
/datum/controller/subsystem/virtualreality/proc/remove_robot(var/mob/living/robot, var/network)
- if(robot && network)
- robots[network].Remove(robot)
+ if(robot)
+ if(network)
+ robots[network].Remove(robot)
+ else
+ for(var/k in robots)
+ robots[k].Remove(robot)
/datum/controller/subsystem/virtualreality/proc/add_bound(var/mob/living/silicon/bound, var/network)
if(bound && network)
diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm
index a0ed0a64b5b..1eb3bb7faa1 100644
--- a/code/modules/mob/living/carbon/human/human_species.dm
+++ b/code/modules/mob/living/carbon/human/human_species.dm
@@ -324,6 +324,9 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy/mannequin)
/mob/living/carbon/human/phoron_golem/Initialize(mapload)
. = ..(mapload, SPECIES_GOLEM_PHORON)
+/mob/living/carbon/human/mhydrogen_golem/Destroy()
+ . = ..()
+
/mob/living/carbon/human/mhydrogen_golem/Initialize(mapload)
. = ..(mapload, SPECIES_GOLEM_HYDROGEN)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 20fa8478109..e8f873c0d5d 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -11,19 +11,25 @@
unset_machine()
QDEL_NULL(hud_used)
lose_hearing_sensitivity()
+
+ for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
+ qdel(spell_master)
+ remove_screen_obj_references()
+
if(client)
- for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
- qdel(spell_master)
- remove_screen_obj_references()
for(var/atom/movable/AM in client.screen)
qdel(AM)
client.screen = list()
+
if (mind)
mind.handle_mob_deletion(src)
+
for(var/infection in viruses)
qdel(infection)
+
for(var/cc in client_colors)
qdel(cc)
+
client_colors = null
viruses.Cut()
item_verbs = null
From 8f0e605a7ddc27b3d216e3ba8fc2e6de0802c038 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 00:11:49 +0100
Subject: [PATCH 06/12] gdfs
---
code/_onclick/hud/hud.dm | 4 -
code/controllers/subsystems/garbage.dm | 15 +-
.../controllers/subsystems/virtual_reality.dm | 2 +-
code/datums/datum.dm | 8 +-
code/defines/procs/hud.dm | 7 -
code/game/atoms_movable.dm | 23 +-
code/game/objects/effects/landmarks.dm | 4 +
code/game/objects/items/stacks/stack.dm | 1 +
code/modules/admin/verbs/buildmode.dm | 4 +-
.../view_variables/reference_tracking.dm | 211 ++++++++++--------
code/modules/lighting/lighting_atom.dm | 11 -
code/modules/lighting/lighting_overlay.dm | 2 +
code/modules/mob/living/carbon/human/human.dm | 10 +-
code/modules/mob/mob.dm | 3 +-
.../computers/modular_computer/core.dm | 4 +-
code/modules/orbit/orbit.dm | 2 +-
code/modules/organs/organ.dm | 57 +++--
code/modules/tgui_input/say_modal/typing.dm | 3 +
...luffyghost-attempt3mannequinharddelfix.yml | 2 +
19 files changed, 216 insertions(+), 157 deletions(-)
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 1a2fc6eff37..b52062bdf78 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -137,9 +137,6 @@ var/list/global_huds
///Boolean, if the action buttons are hidden
var/action_buttons_hidden = FALSE
- var/obj/screen/lingchemdisplay
- var/obj/screen/instability_display //Technomancer.
- var/obj/screen/energy_display //Technomancer.
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/r_hand_hud_object
@@ -163,7 +160,6 @@ var/list/global_huds
hurt_intent = null
disarm_intent = null
help_intent = null
- lingchemdisplay = null
blobpwrdisplay = null
blobhealthdisplay = null
r_hand_hud_object = null
diff --git a/code/controllers/subsystems/garbage.dm b/code/controllers/subsystems/garbage.dm
index 17eee1f305c..ce20a13f9c0 100644
--- a/code/controllers/subsystems/garbage.dm
+++ b/code/controllers/subsystems/garbage.dm
@@ -162,6 +162,9 @@ SUBSYSTEM_DEF(garbage)
lastlevel = level
+// 1 from the hard reference in the queue, and 1 from the variable used before this
+#define REFS_WE_EXPECT 2
+
//We do this rather then for(var/list/ref_info in queue) because that sort of for loop copies the whole list.
//Normally this isn't expensive, but the gc queue can grow to 40k items, and that gets costly/causes overrun.
for (var/i in 1 to length(queue))
@@ -179,9 +182,8 @@ SUBSYSTEM_DEF(garbage)
var/datum/D = L[GC_QUEUE_ITEM_REF]
- // 1 from the hard reference in the queue, and 1 from the variable used before this
// If that's all we've got, send er off
- if (refcount(D) == 2)
+ if (refcount(D) == REFS_WE_EXPECT)
++gcedlasttick
++totalgcs
pass_counts[level]++
@@ -202,12 +204,15 @@ SUBSYSTEM_DEF(garbage)
switch (level)
if (GC_QUEUE_CHECK)
#ifdef REFERENCE_TRACKING
+ // Decides how many refs to look for (potentially)
+ // Based off the remaining and the ones we can account for
+ var/remaining_refs = refcount(D) - REFS_WE_EXPECT
if(reference_find_on_fail[text_ref(D)])
- INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references))
+ INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs)
ref_searching = TRUE
#ifdef GC_FAILURE_HARD_LOOKUP
else
- INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references))
+ INVOKE_ASYNC(D, TYPE_PROC_REF(/datum,find_references), remaining_refs)
ref_searching = TRUE
#endif
reference_find_on_fail -= text_ref(D)
@@ -258,6 +263,8 @@ SUBSYSTEM_DEF(garbage)
queue.Cut(1,count+1)
count = 0
+#undef REFS_WE_EXPECT
+
/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_FILTER)
if (isnull(D))
return
diff --git a/code/controllers/subsystems/virtual_reality.dm b/code/controllers/subsystems/virtual_reality.dm
index 99ed054457b..65eb82c2f90 100644
--- a/code/controllers/subsystems/virtual_reality.dm
+++ b/code/controllers/subsystems/virtual_reality.dm
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(virtualreality)
/datum/controller/subsystem/virtualreality/proc/remove_robot(var/mob/living/robot, var/network)
if(robot)
- if(network)
+ if(network in robots) //This is because signals cannot pass parameters, and QDEL passes the force parameter here
robots[network].Remove(robot)
else
for(var/k in robots)
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 51b85007e5a..ae1814fb017 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -35,8 +35,12 @@
var/datum/weakref/weak_reference
#ifdef REFERENCE_TRACKING
- var/running_find_references
+ /// When was this datum last touched by a reftracker?
+ /// If this value doesn't match with the start of the search
+ /// We know this datum has never been seen before, and we should check it
var/last_find_references = 0
+ /// How many references we're trying to find when searching
+ var/references_to_clear = 0
#ifdef REFERENCE_TRACKING_DEBUG
///Stores info about where refs are found, used for sanity checks and testing
var/list/found_refs
@@ -52,7 +56,7 @@
// Return the appropriate QDEL_HINT; in most cases this is QDEL_HINT_QUEUE.
/datum/proc/Destroy(force=FALSE)
SHOULD_CALL_PARENT(TRUE)
- //SHOULD_NOT_SLEEP(TRUE) //Soon my friend, soon...
+ SHOULD_NOT_SLEEP(TRUE)
tag = null
datum_flags &= ~DF_USE_TAG //In case something tries to REF us
diff --git a/code/defines/procs/hud.dm b/code/defines/procs/hud.dm
index c6d7d76d80f..a7a9aec54af 100644
--- a/code/defines/procs/hud.dm
+++ b/code/defines/procs/hud.dm
@@ -21,13 +21,6 @@ the HUD updates properly! */
if(ismob(loc))
owner = loc
-/image/hud_overlay/Destroy()
- if(owner)
- owner?.client?.images -= src
- owner = null
-
- . = ..()
-
//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
/proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
if(!can_process_hud(M))
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 3930643f195..b6170379703 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -54,16 +54,22 @@
/atom/movable/Destroy()
GLOB.moved_event.unregister_all_movement(loc, src)
- . = ..()
+ //Recalculate opacity
+ var/turf/T = loc
+ if(opacity && istype(T))
+ T.recalc_atom_opacity()
+ T.reconsider_lights()
if(spatial_grid_key)
SSspatial_grid.force_remove_from_grid(src)
+ QDEL_LAZYLIST(contained_mobs)
+
+ . = ..()
+
for(var/movable_content in contents)
qdel(movable_content)
- QDEL_LAZYLIST(contained_mobs)
-
//Pretend this is moveToNullspace()
moveToNullspace()
loc = null
@@ -73,6 +79,13 @@
//If we clear this before the nullspace move, a ref to this object will be hung in any of its movable containers
LAZYNULL(important_recursive_contents)
+
+ vis_locs = null //clears this atom out of all viscontents
+
+ // Checking length(vis_contents) before cutting has significant speed benefits
+ if (length(vis_contents))
+ vis_contents.Cut()
+
screen_loc = null
if(ismob(pulledby))
var/mob/M = pulledby
@@ -273,6 +286,10 @@
verbs.Cut()
..()
+/atom/movable/overlay/Destroy(force)
+ master = null
+ . = ..()
+
/atom/movable/overlay/attackby(a, b)
if (src.master)
return src.master.attackby(a, b)
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index 92663795bee..282550d0411 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -256,6 +256,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/lobby_mobs_location)
LAZYINITLIST(GLOB.force_spawnpoints)
LAZYADD(GLOB.force_spawnpoints[job_tag], loc)
+/obj/effect/landmark/force_spawnpoint/Destroy()
+ LAZYREMOVE(GLOB.force_spawnpoints[job_tag], loc)
+ . = ..()
+
var/list/ruin_landmarks = list()
/obj/effect/landmark/ruin
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 44d6e81a8ca..90b8963ded4 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -55,6 +55,7 @@
/obj/item/stack/Destroy()
if (src && usr && usr.machine == src)
usr << browse(null, "window=stack")
+ usr.unset_machine()
return ..()
/obj/item/stack/update_icon()
diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
index 19eb2fe4106..b49523e5b0a 100644
--- a/code/modules/admin/verbs/buildmode.dm
+++ b/code/modules/admin/verbs/buildmode.dm
@@ -85,7 +85,7 @@
to_chat(usr, "Right Mouse Button = Deconstruct / Delete / Downgrade")
to_chat(usr, "Left Mouse Button + ctrl = R-Window")
to_chat(usr, "Left Mouse Button + alt = Airlock")
- to_chat(usr, "")
+ to_chat(usr, " ")
to_chat(usr, "Use the button in the upper left corner to")
to_chat(usr, "change the direction of built objects.")
to_chat(usr, "***********************************************************")
@@ -96,7 +96,7 @@
to_chat(usr, "Middle Mouse Button on turf/obj = Capture object type")
to_chat(usr, "Left Mouse Button on turf/obj = Place objects")
to_chat(usr, "Right Mouse Button = Delete objects")
- to_chat(usr, "")
+ to_chat(usr, " ")
to_chat(usr, "Use the button in the upper left corner to")
to_chat(usr, "change the direction of built objects.")
to_chat(usr, "***********************************************************")
diff --git a/code/modules/admin/view_variables/reference_tracking.dm b/code/modules/admin/view_variables/reference_tracking.dm
index 1003778e610..86be28dd831 100644
--- a/code/modules/admin/view_variables/reference_tracking.dm
+++ b/code/modules/admin/view_variables/reference_tracking.dm
@@ -1,36 +1,29 @@
#ifdef REFERENCE_TRACKING
+#define REFSEARCH_RECURSE_LIMIT 64
-/datum/proc/find_references(skip_alert)
- running_find_references = type
+/datum/proc/find_references(references_to_clear = INFINITY)
if(usr?.client)
- if(usr.client.running_find_references)
- log_subsystem_garbage_harddel("CANCELLED search for references to a [usr.client.running_find_references].")
- usr.client.running_find_references = null
- running_find_references = null
- //restart the garbage collector
- SSgarbage.can_fire = TRUE
- SSgarbage.update_nextfire(reset_time = TRUE)
- return
-
- if(!skip_alert && tgui_alert(usr,"Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", list("Yes", "No")) != "Yes")
- running_find_references = null
+ if(tgui_alert(usr,"Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", list("Yes", "No")) != "Yes")
return
+ src.references_to_clear = references_to_clear
//this keeps the garbage collector from failing to collect objects being searched for in here
SSgarbage.can_fire = FALSE
- if(usr?.client)
- usr.client.running_find_references = type
+ _search_references()
+ //restart the garbage collector
+ SSgarbage.can_fire = TRUE
+ SSgarbage.update_nextfire(reset_time = TRUE)
- log_subsystem_garbage_harddel("Beginning search for references to a [type].")
+/datum/proc/_search_references()
+ log_subsystem_garbage_harddel("Beginning search for references to a [type], looking for [references_to_clear] refs.")
var/starting_time = world.time
-
- log_subsystem_garbage_harddel("Refcount for [type]: [refcount(src)]")
-
//Time to search the whole game for our ref
- DoSearchVar(GLOB, "GLOB", search_time = starting_time) //globals
+ DoSearchVar(GLOB, "GLOB", starting_time) //globals
log_subsystem_garbage_harddel("Finished searching globals")
+ if(src.references_to_clear == 0)
+ return
//Yes we do actually need to do this. The searcher refuses to read weird lists
//And global.vars is a really weird list
@@ -38,45 +31,46 @@
for(var/key in global.vars)
global_vars[key] = global.vars[key]
- DoSearchVar(global_vars, "Native Global", search_time = starting_time)
+ DoSearchVar(global_vars, "Native Global", starting_time)
log_subsystem_garbage_harddel("Finished searching native globals")
+ if(src.references_to_clear == 0)
+ return
for(var/datum/thing in world) //atoms (don't beleive its lies)
- DoSearchVar(thing, "World -> [thing.type]", search_time = starting_time)
+ DoSearchVar(thing, "World -> [thing.type]", starting_time)
+ if(src.references_to_clear == 0)
+ break
log_subsystem_garbage_harddel("Finished searching atoms")
+ if(src.references_to_clear == 0)
+ return
for(var/datum/thing) //datums
- DoSearchVar(thing, "Datums -> [thing.type]", search_time = starting_time)
+ DoSearchVar(thing, "Datums -> [thing.type]", starting_time)
+ if(src.references_to_clear == 0)
+ break
log_subsystem_garbage_harddel("Finished searching datums")
+ if(src.references_to_clear == 0)
+ return
//Warning, attempting to search clients like this will cause crashes if done on live. Watch yourself
#ifndef REFERENCE_DOING_IT_LIVE
for(var/client/thing) //clients
- DoSearchVar(thing, "Clients -> [thing.type]", search_time = starting_time)
+ DoSearchVar(thing, "Clients -> [thing.type]", starting_time)
+ if(src.references_to_clear == 0)
+ break
log_subsystem_garbage_harddel("Finished searching clients")
+ if(src.references_to_clear == 0)
+ return
#endif
log_subsystem_garbage_harddel("Completed search for references to a [type].")
- if(usr?.client)
- usr.client.running_find_references = null
- running_find_references = null
-
- //restart the garbage collector
- SSgarbage.can_fire = TRUE
- SSgarbage.update_nextfire(reset_time = TRUE)
-
-/datum/proc/DoSearchVar(potential_container, container_name, recursive_limit = 64, search_time = world.time)
- #ifdef REFERENCE_TRACKING_DEBUG
- if(SSgarbage.should_save_refs && !found_refs)
- found_refs = list()
- #endif
-
- if(usr?.client && !usr.client.running_find_references)
+/datum/proc/DoSearchVar(potential_container, container_name, search_time, recursion_count, is_special_list)
+ if(recursion_count >= REFSEARCH_RECURSE_LIMIT)
+ log_subsystem_garbage_harddel("Recursion limit reached. [container_name]")
return
- if(!recursive_limit)
- log_subsystem_garbage_harddel("Recursion limit reached. [container_name]")
+ if(references_to_clear == 0)
return
//Check each time you go down a layer. This makes it a bit slow, but it won't effect the rest of the game at all
@@ -90,73 +84,116 @@
return
datum_container.last_find_references = search_time
- var/container_print = datum_container.ref_search_details()
var/list/vars_list = datum_container.vars
+ var/is_atom = FALSE
+ var/is_area = FALSE
+ if(isatom(datum_container))
+ is_atom = TRUE
+ if(isarea(datum_container))
+ is_area = TRUE
for(var/varname in vars_list)
- #ifndef FIND_REF_NO_CHECK_TICK
- CHECK_TICK
- #endif
- if (varname == "vars" || varname == "vis_locs") //Fun fact, vis_locs don't count for references
- continue
var/variable = vars_list[varname]
-
- if(variable == src)
+ if(islist(variable))
+ //Fun fact, vis_locs don't count for references
+ if(varname == "vars" || (is_atom && (varname == "vis_locs" || varname == "overlays" || varname == "underlays" || varname == "filters" || varname == "verbs" || (is_area && varname == "contents"))))
+ continue
+ // We do this after the varname check to avoid area contents (reading it incures a world loop's worth of cost)
+ if(!length(variable))
+ continue
+ DoSearchVar(variable,\
+ "[container_name] [datum_container.ref_search_details()] -> [varname] (list)",\
+ search_time,\
+ recursion_count + 1,\
+ /*is_special_list = */ is_atom && (varname == "contents" || varname == "vis_contents" || varname == "locs"))
+ else if(variable == src)
#ifdef REFERENCE_TRACKING_DEBUG
if(SSgarbage.should_save_refs)
+ if(!found_refs)
+ found_refs = list()
found_refs[varname] = TRUE
continue //End early, don't want these logging
+ else
+ log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in [datum_container.type]'s [datum_container.ref_search_details()] [varname] var. [container_name]")
+ #else
+ log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in [datum_container.type]'s [datum_container.ref_search_details()] [varname] var. [container_name]")
#endif
- log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in [datum_container.type]'s [container_print] [varname] var. [container_name]")
+ references_to_clear -= 1
+ if(references_to_clear == 0)
+ log_subsystem_garbage_harddel("All references to [type] [text_ref(src)] found, exiting.")
+ return
continue
- if(islist(variable))
- DoSearchVar(variable, "[container_name] [container_print] -> [varname] (list)", recursive_limit - 1, search_time)
-
else if(islist(potential_container))
- var/normal = IS_NORMAL_LIST(potential_container)
var/list/potential_cache = potential_container
for(var/element_in_list in potential_cache)
- #ifndef FIND_REF_NO_CHECK_TICK
- CHECK_TICK
- #endif
+ //Check normal sublists
+ if(islist(element_in_list))
+ if(length(element_in_list))
+ DoSearchVar(element_in_list, "[container_name] -> [element_in_list] (list)", search_time, recursion_count + 1)
//Check normal entrys
- if(element_in_list == src)
+ else if(element_in_list == src)
#ifdef REFERENCE_TRACKING_DEBUG
if(SSgarbage.should_save_refs)
+ if(!found_refs)
+ found_refs = list()
found_refs[potential_cache] = TRUE
- continue //End early, don't want these logging
- #endif
+ continue
+ else
+ log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in list [container_name].")
+ #else
log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in list [container_name].")
- continue
-
- var/assoc_val = null
- if(!isnum(element_in_list) && normal)
- assoc_val = potential_cache[element_in_list]
- //Check assoc entrys
- if(assoc_val == src)
- #ifdef REFERENCE_TRACKING_DEBUG
- if(SSgarbage.should_save_refs)
- found_refs[potential_cache] = TRUE
- continue //End early, don't want these logging
#endif
- log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in list [container_name]\[[element_in_list]\]")
- continue
- //We need to run both of these checks, since our object could be hiding in either of them
- //Check normal sublists
- if(islist(element_in_list))
- DoSearchVar(element_in_list, "[container_name] -> [element_in_list] (list)", recursive_limit - 1, search_time)
- //Check assoc sublists
- if(islist(assoc_val))
- DoSearchVar(potential_container[element_in_list], "[container_name]\[[element_in_list]\] -> [assoc_val] (list)", recursive_limit - 1, search_time)
-
-/proc/qdel_and_find_ref_if_fail(datum/thing_to_del, force = FALSE)
- thing_to_del.qdel_and_find_ref_if_fail(force)
-
-/datum/proc/qdel_and_find_ref_if_fail(force = FALSE)
- SSgarbage.reference_find_on_fail[text_ref(src)] = TRUE
- qdel(src, force)
+ // This is dumb as hell I'm sorry
+ // I don't want the garbage subsystem to count as a ref for the purposes of this number
+ // If we find all other refs before it I want to early exit, and if we don't I want to keep searching past it
+ var/ignore_ref = FALSE
+ var/list/queues = SSgarbage.queues
+ for(var/list/queue in queues)
+ if(potential_cache in queue)
+ ignore_ref = TRUE
+ break
+ if(ignore_ref)
+ log_subsystem_garbage_harddel("[container_name] does not count as a ref for our count")
+ else
+ references_to_clear -= 1
+ if(references_to_clear == 0)
+ log_subsystem_garbage_harddel("All references to [type] [text_ref(src)] found, exiting.")
+ return
+
+ if(!isnum(element_in_list) && !is_special_list)
+ // This exists to catch an error that throws when we access a special list
+ // is_special_list is a hint, it can be wrong
+ try
+ var/assoc_val = potential_cache[element_in_list]
+ //Check assoc sublists
+ if(islist(assoc_val))
+ if(length(assoc_val))
+ DoSearchVar(potential_container[element_in_list], "[container_name]\[[element_in_list]\] -> [assoc_val] (list)", search_time, recursion_count + 1)
+ //Check assoc entry
+ else if(assoc_val == src)
+ #ifdef REFERENCE_TRACKING_DEBUG
+ if(SSgarbage.should_save_refs)
+ if(!found_refs)
+ found_refs = list()
+ found_refs[potential_cache] = TRUE
+ continue
+ else
+ log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in list [container_name]\[[element_in_list]\]")
+ #else
+ log_subsystem_garbage_harddel("Found [type] [text_ref(src)] in list [container_name]\[[element_in_list]\]")
+ #endif
+ references_to_clear -= 1
+ if(references_to_clear == 0)
+ log_subsystem_garbage_harddel("All references to [type] [text_ref(src)] found, exiting.")
+ return
+ catch
+ // So if it goes wrong we kill it
+ is_special_list = TRUE
+ log_subsystem_garbage_harddel("Curiosity: [container_name] lead to an error when acessing [element_in_list], what is it?")
+
+#undef REFSEARCH_RECURSE_LIMIT
#endif
// Kept outside the ifdef so overrides are easy to implement
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 418eea5a3cd..4acae8d49d8 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -92,17 +92,6 @@
return loc
-// If we have opacity, make sure to tell (potentially) affected light sources.
-/atom/movable/Destroy()
- var/turf/T = loc
-
- . = ..()
-
- if (opacity && istype(T))
- T.recalc_atom_opacity()
- T.reconsider_lights()
-
-
// Should always be used to change the opacity of an atom.
// It notifies (potentially) affected light sources so they can update (if needed).
/atom/proc/set_opacity(var/new_opacity)
diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm
index 785ad255118..8d3208ebd30 100644
--- a/code/modules/lighting/lighting_overlay.dm
+++ b/code/modules/lighting/lighting_overlay.dm
@@ -40,6 +40,8 @@
T.lighting_overlay = null
T.luminosity = 1
+ SSlighting.overlay_queue -= src
+
return ..()
// This is a macro PURELY so that the if below is actually readable.
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 4fbdf7b4888..fba33ec6913 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -130,7 +130,15 @@
QDEL_NULL(wear_mask)
// Do this last so the mob's stuff doesn't drop on del.
QDEL_NULL(w_uniform)
- QDEL_LIST_ASSOC_VAL(hud_list)
+
+ //Yes this is shit, but since someone had the brillant mind to use images for this, we must suffer
+ if(length(hud_list))
+ for(var/image/hud_overlay/an_hud_overlay in hud_list)
+ if(an_hud_overlay.owner)
+ an_hud_overlay.owner.client?.images -= an_hud_overlay
+ an_hud_overlay.owner = null
+ qdel(an_hud_overlay)
+ hud_list = null
. = ..()
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index e8f873c0d5d..4be52cb7411 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -12,8 +12,7 @@
QDEL_NULL(hud_used)
lose_hearing_sensitivity()
- for(var/obj/screen/movable/spell_master/spell_master in spell_masters)
- qdel(spell_master)
+ QDEL_LIST(spell_masters)
remove_screen_obj_references()
if(client)
diff --git a/code/modules/modular_computers/computers/modular_computer/core.dm b/code/modules/modular_computers/computers/modular_computer/core.dm
index 7cf4309f064..6c8763699d1 100644
--- a/code/modules/modular_computers/computers/modular_computer/core.dm
+++ b/code/modules/modular_computers/computers/modular_computer/core.dm
@@ -233,8 +233,8 @@
else
return FALSE
var/mob/user = usr
- if(user && istype(user) && !forced)
- ui_interact(user) // Re-open the UI on this computer. It should show the main screen now.
+ if(user && istype(user) && !forced && !QDELETED(src))
+ INVOKE_ASYNC(src, TYPE_PROC_REF(/datum, ui_interact), user) // Re-open the UI on this computer. It should show the main screen now.
update_icon()
/**
diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm
index ffdec2f7e14..531135af5b8 100644
--- a/code/modules/orbit/orbit.dm
+++ b/code/modules/orbit/orbit.dm
@@ -92,7 +92,7 @@
/atom/movable/proc/stop_orbit()
SpinAnimation(0,0)
- qdel(orbiting)
+ QDEL_NULL(orbiting)
/atom/movable/Destroy(force = FALSE)
. = ..()
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index 4a4917ddf8f..4b2dcd59325 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -51,6 +51,33 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
/obj/item/organ/Initialize(mapload, internal)
. = ..()
+ var/mob/living/carbon/holder = loc
+ create_reagents(5)
+ if(!max_damage)
+ max_damage = min_broken_damage * 2
+ if(istype(holder))
+ src.owner = holder
+ species = GLOB.all_species[SPECIES_HUMAN]
+ if(holder.dna)
+ dna = holder.dna.Clone()
+ species = GLOB.all_species[dna.species]
+ else
+ LOG_DEBUG("[src] at [loc] spawned without a proper DNA.")
+ var/mob/living/carbon/human/H = holder
+ if(istype(H))
+ if(internal)
+ var/obj/item/organ/external/E = H.get_organ(parent_organ)
+ if(E)
+ if(E.internal_organs == null)
+ E.internal_organs = list()
+ E.internal_organs |= src
+ if(dna)
+ if(!blood_DNA)
+ blood_DNA = list()
+ blood_DNA[dna.unique_enzymes] = dna.b_type
+ if(internal)
+ holder.internal_organs |= src
+ START_PROCESSING(SSprocessing, src)
/obj/item/organ/Destroy()
@@ -83,36 +110,6 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
/obj/item/organ/proc/update_health()
return
-/obj/item/organ/Initialize(mapload, internal)
- . = ..()
- var/mob/living/carbon/holder = loc
- create_reagents(5)
- if(!max_damage)
- max_damage = min_broken_damage * 2
- if(istype(holder))
- src.owner = holder
- species = GLOB.all_species[SPECIES_HUMAN]
- if(holder.dna)
- dna = holder.dna.Clone()
- species = GLOB.all_species[dna.species]
- else
- LOG_DEBUG("[src] at [loc] spawned without a proper DNA.")
- var/mob/living/carbon/human/H = holder
- if(istype(H))
- if(internal)
- var/obj/item/organ/external/E = H.get_organ(parent_organ)
- if(E)
- if(E.internal_organs == null)
- E.internal_organs = list()
- E.internal_organs |= src
- if(dna)
- if(!blood_DNA)
- blood_DNA = list()
- blood_DNA[dna.unique_enzymes] = dna.b_type
- if(internal)
- holder.internal_organs |= src
- START_PROCESSING(SSprocessing, src)
-
/obj/item/organ/proc/set_dna(var/datum/dna/new_dna)
if(new_dna)
dna = new_dna.Clone()
diff --git a/code/modules/tgui_input/say_modal/typing.dm b/code/modules/tgui_input/say_modal/typing.dm
index 9bad11178b5..b6b1711fd78 100644
--- a/code/modules/tgui_input/say_modal/typing.dm
+++ b/code/modules/tgui_input/say_modal/typing.dm
@@ -119,6 +119,9 @@ I IS TYPIN'!'
var/mob/owner = master
if(owner.typing_indicator == src)
owner.typing_indicator = null
+
+ master = null
+
return ..()
/atom/movable/typing_indicator/proc/hide_typing_indicator()
diff --git a/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml b/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
index 5df926cded4..39092ee29f4 100644
--- a/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
+++ b/html/changelogs/fluffyghost-attempt3mannequinharddelfix.yml
@@ -40,3 +40,5 @@ delete-after: True
changes:
- bugfix: "Yet another attempt to reduce mannequin harddels."
- bugfix: "Fixed various bugs found along the way."
+ - backend: "Updated the reftracker to the latest version from TG."
+ - backend: "Removed some unused vars."
From 3e23232a821cbd44ea9d16bb188964edd738caa9 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 00:27:09 +0100
Subject: [PATCH 07/12] sdf
---
code/unit_tests/create_and_destroy.dm | 1 -
1 file changed, 1 deletion(-)
diff --git a/code/unit_tests/create_and_destroy.dm b/code/unit_tests/create_and_destroy.dm
index 20a1fcc22e7..1eea455a3be 100644
--- a/code/unit_tests/create_and_destroy.dm
+++ b/code/unit_tests/create_and_destroy.dm
@@ -22,7 +22,6 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
// Specific paths excluded
var/list/ignore = list(
//Never meant to be created, errors out the ass for mobcode reasons
- /mob/living/carbon,
/atom/movable/typing_indicator,
//Internal organs
/obj/item/organ/external,
From a4ae49a5b43a175df3536d29172bf022e90eb1b8 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 13:10:45 +0100
Subject: [PATCH 08/12] hgffdh
---
aurorastation.dme | 1 +
code/__DEFINES/dcs/signals/signals_global.dm | 2 ++
.../dcs/signals/signals_mob/signals_mob_living.dm | 2 ++
code/__HELPERS/areas.dm | 2 --
code/controllers/hooks-defs.dm | 7 -------
code/controllers/subsystems/discord.dm | 1 -
code/controllers/subsystems/evacuation/evacuation.dm | 3 +--
code/controllers/subsystems/initialization/xenoarch.dm | 2 --
code/controllers/subsystems/news.dm | 2 +-
code/controllers/subsystems/statistics.dm | 9 +++++++++
code/datums/statistic.dm | 9 ---------
code/game/antagonist/antagonist_update.dm | 4 ++--
code/game/atoms.dm | 4 ++--
code/game/turfs/turf.dm | 4 ++--
code/game/turfs/turf_flick_animations.dm | 2 +-
code/modules/admin/admin_ranks.dm | 2 --
code/modules/admin/verbs/atmosdebug.dm | 1 -
code/modules/hydroponics/spreading/spreading.dm | 1 -
code/modules/lighting/lighting_atom.dm | 3 ++-
code/modules/mob/death.dm | 2 ++
code/modules/mob/living/carbon/alien/life.dm | 2 --
code/modules/mob/living/carbon/human/death.dm | 2 --
code/modules/mob/living/carbon/human/life.dm | 2 --
code/modules/mob/living/carbon/human/species/species.dm | 4 ++--
code/modules/mob/living/carbon/slime/life.dm | 2 --
code/modules/mob/living/life.dm | 2 --
code/modules/mob/living/silicon/robot/life.dm | 2 --
code/modules/organs/organ_icon.dm | 5 ++---
code/modules/projectiles/targeting/targeting_mob.dm | 3 +++
.../artifact/effects/unknown_effect_cellcharge.dm | 2 --
code/modules/research/xenoarchaeology/geosample.dm | 1 -
.../research/xenoarchaeology/tools/tools_anoscanner.dm | 2 --
code/modules/shieldgen/shield_gen_external.dm | 1 -
code/unit_tests/map_tests.dm | 1 -
34 files changed, 34 insertions(+), 60 deletions(-)
create mode 100644 code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
diff --git a/aurorastation.dme b/aurorastation.dme
index 6444a90b396..7f7f7089c71 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -144,6 +144,7 @@
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_main.dm"
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movable.dm"
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_x_act.dm"
+#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_living.dm"
#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_main.dm"
#include "code\__HELPERS\_global_objects.dm"
#include "code\__HELPERS\_lists.dm"
diff --git a/code/__DEFINES/dcs/signals/signals_global.dm b/code/__DEFINES/dcs/signals/signals_global.dm
index 85db3a259ec..ca9ce42cc72 100644
--- a/code/__DEFINES/dcs/signals/signals_global.dm
+++ b/code/__DEFINES/dcs/signals/signals_global.dm
@@ -8,3 +8,5 @@
/// called post /obj/item initialize (obj/item/created_item)
#define COMSIG_GLOB_ATOM_AFTER_POST_INIT "!atom_after_post_init"
+/// mob died somewhere : (mob/living, gibbed)
+#define COMSIG_GLOB_MOB_DEATH "!mob_death"
diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
new file mode 100644
index 00000000000..6d53bff5edd
--- /dev/null
+++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
@@ -0,0 +1,2 @@
+///from base of mob/living/death(): (gibbed)
+#define COMSIG_LIVING_DEATH "living_death"
diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm
index 821454eb4bb..e281dd60edb 100644
--- a/code/__HELPERS/areas.dm
+++ b/code/__HELPERS/areas.dm
@@ -12,8 +12,6 @@
. += A
/proc/get_area_turfs(var/area/A, var/list/predicates)
- set background=1
-
. = new/list()
A = istype(A) ? A : locate(A)
if(!A)
diff --git a/code/controllers/hooks-defs.dm b/code/controllers/hooks-defs.dm
index e3ff89fd5a5..613855ae930 100644
--- a/code/controllers/hooks-defs.dm
+++ b/code/controllers/hooks-defs.dm
@@ -16,13 +16,6 @@
*/
/hook/roundend
-/**
- * Death hook.
- * Called in death.dm when someone dies.
- * Parameters: var/mob/living/carbon/human, var/gibbed
- */
-/hook/death
-
/**
* Cloning hook.
* Called in cloning.dm when someone is brought back by the wonders of modern science.
diff --git a/code/controllers/subsystems/discord.dm b/code/controllers/subsystems/discord.dm
index 2190767bc8f..77a9b8bd9f8 100644
--- a/code/controllers/subsystems/discord.dm
+++ b/code/controllers/subsystems/discord.dm
@@ -250,7 +250,6 @@ SUBSYSTEM_DEF(discord)
* Returns text - The invite URL to the designated invite channel.
*/
/datum/controller/subsystem/discord/proc/retreive_invite()
- set background = 1
if (!active)
log_subsystem_discord("RetrieveInvite - Failed - Bot not Active")
return ""
diff --git a/code/controllers/subsystems/evacuation/evacuation.dm b/code/controllers/subsystems/evacuation/evacuation.dm
index 85cd6d273f3..fad58dc830d 100644
--- a/code/controllers/subsystems/evacuation/evacuation.dm
+++ b/code/controllers/subsystems/evacuation/evacuation.dm
@@ -38,8 +38,7 @@ var/datum/evacuation_controller/evacuation_controller
recall = _recall
/datum/evacuation_controller/proc/set_up()
- set waitfor=0
- set background=1
+ return
/datum/evacuation_controller/proc/get_cooldown_message()
return "An evacuation cannot be called at this time. Please wait another [round((evac_cooldown_time-world.time)/600)] minute\s before trying again."
diff --git a/code/controllers/subsystems/initialization/xenoarch.dm b/code/controllers/subsystems/initialization/xenoarch.dm
index 5409e3ca440..a5981b77104 100644
--- a/code/controllers/subsystems/initialization/xenoarch.dm
+++ b/code/controllers/subsystems/initialization/xenoarch.dm
@@ -13,8 +13,6 @@ SUBSYSTEM_DEF(xenoarch)
var/list/digsite_spawning_turfs = list()
/datum/controller/subsystem/xenoarch/Initialize(timeofday)
- set background = TRUE
-
//create digsites
for(var/turf/TIW in world)
CHECK_TICK
diff --git a/code/controllers/subsystems/news.dm b/code/controllers/subsystems/news.dm
index 73812185370..b2f85fcf9c3 100644
--- a/code/controllers/subsystems/news.dm
+++ b/code/controllers/subsystems/news.dm
@@ -150,7 +150,7 @@ SUBSYSTEM_DEF(news)
alert_readers(FC.announcement)
/datum/controller/subsystem/news/proc/alert_readers(var/annoncement)
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
NEWSCASTER.newsAlert(annoncement)
NEWSCASTER.update_icon()
diff --git a/code/controllers/subsystems/statistics.dm b/code/controllers/subsystems/statistics.dm
index bf13307762c..285e7f80f82 100644
--- a/code/controllers/subsystems/statistics.dm
+++ b/code/controllers/subsystems/statistics.dm
@@ -37,6 +37,9 @@ SUBSYSTEM_DEF(statistics)
GENERAL_PROTECT_DATUM(/datum/controller/subsystem/statistics)
/datum/controller/subsystem/statistics/Initialize(timeofday)
+
+ RegisterSignal(SSdcs, COMSIG_GLOB_MOB_DEATH, PROC_REF(something_died))
+
for (var/type in subtypesof(/datum/statistic) - list(/datum/statistic/numeric, /datum/statistic/grouped))
var/datum/statistic/S = new type
if (!S.name)
@@ -177,6 +180,12 @@ GENERAL_PROTECT_DATUM(/datum/controller/subsystem/statistics)
var/DBQuery/query_insert = GLOB.dbcon.NewQuery(sql)
query_insert.Execute()
+/datum/controller/subsystem/statistics/proc/something_died(datum/source, mob/dead_mob, gibbed)
+ if(dead_mob.ckey)
+ IncrementGroupedStat("ckey_deaths", dead_mob.ckey)
+ if(gibbed)
+ IncrementSimpleStat("gibs")
+
// Sanitize inputs to avoid SQL injection attacks
/proc/sql_sanitize_text(var/text)
text = replacetext(text, "'", "''")
diff --git a/code/datums/statistic.dm b/code/datums/statistic.dm
index 1fccb301728..e114c939577 100644
--- a/code/datums/statistic.dm
+++ b/code/datums/statistic.dm
@@ -127,15 +127,6 @@
var/ckey = values[1]
. = "[ckey], with [values[ckey]] deaths."
-/hook/death/proc/increment_statistics(mob/living/carbon/human/H, gibbed)
- . = TRUE
- if (!H.ckey)
- return
-
- SSstatistics.IncrementGroupedStat("ckey_deaths", H.ckey)
- if (gibbed)
- SSstatistics.IncrementSimpleStat("gibs")
-
/hook/clone/proc/increment_statistics(mob/living/carbon/human/H)
. = TRUE
if (!H.ckey)
diff --git a/code/game/antagonist/antagonist_update.dm b/code/game/antagonist/antagonist_update.dm
index 125cb03fc55..ddbf5e2841d 100644
--- a/code/game/antagonist/antagonist_update.dm
+++ b/code/game/antagonist/antagonist_update.dm
@@ -52,7 +52,7 @@
antag.current.client.images |= get_indicator(antag, other_antag)
/datum/antagonist/proc/update_icons_added(var/datum/mind/player)
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
if(!antag_indicator || !player.current)
return
@@ -68,7 +68,7 @@
player.current.client.images |= get_indicator(player, antag)
/datum/antagonist/proc/update_icons_removed(var/datum/mind/player)
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
if(!antag_indicator || !player.current)
return
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 543f12f6631..8c1b15ee223 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -678,7 +678,7 @@
// "deaf_message" (optional) is what deaf people will see.
// "hearing_distance" (optional) is the range, how many tiles away the message can be heard.
/atom/proc/audible_message(var/message, var/deaf_message, var/hearing_distance, var/intent_message = null, var/intent_range = 7)
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
if(!hearing_distance)
hearing_distance = world.view
@@ -692,7 +692,7 @@
intent_message(intent_message, intent_range, hearers) // pass our hearers list through to intent_message so it doesn't have to call get_hearers again
/atom/proc/intent_message(var/message, var/range = 7, var/list/hearers = list())
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
if(air_sound(src))
if(!hearers.len)
hearers = get_hearers_in_view(range, src)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index c06a4464785..39845bc25e7 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -302,8 +302,8 @@ var/const/enterloopsanity = 100
tracks.add_tracks(footprint_DNA, comingdir, goingdir, footprint_color)
/atom/movable/proc/proximity_callback(atom/movable/AM)
- set waitfor = FALSE
- sleep(0)
+ SHOULD_NOT_SLEEP(TRUE)
+
HasProximity(AM, TRUE)
if (!QDELETED(AM) && !QDELETED(src) && (AM.movable_flags & MOVABLE_FLAG_PROXMOVE))
AM.HasProximity(src, TRUE)
diff --git a/code/game/turfs/turf_flick_animations.dm b/code/game/turfs/turf_flick_animations.dm
index 60d93abb904..520c2b5041a 100644
--- a/code/game/turfs/turf_flick_animations.dm
+++ b/code/game/turfs/turf_flick_animations.dm
@@ -1,5 +1,5 @@
/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
//This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough.
if(!location && target)
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index 364d982641b..bd3f19ecf74 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -168,8 +168,6 @@ var/list/forum_groupids_to_ranks = list()
world.SetConfig("APP/admin", A, null)
/proc/update_admins_from_api(reload_once_done=FALSE)
- set background = TRUE
-
if (!establish_db_connection(GLOB.dbcon))
log_and_message_admins("AdminRanks: Failed to connect to database in update_admins_from_api(). Carrying on with old staff lists.")
return FALSE
diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm
index b8512d068d2..6333285441e 100644
--- a/code/modules/admin/verbs/atmosdebug.dm
+++ b/code/modules/admin/verbs/atmosdebug.dm
@@ -1,7 +1,6 @@
/client/proc/atmosscan()
set category = "Mapping"
set name = "Check Piping"
- set background = 1
if(!src.holder)
to_chat(src, "Only administrators may use this command.")
return
diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm
index 2736ed14492..0213651bca4 100644
--- a/code/modules/hydroponics/spreading/spreading.dm
+++ b/code/modules/hydroponics/spreading/spreading.dm
@@ -202,7 +202,6 @@
density = 0
/obj/effect/plant/proc/calc_dir()
- set background = 1
var/turf/T = get_turf(src)
if(!istype(T)) return
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 4acae8d49d8..3383456ba77 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -61,7 +61,8 @@
// Will update the light (duh).
// Creates or destroys it if needed, makes it update values, makes sure it's got the correct source turf...
/atom/proc/update_light()
- set waitfor = FALSE
+ SHOULD_NOT_SLEEP(TRUE)
+
if (QDELING(src))
return
diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm
index 2c2fccc5c67..aa55c6d2b69 100644
--- a/code/modules/mob/death.dm
+++ b/code/modules/mob/death.dm
@@ -104,6 +104,8 @@
if(hostile_in_sight.target_mob == src)
hostile_in_sight.target_mob = null
+ SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_DEATH, src, gibbed)
+
return 1
/mob/proc/set_respawn_time()
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index ba08e1f9850..7a84757d9e1 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -1,7 +1,5 @@
// Alien larva are quite simple.
/mob/living/carbon/alien/Life()
- set background = BACKGROUND_ENABLED
-
if (transforming) return
if(!loc) return
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index fff06205e8f..f43541464b4 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -58,8 +58,6 @@
remove_verb(src, /mob/living/carbon/proc/release_control)
- callHook("death", list(src, gibbed))
-
if(!gibbed)
if(species.death_sound)
playsound(loc, species.death_sound, 80, 1, 1)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 9b40a0fa5e9..a8ed6a9f399 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -30,8 +30,6 @@
var/temperature_alert = 0
/mob/living/carbon/human/Life()
- set background = BACKGROUND_ENABLED
-
if (transforming)
return
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 1ab0fc369e1..52f20f8cf9c 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -473,9 +473,9 @@
H.eat_types = allowed_eat_types
if(!kpg)
if(islesserform(H))
- H.dna.SetSEState(MONKEYBLOCK,1)
+ H.dna?.SetSEState(MONKEYBLOCK,1)
else
- H.dna.SetSEState(MONKEYBLOCK,0)
+ H.dna?.SetSEState(MONKEYBLOCK,0)
if(!H.client || !H.client.prefs || !H.client.prefs.gender)
H.gender = pick(default_genders)
H.pronouns = H.gender
diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm
index 4fb1093fc80..62b27fa611b 100644
--- a/code/modules/mob/living/carbon/slime/life.dm
+++ b/code/modules/mob/living/carbon/slime/life.dm
@@ -1,6 +1,4 @@
/mob/living/carbon/slime/Life()
- set background = BACKGROUND_ENABLED
-
if(src.transforming)
return
..()
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 708f7d47838..1d7bd462326 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -1,6 +1,4 @@
/mob/living/Life()
- set background = BACKGROUND_ENABLED
-
if (QDELETED(src)) // If they're being deleted, why bother?
return
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 1a191f0a1fa..d535efa1fc3 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,6 +1,4 @@
/mob/living/silicon/robot/Life()
- set background = BACKGROUND_ENABLED
-
if(transforming)
return
diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm
index cfde1f57337..c13bebc5229 100644
--- a/code/modules/organs/organ_icon.dm
+++ b/code/modules/organs/organ_icon.dm
@@ -150,7 +150,6 @@
organ_icon = new /icon(internal_organ_icon, O.item_state || O.icon_state)
SSicon_cache.internal_organ_cache[cache_key] = organ_icon
- to_chat(cache_key)
add_overlay(organ_icon)
mob_icon.Blend(organ_icon, ICON_OVERLAY)
@@ -255,8 +254,8 @@
keyparts += "norm"
keyparts += "[species.race_key]"
- keyparts += "[dna.GetUIState(DNA_UI_GENDER)]"
- keyparts += "[dna.GetUIValue(DNA_UI_SKIN_TONE)]"
+ keyparts += "[dna?.GetUIState(DNA_UI_GENDER)]"
+ keyparts += "[dna?.GetUIValue(DNA_UI_SKIN_TONE)]"
if (skin_color)
keyparts += "[skin_color]"
if (body_hair && hair_color)
diff --git a/code/modules/projectiles/targeting/targeting_mob.dm b/code/modules/projectiles/targeting/targeting_mob.dm
index 4248e6230a1..a79d1b62422 100644
--- a/code/modules/projectiles/targeting/targeting_mob.dm
+++ b/code/modules/projectiles/targeting/targeting_mob.dm
@@ -28,6 +28,9 @@
/mob/living/death(gibbed,deathmessage="seizes up and falls limp...")
. = ..()
+
+ SEND_SIGNAL(src, COMSIG_LIVING_DEATH, gibbed)
+
if(.)
stop_aiming(no_message=1)
diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm
index 5d631929e39..e5316ca23c9 100644
--- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm
+++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm
@@ -24,8 +24,6 @@ if (TICK_CHECK) { \
}
/datum/artifact_effect/cellcharge/DoEffectAura()
- set background = 1
-
if(holder)
if (is_looping)
return TRUE
diff --git a/code/modules/research/xenoarchaeology/geosample.dm b/code/modules/research/xenoarchaeology/geosample.dm
index 64611b53ce5..4b587cfa841 100644
--- a/code/modules/research/xenoarchaeology/geosample.dm
+++ b/code/modules/research/xenoarchaeology/geosample.dm
@@ -54,7 +54,6 @@
//this should only need to be called once
/datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container)
- set background = 1
if(!container || !istype(container))
return
diff --git a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
index 7e31d3e42c2..363c54d5cce 100644
--- a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
+++ b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
@@ -36,8 +36,6 @@
to_chat(user, "Scanning array is recharging.")
/obj/item/device/ano_scanner/proc/scan()
- set background = 1
-
last_scan_time = world.time
nearest_artifact_distance = -1
var/turf/cur_turf = get_turf(src)
diff --git a/code/modules/shieldgen/shield_gen_external.dm b/code/modules/shieldgen/shield_gen_external.dm
index 5d3fc83d243..a58742b3187 100644
--- a/code/modules/shieldgen/shield_gen_external.dm
+++ b/code/modules/shieldgen/shield_gen_external.dm
@@ -7,7 +7,6 @@
//Search for space turfs within range that are adjacent to a simulated turf.
/obj/machinery/shield_gen/external/get_shielded_turfs()
- set background = 1
var/list/out = list()
var/turf/gen_turf = get_turf(src)
diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm
index b14fafc5dc4..694deb6d1dd 100644
--- a/code/unit_tests/map_tests.dm
+++ b/code/unit_tests/map_tests.dm
@@ -231,7 +231,6 @@
name = "MAP: Check for bad piping"
/datum/unit_test/map_test/bad_piping/start_test()
- set background = 1
var/checks = 0
var/failed_checks = 0
From f9bdf001619e9192a3ac211335bf51a1d48e9d37 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 13:41:29 +0100
Subject: [PATCH 09/12] fucking ruins
---
.../asteroid/digsite/digsite_unique.dmm | 42 +++++++++----------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/maps/random_ruins/exoplanets/asteroid/digsite/digsite_unique.dmm b/maps/random_ruins/exoplanets/asteroid/digsite/digsite_unique.dmm
index 71ee03cd53c..5c23f726bc3 100644
--- a/maps/random_ruins/exoplanets/asteroid/digsite/digsite_unique.dmm
+++ b/maps/random_ruins/exoplanets/asteroid/digsite/digsite_unique.dmm
@@ -24,20 +24,20 @@
/obj/effect/floor_decal/industrial/warning{
dir = 10
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ad" = (
/obj/effect/floor_decal/industrial/hatch/yellow,
/obj/effect/floor_decal/industrial/warning{
dir = 8
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ae" = (
/obj/effect/floor_decal/industrial/warning{
dir = 10
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"af" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -52,55 +52,55 @@
/obj/effect/floor_decal/industrial/warning{
dir = 1
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ai" = (
/obj/machinery/floodlight,
/obj/effect/floor_decal/industrial/warning{
dir = 8
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"aj" = (
/obj/machinery/artifact,
/obj/effect/floor_decal/industrial/hatch/yellow,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ak" = (
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"al" = (
/obj/effect/floor_decal/industrial/warning{
dir = 9
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"am" = (
/obj/structure/inflatable/wall,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"an" = (
/obj/effect/floor_decal/industrial/warning{
dir = 5
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ao" = (
/obj/effect/floor_decal/industrial/warning{
dir = 6
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ap" = (
/obj/machinery/floodlight,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"aq" = (
/obj/machinery/floodlight,
/obj/effect/floor_decal/industrial/warning{
dir = 4
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"ar" = (
/obj/effect/landmark/clear,
@@ -109,25 +109,25 @@
"as" = (
/obj/effect/floor_decal/industrial/hatch/yellow,
/obj/effect/floor_decal/industrial/warning,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"at" = (
/obj/effect/floor_decal/industrial/hatch/yellow,
/obj/effect/floor_decal/industrial/warning{
dir = 5
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"au" = (
/obj/effect/floor_decal/industrial/hatch/yellow,
/obj/effect/floor_decal/industrial/warning{
dir = 6
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"av" = (
/obj/effect/floor_decal/industrial/warning,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"aw" = (
/obj/machinery/embedded_controller/radio/airlock/airlock_controller{
@@ -151,7 +151,7 @@
/obj/effect/floor_decal/industrial/warning{
dir = 1
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"az" = (
/turf/simulated/wall,
@@ -191,7 +191,7 @@
/obj/effect/floor_decal/industrial/warning{
dir = 9
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"aE" = (
/obj/machinery/artifact_analyser,
@@ -345,7 +345,7 @@
/area/dungeon/anomaly_outpost)
"bb" = (
/obj/structure/inflatable/door,
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
"bc" = (
/obj/effect/landmark/clear,
@@ -411,7 +411,7 @@
/obj/effect/floor_decal/industrial/warning{
dir = 4
},
-/turf/simulated/floor/airless/ceiling,
+/turf/simulated/floor/exoplanet/barren,
/area/template_noop)
(1,1,1) = {"
From 604e678c20e2cc0174e6e5bc85073ff742c7588f Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 14:05:34 +0100
Subject: [PATCH 10/12] maybe this will prevent active edges too
---
code/modules/maps/helper_landmarks.dm | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/code/modules/maps/helper_landmarks.dm b/code/modules/maps/helper_landmarks.dm
index 2ba49eaa049..dc9cf8996ae 100644
--- a/code/modules/maps/helper_landmarks.dm
+++ b/code/modules/maps/helper_landmarks.dm
@@ -11,11 +11,20 @@
/obj/effect/landmark/clear/Initialize()
var/turf/simulated/wall/W = get_turf(src)
- if(istype(W))
- W.dismantle_wall(TRUE, TRUE)
- var/turf/simulated/mineral/M = W
- if(istype(M))
- M.GetDrilled()
+
+ var/can_remove_without_causing_active_edge = TRUE
+ for(var/turf/T in range(1, W))
+ if(!(W.air.compare(T.air)))
+ can_remove_without_causing_active_edge = FALSE
+ break
+
+ if(can_remove_without_causing_active_edge)
+ if(istype(W))
+ W.dismantle_wall(TRUE, TRUE)
+
+ var/turf/simulated/mineral/M = W
+ if(istype(M))
+ M.GetDrilled()
. = ..()
//Applies fire act to the turf
From 172624f287acbe589707e113027c33a87db31150 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 14:14:59 +0100
Subject: [PATCH 11/12] aaaaaaaaaa
---
code/modules/maps/helper_landmarks.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/maps/helper_landmarks.dm b/code/modules/maps/helper_landmarks.dm
index dc9cf8996ae..8b5a197e25b 100644
--- a/code/modules/maps/helper_landmarks.dm
+++ b/code/modules/maps/helper_landmarks.dm
@@ -14,7 +14,8 @@
var/can_remove_without_causing_active_edge = TRUE
for(var/turf/T in range(1, W))
- if(!(W.air.compare(T.air)))
+ //If one is in vacuum and the other isn't, or the air does not match between the two, no good
+ if((!W.air && T.air) || (W.air && !T.air) || !(W.air.compare(T.air)))
can_remove_without_causing_active_edge = FALSE
break
From 5c6cc24ca4fe0cabb1bdf757a95d3cdbb1ce8fe5 Mon Sep 17 00:00:00 2001
From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Date: Sun, 10 Mar 2024 15:09:29 +0100
Subject: [PATCH 12/12] sdfasd
---
code/modules/maps/helper_landmarks.dm | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/code/modules/maps/helper_landmarks.dm b/code/modules/maps/helper_landmarks.dm
index 8b5a197e25b..2ba49eaa049 100644
--- a/code/modules/maps/helper_landmarks.dm
+++ b/code/modules/maps/helper_landmarks.dm
@@ -11,21 +11,11 @@
/obj/effect/landmark/clear/Initialize()
var/turf/simulated/wall/W = get_turf(src)
-
- var/can_remove_without_causing_active_edge = TRUE
- for(var/turf/T in range(1, W))
- //If one is in vacuum and the other isn't, or the air does not match between the two, no good
- if((!W.air && T.air) || (W.air && !T.air) || !(W.air.compare(T.air)))
- can_remove_without_causing_active_edge = FALSE
- break
-
- if(can_remove_without_causing_active_edge)
- if(istype(W))
- W.dismantle_wall(TRUE, TRUE)
-
- var/turf/simulated/mineral/M = W
- if(istype(M))
- M.GetDrilled()
+ if(istype(W))
+ W.dismantle_wall(TRUE, TRUE)
+ var/turf/simulated/mineral/M = W
+ if(istype(M))
+ M.GetDrilled()
. = ..()
//Applies fire act to the turf