Blobs and Kudzu are killed by chasms. (#75469)

## About The Pull Request

Fixes #75451
Originally I just whitelisted them because they're structures that are
supported by their surroundings... but there's still the theoretical
scenario where it has expanded over a reasonably large chasm and then
becomes almost impossible to remove because you can't easily get at the
ones in the middle, and it would be "levitating" after you cut off
everything around the edge.

So instead this adds a trait which restores the original behaviour of
chasms where they delete stuff which falls into them and applies it to
Blobs and Kudzu.

## Why It's Good For The Game

It's a very niche scenario but "expanding structure falls into abstract
chasm storage" causes issues where it potentially keeps processing in
there and there isn't much you can do about it.
Maybe there's other stuff that commonly falls into chasms we'll decide
that we want to delete instead of keeping in pools now that you can just
slap a trait onto something to do it, future consideration.

## Changelog

🆑
fix: Blob and Kudzu tiles which expand into chasms will now be correctly
destroyed by the chasm.
/🆑
This commit is contained in:
Jacquerel
2023-05-17 00:13:01 +01:00
committed by GitHub
parent 6937b88279
commit d2d46ec77c
5 changed files with 13 additions and 0 deletions
+2
View File
@@ -839,6 +839,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_DO_NOT_SPLASH "do_not_splash"
/// Marks an atom when the cleaning of it is first started, so that the cleaning overlay doesn't get removed prematurely
#define TRAIT_CURRENTLY_CLEANING "currently_cleaning"
/// Objects with this trait are deleted if they fall into chasms, rather than entering abstract storage
#define TRAIT_CHASM_DESTROYED "chasm_destroyed"
// unique trait sources, still defines
#define EMP_TRAIT "emp_trait"
+1
View File
@@ -182,6 +182,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CANNOT_BE_UNBUCKLED" = TRAIT_CANNOT_BE_UNBUCKLED,
"TRAIT_GAMER" = TRAIT_GAMER,
"TRAIT_UNKNOWN" = TRAIT_UNKNOWN,
"TRAIT_CHASM_DESTROYED" = TRAIT_CHASM_DESTROYED,
"TRAIT_MIMING" = TRAIT_MIMING,
"TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION" = TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION,
"TRAIT_UNOBSERVANT" = TRAIT_UNOBSERVANT,
+8
View File
@@ -132,6 +132,10 @@ GLOBAL_LIST_INIT(chasm_storage, list())
return // We're already handling this
if(below_turf)
if(HAS_TRAIT(dropped_thing, TRAIT_CHASM_DESTROYED))
qdel(dropped_thing)
return
// send to the turf below
dropped_thing.visible_message(span_boldwarning("[dropped_thing] falls into [parent]!"), span_userdanger("[fall_message]"))
below_turf.visible_message(span_boldwarning("[dropped_thing] falls from above!"))
@@ -167,6 +171,10 @@ GLOBAL_LIST_INIT(chasm_storage, list())
if(!dropped_thing || QDELETED(dropped_thing))
return
if(HAS_TRAIT(dropped_thing, TRAIT_CHASM_DESTROYED))
qdel(dropped_thing)
return
if(!storage)
storage = new(get_turf(parent))
RegisterSignal(storage, COMSIG_ATOM_EXITED, PROC_REF(left_chasm))
@@ -38,6 +38,7 @@
/obj/structure/blob/Initialize(mapload, owner_overmind)
. = ..()
ADD_TRAIT(src, TRAIT_CHASM_DESTROYED, INNATE_TRAIT)
register_context()
if(owner_overmind)
overmind = owner_overmind
@@ -30,6 +30,7 @@
/obj/structure/spacevine/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_CHASM_DESTROYED, INNATE_TRAIT)
add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY)
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),