mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Cleans up ..() usage in organs' Insert() and Remove() [MDB IGNORE] (#19948)
* Cleans up `..()` usage in organs' `Insert()` and `Remove()` (#74055) ## About The Pull Request fumbled around while investigating #74047 and turns out there's other organs that have the same issue as the reported alien organs in that issue. went around and replaced parent calls where applicable (cursed/demonic hearts, flashlight eyes, alien organs, abductor glands) ## Why It's Good For The Game Fixes #74047 Considerably less ghost internal organs, hopefully less unreported jank on removing organs ## Changelog 🆑 fix: fixed a few internal organs acting wonky on inserting/removing (some xenomorph organs, abductor glands, flashlight eyes, demon/cursed hearts) /🆑 * Cleans up `..()` usage in organs' `Insert()` and `Remove()` --------- Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
Insert(loc)
|
||||
|
||||
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_XENO_HOST, ORGAN_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
|
||||
owner.med_hud_set_status()
|
||||
@@ -28,7 +28,7 @@
|
||||
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, PROC_REF(RemoveInfectionImages), owner)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/body_egg/on_death(delta_time, times_fired)
|
||||
. = ..()
|
||||
|
||||
@@ -89,10 +89,10 @@
|
||||
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
|
||||
hud.remove_atom_from_hud(owner)
|
||||
clear_mind_control()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/heart/gland/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
if(special != 2 && uses) // Special 2 means abductor surgery
|
||||
Start()
|
||||
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
mind_control_duration = 900
|
||||
|
||||
/obj/item/organ/internal/heart/gland/electric/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
|
||||
|
||||
/obj/item/organ/internal/heart/gland/electric/Remove(mob/living/carbon/M, special = FALSE)
|
||||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/heart/gland/electric/activate()
|
||||
owner.visible_message(span_danger("[owner]'s skin starts emitting electric arcs!"),\
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
mind_control_duration = 2400
|
||||
|
||||
/obj/item/organ/internal/heart/gland/slime/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
owner.faction |= FACTION_SLIME
|
||||
owner.grant_language(/datum/language/slime, TRUE, TRUE, LANGUAGE_GLAND)
|
||||
|
||||
/obj/item/organ/internal/heart/gland/slime/Remove(mob/living/carbon/M, special = FALSE)
|
||||
owner.faction -= FACTION_SLIME
|
||||
owner.remove_language(/datum/language/slime, TRUE, TRUE, LANGUAGE_GLAND)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/heart/gland/slime/activate()
|
||||
to_chat(owner, span_warning("You feel nauseated!"))
|
||||
|
||||
@@ -68,14 +68,14 @@
|
||||
owner.adjustPlasma(0.1 * plasma_rate * delta_time)
|
||||
|
||||
/obj/item/organ/internal/alien/plasmavessel/Insert(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
if(isalien(organ_owner))
|
||||
var/mob/living/carbon/alien/target_alien = organ_owner
|
||||
target_alien.updatePlasmaDisplay()
|
||||
RegisterSignal(organ_owner, COMSIG_MOB_GET_STATUS_TAB_ITEMS, PROC_REF(get_status_tab_item))
|
||||
|
||||
/obj/item/organ/internal/alien/plasmavessel/Remove(mob/living/carbon/organ_owner, special = FALSE)
|
||||
..()
|
||||
. = ..()
|
||||
if(isalien(organ_owner))
|
||||
var/mob/living/carbon/alien/organ_owner_alien = organ_owner
|
||||
organ_owner_alien.updatePlasmaDisplay()
|
||||
@@ -98,14 +98,14 @@
|
||||
var/recent_queen_death = FALSE
|
||||
|
||||
/obj/item/organ/internal/alien/hivenode/Insert(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
organ_owner.faction |= ROLE_ALIEN
|
||||
ADD_TRAIT(organ_owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
|
||||
|
||||
/obj/item/organ/internal/alien/hivenode/Remove(mob/living/carbon/organ_owner, special = FALSE)
|
||||
organ_owner.faction -= ROLE_ALIEN
|
||||
REMOVE_TRAIT(organ_owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her.
|
||||
/obj/item/organ/internal/alien/hivenode/proc/queen_death()
|
||||
|
||||
@@ -181,13 +181,13 @@
|
||||
src.Insert(user) //Consuming the heart literally replaces your heart with a demon heart. H A R D C O R E
|
||||
|
||||
/obj/item/organ/internal/heart/demon/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
// Gives a non-eat-people crawl to the new owner
|
||||
var/datum/action/cooldown/spell/jaunt/bloodcrawl/crawl = new(M)
|
||||
crawl.Grant(M)
|
||||
|
||||
/obj/item/organ/internal/heart/demon/Remove(mob/living/carbon/M, special = FALSE)
|
||||
..()
|
||||
. = ..()
|
||||
var/datum/action/cooldown/spell/jaunt/bloodcrawl/crawl = locate() in M.actions
|
||||
qdel(crawl)
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if(hand)
|
||||
UnregisterSignal(hand, COMSIG_ITEM_ATTACK_SELF)
|
||||
UnregisterSignal(arm_owner, COMSIG_KB_MOB_DROPITEM_DOWN)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/proc/on_item_attack_self()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
owner.dna?.species?.handle_body(affected_human) //updates eye icon
|
||||
|
||||
/obj/item/organ/internal/eyes/Remove(mob/living/carbon/eye_owner, special = FALSE)
|
||||
..()
|
||||
. = ..()
|
||||
if(ishuman(eye_owner))
|
||||
var/mob/living/carbon/human/human_owner = eye_owner
|
||||
if(initial(eye_color_left))
|
||||
@@ -345,7 +345,7 @@
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/eyes/robotic/flashlight/Insert(mob/living/carbon/victim, special = FALSE, drop_if_replaced = FALSE)
|
||||
..()
|
||||
. = ..()
|
||||
if(!eye)
|
||||
eye = new /obj/item/flashlight/eyelight()
|
||||
eye.on = TRUE
|
||||
@@ -359,7 +359,7 @@
|
||||
eye.update_brightness(victim)
|
||||
eye.forceMove(src)
|
||||
victim.cure_blind(FLASHLIGHT_EYES)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
// Welding shield implant
|
||||
/obj/item/organ/internal/eyes/robotic/shield
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/heart/Remove(mob/living/carbon/heartless, special = 0)
|
||||
..()
|
||||
. = ..()
|
||||
if(!special)
|
||||
addtimer(CALLBACK(src, PROC_REF(stop_if_unowned)), 120)
|
||||
|
||||
@@ -169,13 +169,13 @@
|
||||
add_colour = FALSE
|
||||
|
||||
/obj/item/organ/internal/heart/cursed/Insert(mob/living/carbon/accursed, special = FALSE, drop_if_replaced = TRUE)
|
||||
..()
|
||||
. = ..()
|
||||
last_pump = world.time // give them time to react
|
||||
if(owner)
|
||||
to_chat(owner, span_userdanger("Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!"))
|
||||
|
||||
/obj/item/organ/internal/heart/cursed/Remove(mob/living/carbon/accursed, special = FALSE)
|
||||
..()
|
||||
. = ..()
|
||||
accursed.remove_client_colour(/datum/client_colour/cursed_heart_blood)
|
||||
|
||||
/datum/action/item_action/organ_action/cursed_heart
|
||||
|
||||
Reference in New Issue
Block a user