Revert "Revert "[MIRROR] Layer overhaul (#4503)" (#4509)" (#4536)

This reverts commit b27ede689e.
This commit is contained in:
Gandalf
2021-03-31 02:08:56 +01:00
committed by GitHub
parent b6244c1fe7
commit d14f4ea7c9
57 changed files with 217 additions and 133 deletions

View File

@@ -9,15 +9,22 @@
#define PLANE_SPACE_PARALLAX_RENDER_TARGET "PLANE_SPACE_PARALLAX"
#define OPENSPACE_LAYER 17 //Openspace layer over all
#define OPENSPACE_PLANE -4 //Openspace plane below all turfs
#define OPENSPACE_BACKDROP_PLANE -3 //Black square just over openspace plane to guaranteed cover all in openspace turf
#define OPENSPACE_LAYER 600 //Openspace layer over all
#define OPENSPACE_PLANE -9 //Openspace plane below all turfs
#define OPENSPACE_BACKDROP_PLANE -8 //Black square just over openspace plane to guaranteed cover all in openspace turf
#define FLOOR_PLANE -2
#define FLOOR_PLANE -7
#define FLOOR_PLANE_RENDER_TARGET "FLOOR_PLANE"
#define GAME_PLANE -1
#define OVER_TILE_PLANE -6
#define WALL_PLANE -5
#define GAME_PLANE -4
#define GAME_PLANE_RENDER_TARGET "GAME_PLANE"
#define UNDER_FRILL_PLANE -3
#define UNDER_FRILL_RENDER_TARGET = "UNDER_FRILL_PLANE"
#define FRILL_PLANE -2
#define FRILL_PLANE_RENDER_TARGET "FRILL_PLANE"
#define OVER_FRILL_PLANE -1
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
#define BLACKNESS_PLANE_RENDER_TARGET "BLACKNESS_PLANE"
@@ -84,77 +91,96 @@
#define GASFIRE_LAYER 5.05
#define RIPPLE_LAYER 5.1
#define GHOST_LAYER 6
#define LOW_LANDMARK_LAYER 9
#define MID_LANDMARK_LAYER 9.1
#define HIGH_LANDMARK_LAYER 9.2
#define AREA_LAYER 10
#define MASSIVE_OBJ_LAYER 11
#define POINT_LAYER 12
#define LANDMARK_PLANE 50
#define LOW_LANDMARK_LAYER 1
#define MID_LANDMARK_LAYER 2
#define HIGH_LANDMARK_LAYER 3
#define EMISSIVE_BLOCKER_PLANE 12
#define EMISSIVE_BLOCKER_LAYER 12
#define EMISSIVE_BLOCKER_RENDER_TARGET "*EMISSIVE_BLOCKER_PLANE"
#define AREA_PLANE 60
#define MASSIVE_OBJ_PLANE 70
#define GHOST_PLANE 80
#define POINT_PLANE 90
#define CHAT_LAYER 12.0001 // Do not insert layers between these two values
#define CHAT_LAYER_MAX 12.9999
#define RAD_TEXT_PLANE 90
#define EMISSIVE_PLANE 13
#define EMISSIVE_LAYER 13
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
#define FRILL_MASK_PLANE 95
#define FRILL_MASK_RENDER_TARGET "*FRILL_MASK_PLANE"
#define EMISSIVE_UNBLOCKABLE_PLANE 14
#define EMISSIVE_UNBLOCKABLE_LAYER 14
#define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE"
#define LIGHTING_PLANE 15
#define LIGHTING_LAYER 15
//---------- LIGHTING -------------
///Normal 1 per turf dynamic lighting objects
#define LIGHTING_PLANE 100
#define LIGHTING_RENDER_TARGET "LIGHT_PLANE"
#define RAD_TEXT_LAYER 15.1
#define O_LIGHTING_VISUAL_PLANE 16
#define O_LIGHTING_VISUAL_LAYER 16
///Lighting objects that are "free floating"
#define O_LIGHTING_VISUAL_PLANE 110
#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE"
#define ABOVE_LIGHTING_PLANE 17
#define ABOVE_LIGHTING_LAYER 17
///Things that should render ignoring lighting
#define ABOVE_LIGHTING_PLANE 120
#define ABOVE_LIGHTING_RENDER_TARGET "ABOVE_LIGHTING_PLANE"
#define BYOND_LIGHTING_PLANE 18
#define BYOND_LIGHTING_LAYER 18
///visibility + hiding of things outside of light source range
#define BYOND_LIGHTING_PLANE 130
#define BYOND_LIGHTING_RENDER_TARGET "BYOND_LIGHTING_PLANE"
#define CAMERA_STATIC_PLANE 19
#define CAMERA_STATIC_LAYER 19
//---------- EMISSIVES -------------
//Layering order of these is not particularly meaningful.
//Important part is the seperation of the planes for control via plane_master
///This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas
#define EMISSIVE_PLANE 150
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
///This plane masks the emissive plane to "block" it. Byond is wacky, this is the only way to get things to look like they're actually blocking said glowing lights.
#define EMISSIVE_BLOCKER_PLANE 160
#define EMISSIVE_BLOCKER_RENDER_TARGET "*EMISSIVE_BLOCKER_PLANE"
///This plane is "unblockable" emissives. It does the same thing as the emissive plane but isn't masked by the emissive blocker plane. Use for on-mob and movable emissives.
#define EMISSIVE_UNBLOCKABLE_PLANE 170
#define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE"
///---------------- MISC -----------------------
///AI Camera Static
#define CAMERA_STATIC_PLANE 200
#define CAMERA_STATIC_RENDER_TARGET "CAMERA_STATIC_PLANE"
#define RUNECHAT_PLANE 20
///Popup Chat Messages
#define RUNECHAT_PLANE 250
#define ATMOS_GROUP_PLANE 21
#define ATMOS_GROUP_LAYER 21
///Debug Atmos Overlays
#define ATMOS_GROUP_PLANE 450
//HUD layer defines
#define FULLSCREEN_PLANE 31
#define FLASH_LAYER 31
#define FULLSCREEN_LAYER 31.1
#define UI_DAMAGE_LAYER 31.2
#define BLIND_LAYER 31.3
#define CRIT_LAYER 31.4
#define CURSE_LAYER 31.5
///--------------- FULLSCREEN IMAGES ------------
#define FULLSCREEN_PLANE 500
#define FULLSCREEN_RENDER_TARGET "FULLSCREEN_PLANE"
#define FLASH_LAYER 1
#define FULLSCREEN_LAYER 2
#define UI_DAMAGE_LAYER 3
#define BLIND_LAYER 4
#define CRIT_LAYER 5
#define CURSE_LAYER 6
#define HUD_PLANE 42
#define HUD_LAYER 42
//-------------------- HUD ---------------------
//HUD layer defines
#define HUD_PLANE 1000
#define HUD_RENDER_TARGET "HUD_PLANE"
#define ABOVE_HUD_PLANE 43
#define ABOVE_HUD_PLANE 1100
#define ABOVE_HUD_RENDER_TARGET "ABOVE_HUD_PLANE"
#define RADIAL_LAYER 43
///1000 is an unimportant number, it's just to normalize copied layers
#define RADIAL_LAYER 1000
#define SPLASHSCREEN_LAYER 54
#define SPLASHSCREEN_PLANE 54
#define RADIAL_BACKGROUND_LAYER 0
#define RADIAL_CONTENT_LAYER 1
///Plane of the "splash" icon used that shows on the lobby screen. Nothing should ever be above this.
#define SPLASHSCREEN_PLANE 9999
#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE"
///cinematics are "below" the splash screen
#define CINEMATIC_LAYER -1
///Plane master controller keys
#define PLANE_MASTERS_GAME "plane_masters_game"

View File

@@ -35,7 +35,7 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 0
screen_loc = "12,1"
layer = SPLASHSCREEN_LAYER
plane = SPLASHSCREEN_PLANE
var/client/parent
var/matrix/target

View File

@@ -149,7 +149,7 @@
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
plane = SPLASHSCREEN_PLANE
layer = SPLASHSCREEN_LAYER - 1
layer = CINEMATIC_LAYER
color = "#000000"
show_when_dead = TRUE
@@ -176,6 +176,5 @@
/atom/movable/screen/fullscreen/see_through_darkness
icon_state = "nightvision"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
blend_mode = BLEND_ADD
show_when_dead = TRUE

View File

@@ -37,6 +37,17 @@
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/over_tile
name = "over tile world plane master"
plane = OVER_TILE_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/wall
name = "wall plane master"
plane = WALL_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
///Contains most things in the game world
/atom/movable/screen/plane_master/game_world
@@ -49,6 +60,50 @@
if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion)
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
/atom/movable/screen/plane_master/wall
name = "wall plane master"
plane = WALL_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/under_frill
name = "under frill plane master"
plane = UNDER_FRILL_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/frill
name = "frill plane master"
plane = FRILL_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/area
name = "area plane master"
plane = AREA_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/massive_obj
name = "massive object plane master"
plane = MASSIVE_OBJ_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/ghost
name = "ghost plane master"
plane = GHOST_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/atom/movable/screen/plane_master/point
name = "point plane master"
plane = POINT_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
///Contains all lighting objects
/atom/movable/screen/plane_master/lighting
name = "lighting plane master"
@@ -131,7 +186,6 @@
/atom/movable/screen/plane_master/o_light_visual
name = "overlight light visual plane master"
layer = O_LIGHTING_VISUAL_LAYER
plane = O_LIGHTING_VISUAL_PLANE
render_target = O_LIGHTING_VISUAL_RENDER_TARGET
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

