Removing a troublesome argument from organ/Remove() in favor or using the 'owner' variable

This commit is contained in:
Ghommie
2020-02-02 03:39:49 +01:00
parent 133da9bdef
commit 8de11845d5
55 changed files with 203 additions and 193 deletions
@@ -35,8 +35,6 @@
/obj/item/organ/genital/Destroy()
if(linked_organ)
update_link(TRUE)//this should remove any other links it has
if(owner)
Remove(owner, TRUE)//this should remove references to it, so it can be GCd correctly
return ..()
/obj/item/organ/genital/proc/set_aroused_state(new_state)
@@ -203,10 +201,9 @@
RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/update_appearance)
/obj/item/organ/genital/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(.)
update(TRUE)
UnregisterSignal(M, COMSIG_MOB_DEATH)
update(TRUE)
if(!QDELETED(owner))
UnregisterSignal(owner, COMSIG_MOB_DEATH)
//proc to give a player their genitals and stuff when they log in
/mob/living/carbon/human/proc/give_genitals(clean = FALSE)//clean will remove all pre-existing genitals. proc will then give them any genitals that are enabled in their DNA
@@ -191,7 +191,7 @@ Creating a chem with a low purity will make you permanently fall in love with so
var/obj/item/organ/vocal_cords/Vc = M.getorganslot(ORGAN_SLOT_VOICE)
var/obj/item/organ/vocal_cords/nVc = new /obj/item/organ/vocal_cords/velvet
if(Vc)
Vc.Remove(M)
Vc.Remove()
nVc.Insert(M)
qdel(Vc)
to_chat(M, "<span class='notice'><i>You feel your vocal chords tingle you speak in a more charasmatic and sultry tone.</i></span>")
@@ -94,7 +94,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING
//I seriously wonder if anyone will ever use this function.
if(M.getorganslot(ORGAN_SLOT_ZOMBIE))//sure, it "treats" it, but "you've" still got it. Doesn't always work as well; needs a ghost.
var/obj/item/organ/zombie_infection/ZI = M.getorganslot(ORGAN_SLOT_ZOMBIE)
ZI.Remove(M)
ZI.Remove()
ZI.Insert(SM)
log_game("FERMICHEM: [M] ckey: [M.key]'s zombie_infection has been transferred to their clone")
@@ -129,7 +129,7 @@
if(16)
T = M.getorganslot(ORGAN_SLOT_TONGUE)
var/obj/item/organ/tongue/nT = new /obj/item/organ/tongue/fluffy
T.Remove(M)
T.Remove()
nT.Insert(M)
T.moveToNullspace()//To valhalla
to_chat(M, "<span class='big warning'>Your tongue feels... weally fwuffy!!</span>")
@@ -152,7 +152,7 @@
/datum/reagent/fermi/furranium/on_mob_delete(mob/living/carbon/M)
if(cached_purity < 0.95)//Only permanent if you're a good chemist.
nT = M.getorganslot(ORGAN_SLOT_TONGUE)
nT.Remove(M)
nT.Remove()
qdel(nT)
T.Insert(M)
to_chat(M, "<span class='notice'>You feel your tongue.... unfluffify...?</span>")
@@ -29,7 +29,7 @@
nT = new C.dna.species.mutanttongue()
else
nT = new()
T.Remove(C)
T.Remove()
qdel(T)
nT.Insert(C)
to_chat(C, "<span class='notice'>You feel your tongue.... unfluffify...?</span>")
@@ -57,7 +57,7 @@
T = new C.dna.species.mutanttongue()
else
T = new()
oT.Remove(C)
oT.Remove()
qdel(oT)
T.Insert(C)
to_chat(C, "<span class='notice'>You feel your tongue.... unfluffify...?</span>")