Fixes the Blob being banished to the shadow realm (#38461)

* blob now respawns like nuke disk if off z-level

* can't do it, sorry nak

* space

* muh codebaby

* Revert "CitrusGender my friend, don't you start away uneasy"
This commit is contained in:
CitrusGender
2018-06-17 21:06:18 -04:00
committed by letterjay
parent 3fe0ec584c
commit ba6c5324f0
2 changed files with 13 additions and 2 deletions

View File

@@ -2,20 +2,23 @@
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
var/inform_admins = FALSE
var/disallow_soul_imbue = TRUE
var/allow_death = FALSE
/datum/component/stationloving/Initialize(inform_admins = FALSE)
/datum/component/stationloving/Initialize(inform_admins = FALSE, allow_death = FALSE)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
RegisterSignal(list(COMSIG_PARENT_PREQDELETED), .proc/check_deletion)
RegisterSignal(list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
src.inform_admins = inform_admins
src.allow_death = allow_death
check_in_bounds() // Just in case something is being created outside of station/centcom
/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, list/arguments)
if (original)
if (istype(newc))
inform_admins = newc.inform_admins
allow_death = newc.allow_death
else if (LAZYLEN(arguments))
inform_admins = arguments[1]
@@ -70,7 +73,7 @@
message_admins("[parent] has been !!force deleted!! in [ADMIN_VERBOSEJMP(T)].")
log_game("[parent] has been !!force deleted!! in [AREACOORD(T)].")
if(!force)
if(!force && !allow_death)
var/turf/targetturf = relocate()
log_game("[parent] has been destroyed in [AREACOORD(T)]. Moving it to [AREACOORD(targetturf)].")
if(inform_admins)

View File

@@ -78,3 +78,11 @@
B.change_to(/obj/structure/blob/shield/core, overmind)
..()
/obj/structure/blob/core/ComponentInitialize()
. = ..()
AddComponent(/datum/component/stationloving, FALSE, TRUE)
/obj/structure/blob/core/onTransitZ(old_z, new_z)
if(overmind && is_station_level(new_z))
overmind.forceMove(get_turf(src))
return ..()