View File

@@ -74,6 +74,19 @@
/atom/movable/plane_master_controller/game
name = PLANE_MASTERS_GAME
controlled_planes = list(FLOOR_PLANE, GAME_PLANE, LIGHTING_PLANE, EMISSIVE_PLANE, EMISSIVE_UNBLOCKABLE_PLANE)
controlled_planes = list(
OPENSPACE_PLANE,
FLOOR_PLANE,
OVER_TILE_PLANE,
WALL_PLANE,
GAME_PLANE,
UNDER_FRILL_PLANE,
FRILL_PLANE,
AREA_PLANE,
MASSIVE_OBJ_PLANE,
GHOST_PLANE,
POINT_PLANE,
LIGHTING_PLANE,
)

View File

@@ -221,6 +221,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/datum/radial_menu_choice/choice_datum = choice_datums[choice_id]
if (choice_datum.info)
var/obj/effect/abstract/info/info_button = new(E, choice_datum.info)
info_button.plane = ABOVE_HUD_PLANE
info_button.layer = RADIAL_BACKGROUND_LAYER
E.vis_contents += info_button
/datum/radial_menu/New()
@@ -262,6 +264,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/mutable_appearance/MA = new /mutable_appearance(to_extract_from)
if(MA)
MA.plane = ABOVE_HUD_PLANE
MA.layer = RADIAL_CONTENT_LAYER
MA.appearance_flags |= RESET_TRANSFORM
return MA

