mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Fixes weather listener and area sound manager runtime when brains are inserted into corpses. (#70343)
Essentially, the brain is set to nullspace for a second when inserted into a body, which was messing with brain mobs since z_level_change wasn't expecting the loc to be a null turf. (mobs in nullspace are bad.) At this very same moment though, the brain obj's owner (carbon) is set, so we can just report that since that's going to be the loc sent to the signal again in half a moment anyway.
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, BRAIN_UNAIDED)
|
||||
|
||||
|
||||
/mob/living/brain/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents)
|
||||
var/obj/item/organ/internal/brain/brain_loc = loc
|
||||
if(brain_loc && isnull(new_turf) && brain_loc.owner) //we're actively being put inside a new body.
|
||||
return ..(old_turf, get_turf(brain_loc.owner), same_z_layer, notify_contents)
|
||||
return ..()
|
||||
|
||||
/mob/living/brain/proc/create_dna()
|
||||
stored_dna = new /datum/dna/stored(src)
|
||||
if(!stored_dna.species)
|
||||
|
||||
Reference in New Issue
Block a user