Transformation Deduplication (#19034)

* transformation deduplication

deduplicates a bunch of tf verbs

* whoops

* double whoops

* small fix

* more deduplication

* fair point

* whoops

* some more deduplication
This commit is contained in:
MeepleMuncher
2026-01-17 09:39:57 -08:00
committed by GitHub
parent 2a6ecb04c8
commit d81dc2a075
8 changed files with 50 additions and 373 deletions
+1 -23
View File
@@ -226,29 +226,7 @@
if(!istype(M))
return
if(M.tf_mob_holder)
var/mob/living/ourmob = M.tf_mob_holder
if(ourmob.ai_holder)
var/datum/ai_holder/our_AI = ourmob.ai_holder
our_AI.set_stance(STANCE_IDLE)
M.tf_mob_holder = null
ourmob.ckey = M.ckey
var/turf/get_dat_turf = get_turf(target)
ourmob.loc = get_dat_turf
ourmob.forceMove(get_dat_turf)
ourmob.vore_selected = M.vore_selected
M.vore_selected = null
ourmob.mob_belly_transfer(M)
M.soulgem.transfer_self(ourmob) // Soulcatcher
ourmob.Life(1)
if(ishuman(M))
for(var/obj/item/W in M)
if(istype(W, /obj/item/implant/backup) || istype(W, /obj/item/nif))
continue
M.drop_from_inventory(W)
qdel(target)
M.revert_mob_tf()
return
else
if(M.stat == DEAD) //We can let it undo the TF, because the person will be dead, but otherwise things get weird.