View File

@@ -9,7 +9,6 @@
/atom/movable/screen
name = ""
icon = 'icons/hud/screen_gen.dmi'
layer = HUD_LAYER
plane = HUD_PLANE
animate_movement = SLIDE_STEPS
speech_span = SPAN_ROBOT
@@ -56,7 +55,6 @@
maptext_width = 480
/atom/movable/screen/swap_hand
layer = HUD_LAYER
plane = HUD_PLANE
name = "swap hand"
@@ -126,7 +124,6 @@
var/icon_full
/// The overlay when hovering over with an item in your hand
var/image/object_overlay
layer = HUD_LAYER
plane = HUD_PLANE
/atom/movable/screen/inventory/Click(location, control, params)
@@ -257,7 +254,6 @@
name = "drop"
icon = 'icons/hud/screen_midnight.dmi'
icon_state = "act_drop"
layer = HUD_LAYER
plane = HUD_PLANE
/atom/movable/screen/drop/Click()
@@ -415,7 +411,6 @@
name = "resist"
icon = 'icons/hud/screen_midnight.dmi'
icon_state = "act_resist"
layer = HUD_LAYER
plane = HUD_PLANE
/atom/movable/screen/resist/Click()
@@ -428,7 +423,6 @@
icon = 'icons/hud/screen_midnight.dmi'
icon_state = "act_rest"
base_icon_state = "act_rest"
layer = HUD_LAYER
plane = HUD_PLANE
/atom/movable/screen/rest/Click()
@@ -447,7 +441,6 @@
name = "storage"
icon_state = "block"
screen_loc = "7,7 to 10,8"
layer = HUD_LAYER
plane = HUD_PLANE
/atom/movable/screen/storage/Initialize(mapload, new_master)
@@ -677,7 +670,6 @@
icon = 'icons/blank_title.png'
icon_state = ""
screen_loc = "1,1"
layer = SPLASHSCREEN_LAYER
plane = SPLASHSCREEN_PLANE
var/client/holder
@@ -733,6 +725,7 @@
icon_state = ""
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = ui_combo
plane = ABOVE_HUD_PLANE
var/timerid
/atom/movable/screen/combo/proc/clear_streak()

