[MIRROR] Replace wall/indestructible/destructible typepath with mapping helper [MDB IGNORE] (#23735)

* Replace wall/indestructible/destructible typepath with mapping helper (#78365)

## About The Pull Request

#78239 is a fun mapping add but engineered in a way that
1. Creates a real eyesore of a typepath
2. Would further proliferate a hundred subtypes if it became commonly
used

Instead of using subtypes for this I put the behaviour in a component
and made a mapping helper to apply the component.
Now you can just put the mapping helper on top of any turf you want to
make into a zelda bomb wall and it will be so, rather than having to
make different subtypes for walls with different icons.

## Why It's Good For The Game

Cleaner, more maintainable.

## Changelog

not player facing

---------

Co-authored-by: san7890 <the@ san7890.com>

* Replace wall/indestructible/destructible typepath with mapping helper

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: san7890 <the@ san7890.com>
This commit is contained in:
SkyratBot
2023-09-17 14:41:05 -04:00
committed by GitHub
co-authored by san7890 Jacquerel
parent 50fa2f4263
commit 7845a0cde6
6 changed files with 65 additions and 24 deletions
+16
View File
@@ -1359,3 +1359,19 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
engraved_wall.AddComponent(/datum/component/engraved, engraving["story"], FALSE, engraving["story_value"])
qdel(src)
/// Apply to a wall (or floor, technically) to ensure it is instantly destroyed by any explosion, even if usually invulnerable
/obj/effect/mapping_helpers/bombable_wall
name = "bombable wall helper"
icon = 'icons/turf/overlays.dmi'
icon_state = "explodable"
/obj/effect/mapping_helpers/bombable_wall/Initialize(mapload)
. = ..()
if(!mapload)
log_mapping("[src] spawned outside of mapload!")
return
var/turf/our_turf = get_turf(src) // In case a locker ate us or something
our_turf.AddElement(/datum/element/bombable_turf)
return INITIALIZE_HINT_QDEL