[MIRROR] [NO GBP] Reinforced plating mapping helper actually function correctly. [MDB IGNORE] (#19405)

* [NO GBP] Reinforced plating mapping helper actually function correctly. (#73464)

## About The Pull Request

Reinforced plating mapping helpers worked for only a feew specific
use-case which ended up being the only usecases I tested, I've modified
the code so it should work as expected in all usecases. In short this
fixes reinforced plating appearing in places where there is not actually
plating for it to replace, and stacking multiple layers of plating where
there should not be multiple layers.
## Why It's Good For The Game

Fixes a bug I introduced myself.
## Changelog
🆑
fix: Reinforced Plating baseturf helpers work and should now be bug free
enough to be used in maps.
/🆑

* [NO GBP] Reinforced plating mapping helper actually function correctly.

---------

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-18 03:01:19 +01:00
committed by GitHub
parent bfa96c5151
commit e40348c01a
2 changed files with 14 additions and 1 deletions

View File

@@ -76,7 +76,12 @@
/obj/effect/baseturf_helper/reinforced_plating
name = "reinforced plating baseturf editor"
baseturf = /turf/open/floor/plating/reinforced
baseturf_to_replace = list(/turf/open/floor/plating,/turf/open/space,/turf/baseturf_bottom)
baseturf_to_replace = list(/turf/open/floor/plating)
/obj/effect/baseturf_helper/reinforced_plating/replace_baseturf(turf/thing)
if(istype(thing, /turf/open/floor/plating))
return //Plates should not be placed under other plates
thing.stack_ontop_of_baseturf(/turf/open/floor/plating, baseturf)
//This applies the reinforced plating to the above Z level for every tile in the area where this is placed
/obj/effect/baseturf_helper/reinforced_plating/ceiling