View File

@@ -557,7 +557,7 @@ GLOBAL_LIST_EMPTY(colored_images)
for(var/sharp_color in GLOB.contrast_colors)
var/obj/effect/overlay/atmos_excited/suger_high = new()
GLOB.colored_turfs += suger_high
var/image/shiny = new('icons/effects/effects.dmi', suger_high, "atmos_top", ATMOS_GROUP_LAYER)
var/image/shiny = new('icons/effects/effects.dmi', suger_high, "atmos_top")
shiny.plane = ATMOS_GROUP_PLANE
shiny.color = sharp_color
GLOB.colored_images += shiny

View File

@@ -14,15 +14,20 @@
#define CHAT_MESSAGE_WIDTH 96
/// Max length of chat message in characters
#define CHAT_MESSAGE_MAX_LENGTH 110
/// Maximum precision of float before rounding errors occur (in this context)
#define CHAT_LAYER_Z_STEP 0.0001
/// The number of z-layer 'slices' usable by the chat message layering
#define CHAT_LAYER_MAX_Z (CHAT_LAYER_MAX - CHAT_LAYER) / CHAT_LAYER_Z_STEP
/// The dimensions of the chat message icons
#define CHAT_MESSAGE_ICON_SIZE 9
/// Macro from Lummox used to get height from a MeasureText proc
#define WXH_TO_HEIGHT(x) text2num(copytext(x, findtextEx(x, "x") + 1))
///Base layer of chat elements
#define CHAT_LAYER 1
///Highest possible layer of chat elements
#define CHAT_LAYER_MAX 2
/// Maximum precision of float before rounding errors occur (in this context)
#define CHAT_LAYER_Z_STEP 0.0001
/// The number of z-layer 'slices' usable by the chat message layering
#define CHAT_LAYER_MAX_Z (CHAT_LAYER_MAX - CHAT_LAYER) / CHAT_LAYER_Z_STEP
/**
* # Chat Message Overlay
*

View File

@@ -22,7 +22,6 @@
icon = 'icons/effects/station_explosion.dmi'
icon_state = "station_intact"
plane = SPLASHSCREEN_PLANE
layer = SPLASHSCREEN_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = "BOTTOM,LEFT+50%"
appearance_flags = APPEARANCE_UI | TILE_BOUND

View File

@@ -32,7 +32,7 @@
return
goal = goal_number
bar_loc = target
bar = image('icons/effects/progessbar.dmi', bar_loc, "prog_bar_0", HUD_LAYER)
bar = image('icons/effects/progessbar.dmi', bar_loc, "prog_bar_0")
bar.plane = ABOVE_HUD_PLANE
bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
user = User

View File

@@ -77,7 +77,7 @@
. = ..()
switch(blocks_emissive)
if(EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, 0, EMISSIVE_BLOCKER_PLANE)
gen_emissive_blocker.dir = dir
gen_emissive_blocker.alpha = alpha
gen_emissive_blocker.appearance_flags |= appearance_flags
@@ -139,7 +139,7 @@
if(!blocks_emissive)
return
else if (blocks_emissive == EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, 0, EMISSIVE_BLOCKER_PLANE)
gen_emissive_blocker.dir = dir
gen_emissive_blocker.alpha = alpha
gen_emissive_blocker.appearance_flags |= appearance_flags

View File

@@ -62,11 +62,11 @@
return
if(inserted_id)
SSvis_overlays.add_vis_overlay(src, icon, "recharger-full", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "recharger-full", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "recharger-full", 0, EMISSIVE_PLANE, dir, alpha)
return
SSvis_overlays.add_vis_overlay(src, icon, "recharger-empty", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "recharger-empty", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "recharger-empty", 0, EMISSIVE_PLANE, dir, alpha)
/obj/machinery/accounting/update_appearance(updates)
. = ..()

View File

@@ -38,7 +38,7 @@
/obj/machinery/light_switch/update_overlays()
. = ..()
if(!(machine_stat & NOPOWER))
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-glow", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-glow", 0, EMISSIVE_PLANE, dir, alpha)
/obj/machinery/light_switch/examine(mob/user)
. = ..()

View File

@@ -181,12 +181,12 @@
if(!charging)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-empty", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-empty", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-empty", 0, EMISSIVE_PLANE, dir, alpha)
return
if(using_power)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-charging", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-charging", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-charging", 0, EMISSIVE_PLANE, dir, alpha)
return
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-full", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-full", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon_state]-full", 0, EMISSIVE_PLANE, dir, alpha)

View File

@@ -7,7 +7,7 @@
invisibility = INVISIBILITY_OBSERVER
anchored = TRUE
layer = GHOST_LAYER
plane = GHOST_PLANE
color = "#ff0000" // text color
var/text_size = 3 // larger values clip when the displayed text is larger than 2 digits.
var/started = FALSE

View File

@@ -2,7 +2,7 @@
name = "pointer"
icon = 'icons/hud/screen_gen.dmi'
icon_state = "arrow"
layer = POINT_LAYER
plane = POINT_PLANE
duration = 25
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)

View File

@@ -45,7 +45,6 @@
icon = 'icons/effects/alphacolors.dmi'
icon_state = "white"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
blend_mode = BLEND_ADD
/obj/effect/abstract/marker

View File

@@ -64,14 +64,12 @@
invisibility = INVISIBILITY_ABSTRACT
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = ATMOS_GROUP_LAYER
plane = ATMOS_GROUP_PLANE
/obj/effect/overlay/light_visible
name = ""
icon = 'icons/effects/light_overlays/light_32.dmi'
icon_state = "light"
layer = O_LIGHTING_VISUAL_LAYER
plane = O_LIGHTING_VISUAL_PLANE
appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -82,7 +80,6 @@
name = ""
icon = 'icons/effects/light_overlays/light_cone.dmi'
icon_state = "light"
layer = O_LIGHTING_VISUAL_LAYER
plane = O_LIGHTING_VISUAL_PLANE
appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

View File

@@ -61,7 +61,6 @@
/obj/effect/projectile/tracer/tracer/aiming
icon_state = "pixelbeam_greyscale"
layer = ABOVE_LIGHTING_LAYER
plane = ABOVE_LIGHTING_PLANE
/obj/effect/projectile/tracer/wormhole

View File

@@ -88,7 +88,7 @@
if(broken || !secure)
return
//Overlay is similar enough for both that we can use the same mask for both
SSvis_overlays.add_vis_overlay(src, icon, "locked", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "locked", 0, EMISSIVE_PLANE, dir, alpha)
. += locked ? "locked" : "unlocked"
/obj/structure/closet/examine(mob/user)

View File

@@ -57,7 +57,6 @@
name = "Space Station 13"
icon = 'icons/blank_title.png'
icon_state = ""
layer = SPLASHSCREEN_LAYER
plane = SPLASHSCREEN_PLANE
bullet_bounce_sound = null

View File

@@ -9,7 +9,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
icon_state = "grey"
plane = OPENSPACE_BACKDROP_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = SPLASHSCREEN_LAYER
plane = SPLASHSCREEN_PLANE
//I don't know why the others are aligned but I shall do the same.
vis_flags = VIS_INHERIT_ID

View File

@@ -21,7 +21,7 @@
invisibility = INVISIBILITY_REVENANT
health = INFINITY //Revenants don't use health, they use essence instead
maxHealth = INFINITY
layer = GHOST_LAYER
plane = GHOST_PLANE
healable = FALSE
sight = SEE_SELF
throwforce = 0

View File

@@ -116,7 +116,7 @@
anchored = TRUE
density = TRUE
move_resist = INFINITY
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
plane = ABOVE_LIGHTING_PLANE
light_range = 6
appearance_flags = LONG_GLIDE

View File

@@ -302,7 +302,7 @@
user.visible_message("<span class='warning'>[user] furiously claws at [src]!</span>", "<span class='notice'>You manage to clear away the stuff blocking the scrubber.</span>", "<span class='hear'>You hear loud scraping noises.</span>")
welded = FALSE
update_appearance()
pipe_vision_img = image(src, loc,dir = dir)
pipe_vision_img = image(src, loc, dir = dir)
pipe_vision_img.plane = ABOVE_HUD_PLANE
playsound(loc, 'sound/weapons/bladeslice.ogg', 100, TRUE)

View File

@@ -93,7 +93,7 @@
else
talpha = 255
obj_flags |= BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP
plane = BYOND_LIGHTING_LAYER //What matters it's one above openspace, so our animation is not dependant on what's there. Up to revision with 513
plane = BYOND_LIGHTING_PLANE //What matters it's one above openspace, so our animation is not dependant on what's there. Up to revision with 513
animate(src,alpha = talpha,time = 10)
addtimer(CALLBACK(src,.proc/reset_plane),10)
if(hidden)

View File

@@ -1,7 +1,8 @@
/atom/movable/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
var/datum/buildmode/bd
// If we don't do this, we get occluded by item action buttons
plane = ABOVE_HUD_PLANE
/atom/movable/screen/buildmode/New(bld)
bd = bld

View File

@@ -108,8 +108,7 @@
var/mutable_appearance/MA = new()
MA.maptext = MAPTEXT("[strength]k")
MA.color = "#04e604"
MA.layer = RAD_TEXT_LAYER
MA.plane = GAME_PLANE
MA.plane = RAD_TEXT_PLANE
pic.appearance = MA
flick_overlay(pic, list(user.client), 10)

View File

@@ -63,7 +63,7 @@
/obj/machinery/smartfridge/update_overlays()
. = ..()
if(!machine_stat)
SSvis_overlays.add_vis_overlay(src, icon, "smartfridge-light-mask", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "smartfridge-light-mask", 0, EMISSIVE_PLANE, dir, alpha)

View File

@@ -33,7 +33,7 @@
SSrestaurant.food_appearance_cache[object_to_order] = appearance //and cache it for future orders
qdel(temp_object)
var/image/I = image(icon = 'icons/obj/machines/restaurant_portal.dmi' , icon_state = "thought_bubble", loc = customer_pawn, layer = HUD_LAYER)
var/image/I = image(icon = 'icons/obj/machines/restaurant_portal.dmi' , icon_state = "thought_bubble", loc = customer_pawn)
I.appearance = appearance
I.underlays += mutable_appearance(icon = 'icons/obj/machines/restaurant_portal.dmi' , icon_state = "thought_bubble")
@@ -104,7 +104,7 @@
customer_pawn.say(order_food_line(reagent_to_order))
var/image/I = image(icon = 'icons/obj/machines/restaurant_portal.dmi' , icon_state = "thought_bubble", loc = customer_pawn, layer = HUD_LAYER)
var/image/I = image(icon = 'icons/obj/machines/restaurant_portal.dmi' , icon_state = "thought_bubble", loc = customer_pawn)
I.add_overlay(mutable_appearance('icons/obj/drinks.dmi', glass_visual))
I.pixel_y = 32
I.pixel_x = 16

View File

@@ -9,7 +9,6 @@
/atom/movable/emissive_blocker
name = ""
plane = EMISSIVE_BLOCKER_PLANE
layer = EMISSIVE_BLOCKER_LAYER
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
//Why?
//render_targets copy the transform of the target as well, but vis_contents also applies the transform

View File

@@ -8,7 +8,6 @@
color = null //we manually set color in init instead
plane = LIGHTING_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
layer = LIGHTING_LAYER
invisibility = INVISIBILITY_LIGHTING
vis_flags = VIS_HIDE

View File

@@ -10,7 +10,7 @@
var/list/baseturf_to_replace
var/baseturf
layer = POINT_LAYER
plane = POINT_PLANE
/obj/effect/baseturf_helper/Initialize()
. = ..()

View File

@@ -8,7 +8,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
desc = "It's a g-g-g-g-ghooooost!" //jinkies!
icon = 'icons/mob/mob.dmi'
icon_state = "ghost"
layer = GHOST_LAYER
plane = GHOST_PLANE
stat = DEAD
density = FALSE
see_invisible = SEE_INVISIBLE_OBSERVER

View File

@@ -31,10 +31,10 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
vis_contents_transparent = new /obj/effect/overlay/camera_static/transparent()
vis_contents_objects = list(vis_contents_opaque, vis_contents_transparent)
obscured = new('icons/effects/cameravis.dmi', vis_contents_opaque, null, CAMERA_STATIC_LAYER)
obscured = new('icons/effects/cameravis.dmi', vis_contents_opaque, null)
obscured.plane = CAMERA_STATIC_PLANE
obscured_transparent = new('icons/effects/cameravis.dmi', vis_contents_transparent, null, CAMERA_STATIC_LAYER)
obscured_transparent = new('icons/effects/cameravis.dmi', vis_contents_transparent, null)
obscured_transparent.plane = CAMERA_STATIC_PLANE
// Checks if a chunk has been Generated in x, y, z.
@@ -191,7 +191,6 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
mouse_opacity = MOUSE_OPACITY_ICON
invisibility = INVISIBILITY_ABSTRACT
layer = CAMERA_STATIC_LAYER
plane = CAMERA_STATIC_PLANE
/obj/effect/overlay/camera_static/transparent

View File

@@ -11,7 +11,6 @@
robot_modules_background = new()
robot_modules_background.icon_state = "block"
robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer ABOVE_HUD_LAYER, UI should be just below it.
robot_modules_background.plane = HUD_PLANE
inv1 = new /atom/movable/screen/robot/module1()

View File

@@ -61,7 +61,7 @@
name = "beam of solar energy"
icon_state = "solar_beam"
icon = 'icons/effects/beam.dmi'
layer = LIGHTING_LAYER
plane = LIGHTING_PLANE
duration = 5
randomdir = FALSE

View File

@@ -516,7 +516,7 @@
light_range = 10
anchored = TRUE
density = FALSE
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
/// The amount of time the rift has charged for.
var/time_charged = 0
/// The maximum charge the rift can have.

View File

@@ -12,7 +12,7 @@
density = TRUE
icon = 'icons/effects/96x96.dmi'
icon_state = "boh_tear"
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
plane = ABOVE_LIGHTING_PLANE
light_range = 6
move_resist = INFINITY

View File

@@ -15,7 +15,7 @@
appearance_flags = LONG_GLIDE
density = FALSE
gender = FEMALE
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
light_color = COLOR_RED
light_power = 0.7
light_range = 15

View File

@@ -7,7 +7,7 @@
anchored = TRUE
density = TRUE
move_resist = INFINITY
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
plane = ABOVE_LIGHTING_PLANE
light_range = 6
appearance_flags = LONG_GLIDE

View File

@@ -19,7 +19,7 @@
anchored = TRUE
appearance_flags = LONG_GLIDE
density = TRUE
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
plane = ABOVE_LIGHTING_PLANE
light_range = 6
move_resist = INFINITY

View File

@@ -387,15 +387,15 @@
//check for items in disposal - occupied light
if(contents.len > 0)
. += "dispover-full"
SSvis_overlays.add_vis_overlay(src, icon, "dispover-full", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "dispover-full", 0, EMISSIVE_PLANE, dir, alpha)
//charging and ready light
if(pressure_charging)
. += "dispover-charge"
SSvis_overlays.add_vis_overlay(src, icon, "dispover-charge-glow", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "dispover-charge-glow", 0, EMISSIVE_PLANE, dir, alpha)
else if(full_pressure)
. += "dispover-ready"
SSvis_overlays.add_vis_overlay(src, icon, "dispover-ready-glow", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "dispover-ready-glow", 0, EMISSIVE_PLANE, dir, alpha)
/obj/machinery/disposal/bin/proc/do_flush()
set waitfor = FALSE

View File

@@ -31,7 +31,7 @@
if((machine_stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", layer, plane)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_program_hub_on", 0, EMISSIVE_PLANE)
/obj/machinery/nanite_program_hub/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/disk/nanite_program))

View File

@@ -16,7 +16,7 @@
if((machine_stat & (NOPOWER|MAINT|BROKEN)) || panel_open)
return
SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", layer, plane)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", EMISSIVE_LAYER, EMISSIVE_PLANE)
SSvis_overlays.add_vis_overlay(src, icon, "nanite_programmer_on", 0, EMISSIVE_PLANE)
/obj/machinery/nanite_programmer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/disk/nanite_program))

View File

@@ -148,7 +148,7 @@
//Debug proc used to highlight bounding area
/obj/docking_port/proc/highlight(_color = "#f00")
invisibility = 0
layer = GHOST_LAYER
plane = GHOST_PLANE
var/list/L = return_coords()
var/turf/T0 = locate(L[1],L[2],z)
var/turf/T1 = locate(L[3],L[4],z)

View File

@@ -46,7 +46,7 @@
icon_state = "swarmer_console"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
max_integrity = 500
layer = MASSIVE_OBJ_LAYER
plane = MASSIVE_OBJ_PLANE
light_color = LIGHT_COLOR_CYAN
light_range = 10
anchored = TRUE

View File

@@ -263,7 +263,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
if(!light_mask)
return
if(!(machine_stat & BROKEN) && powered())
SSvis_overlays.add_vis_overlay(src, icon, light_mask, EMISSIVE_LAYER, EMISSIVE_PLANE)
SSvis_overlays.add_vis_overlay(src, icon, light_mask, 0, EMISSIVE_PLANE)
/obj/machinery/vending/obj_break(damage_flag)
. = ..()

View File

@@ -19,6 +19,7 @@
hub_password = "kMZy3U5jJHSiBQjr"
name = "/tg/ Station 13"
fps = 20
map_format = SIDE_MAP
#ifdef FIND_REF_NO_CHECK_TICK
loop_checks = FALSE
#endif

View File

@@ -36,7 +36,7 @@
var/door_light_power = AIRLOCK_LIGHT_POWER
/obj/effect/overlay/vis_airlock
layer = EMISSIVE_LAYER
layer = 0
plane = EMISSIVE_PLANE
vis_flags = VIS_INHERIT_ID

View File

@@ -9,4 +9,4 @@
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(!(machine_stat & (NOPOWER|BROKEN)) && !panel_open)
SSvis_overlays.add_vis_overlay(src, icon, light_mask, EMISSIVE_LAYER, EMISSIVE_PLANE)
SSvis_overlays.add_vis_overlay(src, icon, light_mask, 0, EMISSIVE_PLANE)

View File

@@ -54,7 +54,7 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
SSvis_overlays.add_vis_overlay(src, icon, "oil_shambler_overlay", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "oil_shambler_overlay", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "oil_shambler_overlay", 0, EMISSIVE_PLANE, dir, alpha)
/mob/living/simple_animal/hostile/biohazard_blob/oil_shambler/AttackingTarget()
. = ..()

View File

@@ -128,7 +128,7 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
SSvis_overlays.add_vis_overlay(src, icon, "blob_core_overlay", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "blob_core_overlay", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "blob_core_overlay", 0, EMISSIVE_PLANE, dir, alpha)
var/obj/effect/overlay/vis/overlay1 = managed_vis_overlays[1]
var/obj/effect/overlay/vis/overlay2 = managed_vis_overlays[2]
overlay1.appearance_flags = PIXEL_SCALE | TILE_BOUND | RESET_COLOR
@@ -166,7 +166,7 @@
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(blooming)
SSvis_overlays.add_vis_overlay(src, icon, "[icon_state]_overlay", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[icon_state]_overlay", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "[icon_state]_overlay", 0, EMISSIVE_PLANE, dir, alpha)
var/obj/effect/overlay/vis/overlay1 = managed_vis_overlays[1]
var/obj/effect/overlay/vis/overlay2 = managed_vis_overlays[2]
overlay1.appearance_flags = PIXEL_SCALE | TILE_BOUND | RESET_COLOR
@@ -327,7 +327,7 @@
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(is_full)
SSvis_overlays.add_vis_overlay(src, icon, "blob_bulb_overlay", layer, plane, dir, BLOB_BULB_ALPHA)
SSvis_overlays.add_vis_overlay(src, icon, "blob_bulb_overlay", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "blob_bulb_overlay", 0, EMISSIVE_PLANE, dir, alpha)
var/obj/effect/overlay/vis/overlay1 = managed_vis_overlays[1]
var/obj/effect/overlay/vis/overlay2 = managed_vis_overlays[2]
overlay1.appearance_flags = PIXEL_SCALE | TILE_BOUND | RESET_COLOR

View File

@@ -180,7 +180,7 @@ Armageddon is truly going to fuck the station, use it sparingly.
anchored = TRUE
opacity = FALSE
density = FALSE
layer = LIGHTING_LAYER
plane = LIGHTING_PLANE
CanAtmosPass = ATMOS_PASS_DENSITY
var/timeleft = CME_MINIMAL_BUBBLE_BURST_TIME
var/cme_light_range_lower = CME_MINIMAL_LIGHT_RANGE_LOWER

View File

@@ -61,7 +61,7 @@
if(active)
luminosity = 1
SSvis_overlays.add_vis_overlay(src, icon, "active", layer, plane, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "active", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
SSvis_overlays.add_vis_overlay(src, icon, "active", 0, EMISSIVE_PLANE, dir, alpha)
/obj/machinery/jukebox/ui_status(mob/user)

View File

@@ -22,7 +22,7 @@
/obj/structure/flora/biolumi/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon]_light", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
SSvis_overlays.add_vis_overlay(src, icon, "[base_icon]_light", 0, ABOVE_LIGHTING_PLANE)
if(light_color)
var/obj/effect/overlay/vis/overlay = managed_vis_overlays[1]
overlay.color = light_color