fixes golems not getting antag and other things when switching shells (#45941)

fixes golems not getting antag and other things when switching shells
This commit is contained in:
tralezab
2019-08-17 23:41:33 -07:00
committed by Rob Bailey
parent a3c79f1a85
commit 8b190dbc27
2 changed files with 15 additions and 8 deletions
@@ -174,16 +174,19 @@
if(.)
return
if(isgolem(user) && can_transfer)
var/mob/living/carbon/human/H = user
var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
if(transfer_choice != "Yes")
return
if(QDELETED(src) || uses <= 0)
return
log_game("[key_name(user)] golem-swapped into [src]")
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
log_game("[key_name(H)] golem-swapped into [src]")
H.visible_message("<span class='notice'>A faint light leaves [H], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
show_flavour = FALSE
create(ckey = user.ckey,name = user.real_name)
user.death()
var/mob/living/carbon/human/newgolem = create(newname = H.real_name)
H.transfer_trait_datums(newgolem)
H.mind.transfer_to(newgolem)
H.death()
return
/obj/effect/mob_spawn/human/golem/servant