From 9235117b40b23f295b2352b9beb1c5d36f626ee4 Mon Sep 17 00:00:00 2001 From: Kugamo Date: Mon, 10 Oct 2022 13:30:43 -0500 Subject: [PATCH] Fixes cleanable floor decals shading jank (#19227) * Yep * Sirryan2002 Suggestion Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> --- code/game/objects/effects/decals/Cleanable/humans.dm | 1 - code/game/objects/effects/decals/Cleanable/misc.dm | 7 +++++++ code/game/objects/effects/decals/cleanable.dm | 3 +++ code/game/objects/effects/decals/crayon.dm | 1 - 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 6c8d4ab5d44..1c7f1868d35 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -10,7 +10,6 @@ GLOBAL_LIST_EMPTY(splatter_cache) gender = PLURAL density = FALSE layer = TURF_LAYER - plane = GAME_PLANE icon = 'icons/effects/blood.dmi' icon_state = "mfloor1" random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7") diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index c0877847f29..0ef4606ffdd 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -15,12 +15,14 @@ icon_state = "ash" scoop_reagents = list("ash" = 10) mergeable_decal = FALSE + plane = GAME_PLANE /obj/effect/decal/cleanable/glass name = "tiny shards" desc = "Back to sand." icon = 'icons/obj/shards.dmi' icon_state = "tiny" + plane = GAME_PLANE /obj/effect/decal/cleanable/glass/Initialize(mapload) . = ..() @@ -104,6 +106,7 @@ desc = "Somebody should remove that." density = FALSE layer = OBJ_LAYER + plane = GAME_PLANE icon = 'icons/effects/effects.dmi' icon_state = "cobweb1" resistance_flags = FLAMMABLE @@ -113,6 +116,7 @@ desc = "It looks like a melted... something." density = FALSE layer = OBJ_LAYER + plane = GAME_PLANE gender = NEUTER icon = 'icons/effects/effects.dmi' icon_state = "molten" @@ -127,6 +131,7 @@ desc = "Somebody should remove that." density = FALSE layer = OBJ_LAYER + plane = GAME_PLANE icon = 'icons/effects/effects.dmi' icon_state = "cobweb2" @@ -154,6 +159,7 @@ desc = "The shredded remains of what appears to be clothing." icon_state = "shreds" gender = PLURAL + plane = GAME_PLANE mergeable_decal = FALSE /obj/effect/decal/cleanable/shreds/ex_act(severity, target) @@ -212,6 +218,7 @@ name = "confetti" desc = "Party time!" gender = PLURAL + plane = GAME_PLANE icon = 'icons/obj/objects.dmi' icon_state = "confetti1" random_icon_states = list("confetti1", "confetti2", "confetti3") diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index fc66c80ed1a..60550fa61e3 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -2,6 +2,7 @@ var/list/random_icon_states = list() var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one? + plane = FLOOR_PLANE //prevents Ambient Occlusion effects around it ; Set to GAME_PLANE in Initialize() if on a wall /obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal if(mergeable_decal) @@ -81,6 +82,8 @@ if(smoothing_flags) QUEUE_SMOOTH(src) QUEUE_SMOOTH_NEIGHBORS(src) + if(iswallturf(loc) && plane == FLOOR_PLANE) + plane = GAME_PLANE // so they can be seen above walls /obj/effect/decal/cleanable/Destroy() if(smoothing_flags) diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 2833b303a99..4672c4d2252 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -4,7 +4,6 @@ icon = 'icons/effects/crayondecal.dmi' icon_state = "rune1" layer = MID_TURF_LAYER - plane = GAME_PLANE //makes the graffiti visible over a wall. mergeable_decal = FALSE // Allows crayon drawings to overlap one another.