Slightly refactors adjustCloneLoss() and setCloneLoss() (#20838)

* Fix 0 cloneloss unmutating all organs only 20% of the time

* Clean up the rest of `adjustCloneLoss()`

* Add missing `setCloneLoss()` override for carbons

* Fix setting cloneloss to 0 not unmutating organs

* Fix the code instead

* Someone forgot about this operator

* Sean review; minor cleanup

* Deduplicate mass unmutation

* gnarg
This commit is contained in:
Nathan Winters
2023-04-25 21:13:33 +02:00
committed by GitHub
parent 837e62c4fa
commit efecd97f76
2 changed files with 53 additions and 38 deletions
@@ -156,10 +156,10 @@
/datum/reagent/medicine/rezadone/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.setCloneLoss(0, FALSE) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
update_flags |= M.adjustCloneLoss(-1, FALSE) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. // why don't you fix the code instead
update_flags |= M.setCloneLoss(0, FALSE) // Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
update_flags |= M.adjustBruteLoss(-1, FALSE)
update_flags |= M.adjustFireLoss(-1, FALSE)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/head = H.get_organ("head")