From 1dfa169dda0aefdf6e436603d65342a8059acc2d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 26 Mar 2023 08:26:26 +0200 Subject: [PATCH] [MIRROR] Fixes decals not layering as expected in world [MDB IGNORE] (#20078) * Fixes decals not layering as expected in world (#74232) ## About The Pull Request They just... were not passing their layer into the element. Stupeeed Rearranges some layers to ensure things work as they do now ## Why It's Good For The Game Closes #74165 Should fix weird decal layering. If it doesn't yell at me. ## Changelog :cl: fix: Fixes decals layering weird in some cases /:cl: * Fixes decals not layering as expected in world --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/__DEFINES/layers.dm | 4 ++-- code/game/objects/effects/decals/decal.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 2a5451a910c..1eef097744f 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -124,11 +124,11 @@ //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define. Most floors (FLOOR_PLANE) and walls (WALL_PLANE) use this. //FLOOR_PLANE layers +#define TURF_PLATING_DECAL_LAYER 2.001 +#define TURF_DECAL_LAYER 2.009 //Makes turf decals appear in DM how they will look inworld. #define CULT_OVERLAY_LAYER 2.01 #define MID_TURF_LAYER 2.02 #define HIGH_TURF_LAYER 2.03 -#define TURF_PLATING_DECAL_LAYER 2.031 -#define TURF_DECAL_LAYER 2.039 //Makes turf decals appear in DM how they will look inworld. #define LATTICE_LAYER 2.04 #define DISPOSAL_PIPE_LAYER 2.042 #define WIRE_LAYER 2.044 diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 399c81455d0..1f2193e9506 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -57,7 +57,7 @@ var/turf/T = loc if(!istype(T)) //you know this will happen somehow CRASH("Turf decal initialized in an object/nullspace") - T.AddElement(/datum/element/decal, icon, icon_state, dir, null, null, alpha, color, null, FALSE, null) + T.AddElement(/datum/element/decal, icon, icon_state, dir, null, layer, alpha, color, null, FALSE, null) return INITIALIZE_HINT_QDEL /obj/effect/turf_decal/Destroy(force) @@ -67,7 +67,7 @@ // I hate it too bestie if(GLOB.running_create_and_destroy) var/turf/T = loc - T.RemoveElement(/datum/element/decal, icon, icon_state, dir, null, null, alpha, color, null, FALSE, null) + T.RemoveElement(/datum/element/decal, icon, icon_state, dir, null, layer, alpha, color, null, FALSE, null) #endif // Intentionally used over moveToNullspace(), which calls doMove(), which fires // off an enormous amount of procs, signals, etc, that this temporary effect object