From 7a9f5f2eeb4f9fab692c8a5892ca94f9659e846a Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 1 Jul 2023 08:20:28 +0200 Subject: [PATCH] [MIRROR] Mob spawners now return their created mob after create_from_ghost [MDB IGNORE] (#22132) * Mob spawners now return their created mob after create_from_ghost (#76371) ## About The Pull Request create_from_ghost() now returns the body it produces. This should fix the pirate/fugitive ghost orbit notifications, since they expect to have a mob returned by this proc. Since the mob they expect to be returned is used as the subject for the ghost orbit popup, the popup would have no source and end up being blank. ## Why It's Good For The Game Players selected to play pirate/fugitive will now have a functioning orbit popup. * Mob spawners now return their created mob after create_from_ghost --------- Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> --- code/modules/mob_spawn/mob_spawn.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob_spawn/mob_spawn.dm b/code/modules/mob_spawn/mob_spawn.dm index 5245a439758..0e5c7f7ce4b 100644 --- a/code/modules/mob_spawn/mob_spawn.dm +++ b/code/modules/mob_spawn/mob_spawn.dm @@ -251,6 +251,8 @@ check_uses() // Now we check if the spawner should delete itself or not + return created + /obj/effect/mob_spawn/ghost_role/create(mob/mob_possessor, newname) if(!mob_possessor.key) // This is in the scenario that the server is somehow lagging, or someone fucked up their code, and we try to spawn the same person in twice. We'll simply not spawn anything and CRASH(), so that we report what happened. CRASH("Attempted to create an instance of [type] with a mob that had no ckey attached to it, which isn't supported by ghost role spawners!")