Fixes pirates and starfury assailants transferring minds (#73833)

## About The Pull Request

Same issue as before, these skipped the spawn step and snowflaked their
own creation process.

So I split off the create part of attack ghost so these could share.

Fixes #73823 , may fix also #73822 but I don't *think* it will, whatever
changed spawners a few months ago is a little sus

## Why It's Good For The Game

Changeling pirate bad

## Changelog

🆑 Melbert
fix: Fixes pirates and starfury assailants keeping minds of past lives
/🆑
This commit is contained in:
MrMelbert
2023-03-07 23:07:19 -07:00
committed by GitHub
parent 1d21a5c6bc
commit 06788d6f9d
3 changed files with 14 additions and 2 deletions
+12
View File
@@ -175,6 +175,18 @@
if(QDELETED(src) || QDELETED(user))
return
create_from_ghost(user)
/**
* Uses a use and creates a mob from a passed ghost
*
* Does NOT validate that the spawn is possible or valid - assumes this has been done already!
*
* If you are manually forcing a player into this mob spawn,
* you should be using this and not directly calling [proc/create].
*/
/obj/effect/mob_spawn/ghost_role/proc/create_from_ghost(mob/dead/user)
ASSERT(istype(user))
user.log_message("became a [prompt_name].", LOG_GAME)
uses -= 1 // Remove a use before trying to spawn to prevent strangeness like the spawner trying to spawn more mobs than it should be able to
user.mind = null // dissassociate mind, don't let it follow us to the next life