From bef66785ce41121ac68c0b49cbd54915de037831 Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:57:15 -0500 Subject: [PATCH] Makes various things return qdel hints on initialization (#26607) * makes apcs destroy properly with a null area * starts cleanup of initialize failures and hint returns * Revert "makes apcs destroy properly with a null area" This reverts commit 9a9175cd37564ff7b5f48e46f4115d75a816cb12. * narsie returns qdel hint now * make lightgeists clean up hud on destroy * use the proper hud removal proc, but this still fails somehow. god help me. * missed one * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com> --------- Signed-off-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/game/gamemodes/cult/blood_magic.dm | 2 +- code/game/objects/structures/aliens.dm | 4 ++-- code/game/objects/structures/inflatable.dm | 2 +- .../mission_code/ruins/oldstation.dm | 2 +- code/modules/clothing/glasses/tajblind.dm | 18 +++++++++--------- .../clothing/spacesuits/ert_hardsuits.dm | 2 +- .../mining/lavaland/loot/colossus_loot.dm | 9 +++++++-- .../power/engines/singularity/narsie.dm | 2 +- code/modules/power/lights.dm | 4 ++-- 9 files changed, 25 insertions(+), 20 deletions(-) diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index ce0699b4a03..5ad1dd22dfe 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -388,7 +388,7 @@ /obj/item/melee/blood_magic/Initialize(mapload, spell) . = ..() - if(has_source) + if(spell && has_source) source = spell uses = source.charges health_cost = source.health_cost diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 1e5b6d38159..41affd7a4fc 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -251,7 +251,7 @@ var/silent_removal = FALSE /obj/structure/alien/weeds/Initialize(mapload, node) - ..() + . = ..() linked_node = node if(isspaceturf(loc)) qdel(src) @@ -435,7 +435,7 @@ /obj/structure/alien/weeds/node/Initialize() add_overlay("weednode") - ..(loc, src) + return ..(loc, src) #undef NODERANGE diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index b79918fa9d8..a44a1b2ad80 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -34,7 +34,7 @@ . += "Alt-Click to deflate [src]." /obj/structure/inflatable/Initialize(location) - ..() + . = ..() recalculate_atmos_connectivity() /obj/structure/inflatable/Destroy() diff --git a/code/modules/awaymissions/mission_code/ruins/oldstation.dm b/code/modules/awaymissions/mission_code/ruins/oldstation.dm index 9d11b96f6ee..c8e4989baab 100644 --- a/code/modules/awaymissions/mission_code/ruins/oldstation.dm +++ b/code/modules/awaymissions/mission_code/ruins/oldstation.dm @@ -178,7 +178,7 @@ name = "\improper Crew Reawakening Report" /obj/item/paper/fluff/ruins/oldstation/report/Initialize() - ..() + . = ..() init_current_date_string() info = "Artificial Program's report to surviving crewmembers.

Crew were placed into cryostasis 10 March, 2445.

Crew were awoken from cryostasis [GLOB.current_date_string].

\ SIGNIFICANT EVENTS OF NOTE
1: The primary radiation detectors were taken offline after [GLOB.game_year - 2445] years due to power failure, secondary radiation detectors showed no residual \ diff --git a/code/modules/clothing/glasses/tajblind.dm b/code/modules/clothing/glasses/tajblind.dm index ea202e12dd4..7d5b9754e8c 100644 --- a/code/modules/clothing/glasses/tajblind.dm +++ b/code/modules/clothing/glasses/tajblind.dm @@ -61,7 +61,7 @@ item_state = "tajblind_engi" /obj/item/clothing/glasses/hud/tajblind/meson/Initialize() - ..() + . = ..() desc += "
It has an optical meson scanner integrated into it." /obj/item/clothing/glasses/hud/tajblind/meson/equipped(mob/user, slot, initial) @@ -87,7 +87,7 @@ actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/toggle_research_scanner) /obj/item/clothing/glasses/hud/tajblind/sci/Initialize() - ..() + . = ..() desc += "
It has science goggles integrated into it." /obj/item/clothing/glasses/hud/tajblind/sci/item_action_slot_check(slot) @@ -102,7 +102,7 @@ examine_extensions = list(EXAMINE_HUD_MEDICAL_READ) /obj/item/clothing/glasses/hud/tajblind/med/Initialize() - ..() + . = ..() desc += "
It has a health HUD integrated into it." /obj/item/clothing/glasses/hud/tajblind/sec @@ -113,7 +113,7 @@ examine_extensions = list(EXAMINE_HUD_SECURITY_READ) /obj/item/clothing/glasses/hud/tajblind/sec/Initialize() - ..() + . = ..() desc += "
It has a security HUD integrated into it." /obj/item/clothing/glasses/hud/tajblind/shaded @@ -122,7 +122,7 @@ tint = FLASH_PROTECTION_FLASH /obj/item/clothing/glasses/hud/tajblind/shaded/Initialize() - ..() + . = ..() desc += "
It has an in-built flash protection." /obj/item/clothing/glasses/hud/tajblind/shaded/meson @@ -131,7 +131,7 @@ item_state = "tajblind_engi" /obj/item/clothing/glasses/hud/tajblind/shaded/meson/Initialize() - ..() + . = ..() desc += "
It has an optical meson scanner integrated into it." /obj/item/clothing/glasses/hud/tajblind/shaded/meson/equipped(mob/user, slot, initial) @@ -158,7 +158,7 @@ actions_types = list(/datum/action/item_action/toggle, /datum/action/item_action/toggle_research_scanner) /obj/item/clothing/glasses/hud/tajblind/shaded/sci/Initialize() - ..() + . = ..() desc += "
It has science goggles integrated into it." /obj/item/clothing/glasses/hud/tajblind/shaded/sci/item_action_slot_check(slot) @@ -173,7 +173,7 @@ examine_extensions = list(EXAMINE_HUD_MEDICAL_READ) /obj/item/clothing/glasses/hud/tajblind/shaded/med/Initialize() - ..() + . = ..() desc += "
It has a health HUD integrated into it." /obj/item/clothing/glasses/hud/tajblind/shaded/sec @@ -185,7 +185,7 @@ examine_extensions = list(EXAMINE_HUD_SECURITY_READ) /obj/item/clothing/glasses/hud/tajblind/shaded/sec/Initialize() - ..() + . = ..() desc += "
It has a security HUD integrated into it." #undef MODE_OFF diff --git a/code/modules/clothing/spacesuits/ert_hardsuits.dm b/code/modules/clothing/spacesuits/ert_hardsuits.dm index 8ce6a775e29..40c20a0019e 100644 --- a/code/modules/clothing/spacesuits/ert_hardsuits.dm +++ b/code/modules/clothing/spacesuits/ert_hardsuits.dm @@ -26,7 +26,7 @@ var/mob/living/carbon/human/wearer = loc.loc //loc is the hardsuit, so its loc is the wearer if(ishuman(wearer)) register_camera(wearer) - ..() + return ..() /obj/item/clothing/head/helmet/space/hardsuit/ert/attack_self(mob/user) if(camera || !has_camera) diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index b6f01246e04..f47f059515e 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -285,8 +285,13 @@ . = ..() remove_verb(src, /mob/living/verb/pulled) remove_verb(src, /mob/verb/me_verb) - var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] - medsensor.add_hud_to(src) + var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + med_hud.add_hud_to(src) + +/mob/living/simple_animal/hostile/lightgeist/Destroy() + var/datum/atom_hud/med_hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + med_hud.remove_hud_from(src) + return ..() /mob/living/simple_animal/hostile/lightgeist/AttackingTarget() . = ..() diff --git a/code/modules/power/engines/singularity/narsie.dm b/code/modules/power/engines/singularity/narsie.dm index e40b0fabe2e..34795f1df6b 100644 --- a/code/modules/power/engines/singularity/narsie.dm +++ b/code/modules/power/engines/singularity/narsie.dm @@ -58,7 +58,7 @@ to_chat(world, " [uppertext(name)] HAS FALLEN") SEND_SOUND(world, sound('sound/hallucinations/wail.ogg')) SSticker.mode?.cult_team?.narsie_death() - ..() + return ..() /obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob) user.forceMove(get_turf(src)) //make_new_construct spawns harvesters at observers locations, could be used to get into admin rooms/CC diff --git a/code/modules/power/lights.dm b/code/modules/power/lights.dm index 3b6997e73d4..04de3076a22 100644 --- a/code/modules/power/lights.dm +++ b/code/modules/power/lights.dm @@ -247,11 +247,11 @@ /obj/machinery/light/built/Initialize(mapload) status = LIGHT_EMPTY - ..() + return ..() /obj/machinery/light/small/built/Initialize(mapload) status = LIGHT_EMPTY - ..() + return ..() // create a new lighting fixture /obj/machinery/light/Initialize(mapload)