diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm index fdce0fde2f5..97f2efbc027 100644 --- a/code/__DEFINES/lighting.dm +++ b/code/__DEFINES/lighting.dm @@ -91,8 +91,8 @@ GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR) GLOBAL_LIST_INIT(em_block_color, EM_BLOCK_COLOR) /// A set of appearance flags applied to all emissive and emissive blocker overlays. -/// KEEP_APART to prevent parent hooking, KEEP_TOGETHER for children, and we reset the color and alpha of our parent so nothing gets overridden -#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR|RESET_ALPHA) +/// KEEP_APART to prevent parent hooking, KEEP_TOGETHER for children, and we reset the color of our parent so emissives get proper coloring based on [EMISSIVE_COLOR] +#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR) /// The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of [EMISSIVE_COLOR], and be independent of the RGB value of [EM_BLOCK_COLOR]. #define EM_MASK_MATRIX list(0,0,0,1/3, 0,0,0,1/3, 0,0,0,1/3, 0,0,0,0, 1,1,1,0) /// A globally cached version of [EM_MASK_MATRIX] for quick access. diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 18d00e9966d..7e153f3843b 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -136,8 +136,8 @@ /mutable_appearance/emissive_blocker/New() . = ..() // Need to do this here because it's overridden by the parent call + // This is a microop which is the sole reason why this child exists, because its static this is a really cheap way to set color without setting or checking it every time we create an atom color = EM_BLOCK_COLOR - appearance_flags = EMISSIVE_APPEARANCE_FLAGS /atom/movable/Initialize(mapload, ...) . = ..() @@ -174,8 +174,8 @@ blocker.icon = icon blocker.icon_state = icon_state blocker.dir = dir - blocker.appearance_flags |= appearance_flags - blocker.plane = GET_NEW_PLANE(EMISSIVE_PLANE, PLANE_TO_OFFSET(plane)) + blocker.appearance_flags = appearance_flags | EMISSIVE_APPEARANCE_FLAGS + blocker.plane = GET_NEW_PLANE(EMISSIVE_PLANE, PLANE_TO_OFFSET(plane)) // Takes a light path through the normal macro for a microop // Ok so this is really cursed, but I want to set with this blocker cheaply while // Still allowing it to be removed from the overlays list later // So I'm gonna flatten it, then insert the flattened overlay into overlays AND the managed overlays list, directly