Skip to content

Commit

Permalink
[MIRROR] [no gbp] deathmatch does not preserve mind (but you can stil…
Browse files Browse the repository at this point in the history
…l return to your body) (#1068)

* [no gbp] deathmatch does not preserve mind (but you can still return to your body) (#81567)

## About The Pull Request

deathmatch no longer preserves mind
also gives traits TRAIT_CANNOT_CRYSTALIZE, TRAIT_PERMANENTLY_MORTAL to
prevent shenanigans
fixes #81550

## Why It's Good For The Game

it took two minutes for the russians to start scheming on how to get to
CC

* [no gbp] deathmatch does not preserve mind (but you can still return to your body)

---------

Co-authored-by: jimmyl <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Feb 20, 2024
1 parent dd57037 commit e38eba2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions code/modules/deathmatch/deathmatch_lobby.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,19 @@
if (!(loadout in loadouts))
loadout = loadouts[1]

observer.forceMove(loc)
var/datum/mind/observer_mind = observer.mind
var/mob/living/observer_current = observer.mind?.current
var/mob/living/carbon/human/new_player = observer.change_mob_type(/mob/living/carbon/human, delete_old_mob = TRUE)
if(!isnull(observer_mind) && observer_current)
var/mob/living/carbon/human/new_player = new(loc)
observer.client?.prefs.safe_transfer_prefs_to(new_player)
new_player.dna.update_dna_identity()
new_player.updateappearance(icon_update = TRUE, mutcolor_update = TRUE, mutations_overlay_update = TRUE)
new_player.add_traits(list(TRAIT_CANNOT_CRYSTALIZE, TRAIT_PERMANENTLY_MORTAL), INNATE_TRAIT)
if(!isnull(observer.mind) && observer.mind?.current)
new_player.AddComponent( \
/datum/component/temporary_body, \
old_mind = observer_mind, \
old_body = observer_current, \
old_mind = observer.mind, \
old_body = observer.mind.current, \
)
new_player.equipOutfit(loadout) // Loadout
new_player.key = ckey
players[ckey]["mob"] = new_player

// register death handling.
Expand Down

0 comments on commit e38eba2

Please sign in to comment.