mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +01:00
[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) <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## 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. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game Players selected to play pirate/fugitive will now have a functioning orbit popup. <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> * Mob spawners now return their created mob after create_from_ghost --------- Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
This commit is contained in:
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user