diff --git a/code/modules/antagonists/pirate/pirate_event.dm b/code/modules/antagonists/pirate/pirate_event.dm index c4505e4d0bc..2b5a8d9ca5d 100644 --- a/code/modules/antagonists/pirate/pirate_event.dm +++ b/code/modules/antagonists/pirate/pirate_event.dm @@ -73,7 +73,7 @@ for(var/obj/effect/mob_spawn/ghost_role/human/pirate/spawner in A) if(candidates.len > 0) var/mob/our_candidate = candidates[1] - var/mob/spawned_mob = spawner.create(our_candidate) + var/mob/spawned_mob = spawner.create_from_ghost(our_candidate) candidates -= our_candidate notify_ghosts("The pirate ship has an object of interest: [spawned_mob]!", source = spawned_mob, action = NOTIFY_ORBIT, header="Pirates!") else diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index daaf73eb5d5..ffdb4cf7370 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -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 diff --git a/code/modules/shuttle/battlecruiser_starfury.dm b/code/modules/shuttle/battlecruiser_starfury.dm index e59bc2f774d..ce520aa1fca 100644 --- a/code/modules/shuttle/battlecruiser_starfury.dm +++ b/code/modules/shuttle/battlecruiser_starfury.dm @@ -165,7 +165,7 @@ spawner.antag_team = team if(candidates.len > 0) var/mob/our_candidate = candidates[1] - spawner.create(our_candidate) + spawner.create_from_ghost(our_candidate) spawner.antag_team.players_spawned += (our_candidate.ckey) candidates.Splice(1, 2) notify_ghosts(