[MIRROR] Mob tf smite (#9083)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-09-29 02:14:10 -07:00
committed by GitHub
parent 16897bcafa
commit 6cf30067e0
3 changed files with 70 additions and 0 deletions
+64
View File
@@ -281,6 +281,64 @@
qdel(suit)
qdel(hood)
if("mob_tf")
var/mob/living/M = target
if(!istype(M))
return
var/list/types = typesof(/mob/living)
var/chosen_beast = tgui_input_list(user, "Which form would you like to take?", "Choose Beast Form", types)
if(!chosen_beast)
return
var/mob/living/new_mob = new chosen_beast(get_turf(M))
new_mob.faction = M.faction
if(new_mob && isliving(new_mob))
for(var/obj/belly/B as anything in new_mob.vore_organs)
new_mob.vore_organs -= B
qdel(B)
new_mob.vore_organs = list()
new_mob.name = M.name
new_mob.real_name = M.real_name
for(var/lang in M.languages)
new_mob.languages |= lang
M.copy_vore_prefs_to_mob(new_mob)
new_mob.vore_selected = M.vore_selected
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(ishuman(new_mob))
var/mob/living/carbon/human/N = new_mob
N.gender = H.gender
N.identifying_gender = H.identifying_gender
else
new_mob.gender = H.gender
else
new_mob.gender = M.gender
if(ishuman(new_mob))
var/mob/living/carbon/human/N = new_mob
N.identifying_gender = M.gender
for(var/obj/belly/B as anything in M.vore_organs)
B.loc = new_mob
B.forceMove(new_mob)
B.owner = new_mob
M.vore_organs -= B
new_mob.vore_organs += B
new_mob.ckey = M.ckey
if(M.ai_holder && new_mob.ai_holder)
var/datum/ai_holder/old_AI = M.ai_holder
old_AI.set_stance(STANCE_SLEEP)
var/datum/ai_holder/new_AI = new_mob.ai_holder
new_AI.hostile = old_AI.hostile
new_AI.retaliate = old_AI.retaliate
M.loc = new_mob
M.forceMove(new_mob)
new_mob.tf_mob_holder = M
////////MEDICAL//////////////
if("appendicitis")
@@ -688,3 +746,9 @@
if(target.orbiters)
qdel(target.orbiters)
//CHOMPEdit End
if("revert-mob-tf")
var/mob/living/Tar = target
if(!istype(Tar))
return
Tar.revert_mob_tf()