mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-14 03:43:50 +00:00
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:
@@ -2,20 +2,23 @@
|
|||||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||||
var/inform_admins = FALSE
|
var/inform_admins = FALSE
|
||||||
var/disallow_soul_imbue = TRUE
|
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))
|
if(!ismovableatom(parent))
|
||||||
return COMPONENT_INCOMPATIBLE
|
return COMPONENT_INCOMPATIBLE
|
||||||
RegisterSignal(list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
|
RegisterSignal(list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
|
||||||
RegisterSignal(list(COMSIG_PARENT_PREQDELETED), .proc/check_deletion)
|
RegisterSignal(list(COMSIG_PARENT_PREQDELETED), .proc/check_deletion)
|
||||||
RegisterSignal(list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
|
RegisterSignal(list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
|
||||||
src.inform_admins = inform_admins
|
src.inform_admins = inform_admins
|
||||||
|
src.allow_death = allow_death
|
||||||
check_in_bounds() // Just in case something is being created outside of station/centcom
|
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)
|
/datum/component/stationloving/InheritComponent(datum/component/stationloving/newc, original, list/arguments)
|
||||||
if (original)
|
if (original)
|
||||||
if (istype(newc))
|
if (istype(newc))
|
||||||
inform_admins = newc.inform_admins
|
inform_admins = newc.inform_admins
|
||||||
|
allow_death = newc.allow_death
|
||||||
else if (LAZYLEN(arguments))
|
else if (LAZYLEN(arguments))
|
||||||
inform_admins = arguments[1]
|
inform_admins = arguments[1]
|
||||||
|
|
||||||
@@ -70,7 +73,7 @@
|
|||||||
message_admins("[parent] has been !!force deleted!! in [ADMIN_VERBOSEJMP(T)].")
|
message_admins("[parent] has been !!force deleted!! in [ADMIN_VERBOSEJMP(T)].")
|
||||||
log_game("[parent] has been !!force deleted!! in [AREACOORD(T)].")
|
log_game("[parent] has been !!force deleted!! in [AREACOORD(T)].")
|
||||||
|
|
||||||
if(!force)
|
if(!force && !allow_death)
|
||||||
var/turf/targetturf = relocate()
|
var/turf/targetturf = relocate()
|
||||||
log_game("[parent] has been destroyed in [AREACOORD(T)]. Moving it to [AREACOORD(targetturf)].")
|
log_game("[parent] has been destroyed in [AREACOORD(T)]. Moving it to [AREACOORD(targetturf)].")
|
||||||
if(inform_admins)
|
if(inform_admins)
|
||||||
|
|||||||
@@ -78,3 +78,11 @@
|
|||||||
B.change_to(/obj/structure/blob/shield/core, overmind)
|
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 ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user