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
+8 -7
View File
@@ -27,13 +27,14 @@
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/organ/zombie_infection/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/zombie_infection/Remove(special = FALSE)
if(owner)
if(iszombie(owner) && old_species)
owner.set_species(old_species)
if(timer_id)
deltimer(timer_id)
. = ..()
STOP_PROCESSING(SSobj, src)
if(iszombie(M) && old_species)
M.set_species(old_species)
if(timer_id)
deltimer(timer_id)
STOP_PROCESSING(SSobj, src) //Required to be done after the parent call to avoid conflicts with organ decay.
/obj/item/organ/zombie_infection/on_find(mob/living/finder)
to_chat(finder, "<span class='warning'>Inside the head is a disgusting black \
@@ -44,7 +45,7 @@
if(!owner)
return
if(!(src in owner.internal_organs))
Remove(owner)
Remove()
if (causes_damage && !iszombie(owner) && owner.stat != DEAD)
owner.adjustToxLoss(1)
if (prob(10))