Be really specific about turf decal layers

This commit is contained in:
Arokha Sieyes
2020-06-01 12:55:35 -04:00
committed by Aronai Sieyes
parent 8eea54dc3b
commit 8b0effcaa9
3 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -64,10 +64,11 @@ What is the naming convention for planes or layers?
#define ABOVE_UTILITY 2.5 // Above stuff like pipes and wires
#define TURF_PLANE -45 // Turfs themselves, most flooring
#define WATER_FLOOR_LAYER 2.0 // The 'bottom' of water tiles.
#define BUILTIN_DECAL_LAYER 2.01 // For floors that automatically add decal overlays
#define MAPPER_DECAL_LAYER 2.02 // For intentionally placed floor decal overlays
#define UNDERWATER_LAYER 2.5 // Anything on this layer will render under the water layer.
#define WATER_LAYER 3.0 // Layer for water overlays.
#define ABOVE_TURF_LAYER 3.1 // Snow and wallmounted/floormounted equipment
#define TURF_DECAL_LAYER 3.2 // Mapped in floor decals, not automatic edges/corners
#define DECAL_PLANE -44 // Permanent decals
#define DIRTY_PLANE -43 // Nonpermanent decals
#define BLOOD_PLANE -42 // Blood is really dirty, but we can do special stuff if we separate it
+1 -1
View File
@@ -117,7 +117,7 @@ var/list/flooring_types
/decl/flooring/proc/get_plating_type(var/turf/T)
return plating_type
/decl/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/layer = ABOVE_TURF_LAYER)
/decl/flooring/proc/get_flooring_overlay(var/cache_key, var/icon_base, var/icon_dir = 0, var/layer = BUILTIN_DECAL_LAYER)
if(!flooring_cache[cache_key])
var/image/I = image(icon = icon, icon_state = icon_base, dir = icon_dir)
I.layer = layer
+2 -1
View File
@@ -7,6 +7,7 @@ var/list/floor_decals = list()
name = "floor decal"
icon = 'icons/turf/flooring/decals.dmi'
plane = DECAL_PLANE
layer = MAPPER_DECAL_LAYER
var/supplied_dir
/obj/effect/floor_decal/New(var/newloc, var/newdir, var/newcolour)
@@ -29,7 +30,7 @@ var/list/floor_decals = list()
var/image/I = floor_decals[cache_key]
if(!I)
I = image(icon = icon, icon_state = icon_state, dir = dir)
I.layer = TURF_DECAL_LAYER
I.layer = MAPPER_DECAL_LAYER
I.color = color
I.alpha = alpha
floor_decals[cache_key] = I