From 899a9e04cb2f4eb617d4ec405843eaacfd2b6362 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Sun, 13 Sep 2020 05:34:12 -0700 Subject: [PATCH] Fix some missing Initialize hints (#53566) * Fix some missing initialize hints * Whitelist /mob/dview not calling /atom/Initialize() * Better idea --- code/__HELPERS/unsorted.dm | 3 +++ code/datums/mutations/antenna.dm | 2 +- code/game/objects/items/weaponry.dm | 2 +- code/modules/cargo/supplypod.dm | 2 +- code/modules/surgery/organs/tails.dm | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 08ca90cfac9..3c8da948bdf 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1178,6 +1178,9 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /mob/dview/Initialize() //Properly prevents this mob from gaining huds or joining any global lists SHOULD_CALL_PARENT(FALSE) + if(flags_1 & INITIALIZED_1) + stack_trace("Warning: [src]([type]) initialized multiple times!") + flags_1 |= INITIALIZED_1 return INITIALIZE_HINT_NORMAL /mob/dview/Destroy(force = FALSE) diff --git a/code/datums/mutations/antenna.dm b/code/datums/mutations/antenna.dm index d16e9b9cbb0..9de263d4958 100644 --- a/code/datums/mutations/antenna.dm +++ b/code/datums/mutations/antenna.dm @@ -15,7 +15,7 @@ icon_state = "walkietalkie" /obj/item/implant/radio/antenna/Initialize(mapload) - ..() + . = ..() radio.name = "internal antenna" /datum/mutation/human/antenna/on_acquiring(mob/living/carbon/human/owner) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index afdf858a3ba..46da249a9a1 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -244,7 +244,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 user.gain_trauma(/datum/brain_trauma/magic/stalker, TRAUMA_RESILIENCE_MAGIC) /obj/item/katana/cursed/Initialize() - ..() + . = ..() ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT) /obj/item/wirerod diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 8e01f5af2fd..50ab39ef3ac 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -534,9 +534,9 @@ layer = PROJECTILE_HIT_THRESHHOLD_LAYER /obj/effect/pod_landingzone_effect/Initialize(mapload, obj/structure/closet/supplypod/pod) + . = ..() transform = matrix() * 1.5 animate(src, transform = matrix()*0.01, time = pod.landingDelay+pod.fallDuration) - ..() /obj/effect/pod_landingzone //This is the object that forceMoves the supplypod to it's location name = "Landing Zone Indicator" diff --git a/code/modules/surgery/organs/tails.dm b/code/modules/surgery/organs/tails.dm index 4dae7537105..51bb28290e5 100644 --- a/code/modules/surgery/organs/tails.dm +++ b/code/modules/surgery/organs/tails.dm @@ -42,7 +42,7 @@ var/spines = "None" /obj/item/organ/tail/lizard/Initialize() - ..() + . = ..() color = "#"+ random_color() /obj/item/organ/tail/lizard/Insert(mob/living/carbon/human/H, special = 0, drop_if_replaced = TRUE)