From 335f5a37b9e4eb39d7c4ce36a59a6ff712a877aa Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Mon, 18 May 2020 02:02:57 +0200 Subject: [PATCH] Plane adjustments on several low layer objects. (#12286) --- code/__DEFINES/layers_planes.dm | 4 +++- code/__DEFINES/misc.dm | 2 +- code/_onclick/hud/plane_master.dm | 10 ++++++++-- code/game/gamemodes/gangs/gang_decals.dm | 2 +- code/game/machinery/hologram.dm | 2 +- code/game/objects/effects/decals/crayon.dm | 2 +- code/game/objects/effects/decals/decal.dm | 1 + code/game/objects/effects/landmarks.dm | 1 + code/game/turfs/simulated/walls.dm | 2 +- .../clockcult/clock_effects/clock_sigils.dm | 1 + code/modules/atmospherics/machinery/atmosmachinery.dm | 1 + .../machinery/components/binary_devices/circulator.dm | 1 + .../machinery/components/components_base.dm | 2 +- .../machinery/components/unary_devices/cryo.dm | 1 + .../machinery/components/unary_devices/tank.dm | 1 + .../components/unary_devices/thermomachine.dm | 1 + code/modules/client/preferences.dm | 6 ++++-- code/modules/power/cable.dm | 1 + code/modules/recycling/disposal/pipe.dm | 1 + 19 files changed, 31 insertions(+), 11 deletions(-) diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm index 210e5a4a35..6f33bb1a0e 100644 --- a/code/__DEFINES/layers_planes.dm +++ b/code/__DEFINES/layers_planes.dm @@ -42,6 +42,7 @@ #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals #define BLACKNESS_PLANE_RENDER_TARGET "BLACKNESS_PLANE" +///Layers most often used by atoms of plane lower than GAME_PLANE #define SPACE_LAYER 1.8 //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define #define MID_TURF_LAYER 2.02 @@ -61,11 +62,12 @@ #define GAS_PIPE_VISIBLE_LAYER 2.47 #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 + #define LOW_OBJ_LAYER 2.5 #define LOW_SIGIL_LAYER 2.52 #define SIGIL_LAYER 2.54 #define HIGH_SIGIL_LAYER 2.56 - +///Layers most often used by atoms of plane equal or higher than GAME_PLANE #define BELOW_OPEN_DOOR_LAYER 2.6 #define BLASTDOOR_LAYER 2.65 #define OPEN_DOOR_LAYER 2.7 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 42095aba41..880b7ea89a 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define PDAIMG(what) {""} //Filters -#define AMBIENT_OCCLUSION list("type"="drop_shadow","x"=0,"y"=-2,"size"=4,"color"="#04080FAA") +#define AMBIENT_OCCLUSION(_size, _color) list("type"="drop_shadow","x"=0,"y"=-2,"size"=_size,"color"=_color) #define EYE_BLUR(size) list("type"="blur", "size"=size) #define GRAVITY_MOTION_BLUR list("type"="motion_blur","x"=0,"y"=0) diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm index d7557b00d3..7a8b0a1121 100644 --- a/code/_onclick/hud/plane_master.dm +++ b/code/_onclick/hud/plane_master.dm @@ -57,7 +57,7 @@ /obj/screen/plane_master/wall/backdrop(mob/mymob) if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) else remove_filter("ambient_occlusion") @@ -70,6 +70,12 @@ . = ..() add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)) +/obj/screen/plane_master/above_wall/backdrop(mob/mymob) + if(mymob?.client?.prefs.ambientocclusion) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64")) + else + remove_filter("ambient_occlusion") + ///Contains most things in the game world /obj/screen/plane_master/game_world name = "game world plane master" @@ -83,7 +89,7 @@ /obj/screen/plane_master/game_world/backdrop(mob/mymob) if(mymob?.client?.prefs.ambientocclusion) - add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION) + add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA")) else remove_filter("ambient_occlusion") diff --git a/code/game/gamemodes/gangs/gang_decals.dm b/code/game/gamemodes/gangs/gang_decals.dm index 7aaed769d9..a37b4cb63b 100644 --- a/code/game/gamemodes/gangs/gang_decals.dm +++ b/code/game/gamemodes/gangs/gang_decals.dm @@ -10,7 +10,7 @@ /obj/effect/decal/cleanable/crayon/gang icon = 'icons/effects/crayondecal.dmi' layer = ABOVE_NORMAL_TURF_LAYER //Harder to hide - plane = GAME_PLANE + plane = ABOVE_WALL_PLANE do_icon_rotate = FALSE //These are designed to always face south, so no rotation please. var/datum/team/gang/gang diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 3a79ff3c82..621e486e90 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(network_holopads) desc = "It's a floor-mounted device for projecting holographic images." icon_state = "holopad0" layer = LOW_OBJ_LAYER - plane = FLOOR_PLANE + plane = ABOVE_WALL_PLANE flags_1 = HEAR_1 use_power = IDLE_POWER_USE idle_power_usage = 5 diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 955b9935dd..8cfdad0432 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -3,7 +3,7 @@ desc = "Graffiti. Damn kids." icon = 'icons/effects/crayondecal.dmi' icon_state = "rune1" - plane = GAME_PLANE //makes the graffiti visible over a wall. + plane = ABOVE_WALL_PLANE //makes the graffiti visible over a wall. gender = NEUTER mergeable_decal = FALSE var/do_icon_rotate = TRUE diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 3e7706282a..5dbd18aa0c 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -35,6 +35,7 @@ icon = 'icons/turf/decals.dmi' icon_state = "warningline" layer = TURF_DECAL_LAYER + plane = ABOVE_WALL_PLANE /obj/effect/turf_decal/Initialize() ..() diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 992e9c84a7..6910bb1db0 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -469,6 +469,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player) /obj/effect/landmark/stationroom var/list/templates = list() layer = BULLET_HOLE_LAYER + plane = ABOVE_WALL_PLANE /obj/effect/landmark/stationroom/New() ..() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 268e8e9109..5243341ac1 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -290,7 +290,7 @@ if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS) return - var/mutable_appearance/decal = mutable_appearance('icons/effects/effects.dmi', "", BULLET_HOLE_LAYER) + var/mutable_appearance/decal = mutable_appearance('icons/effects/effects.dmi', "", BULLET_HOLE_LAYER, ABOVE_WALL_PLANE) switch(denttype) if(WALL_DENT_SHOT) decal.icon_state = "bullet_hole" diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index 431416ede0..036ea37ada 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -5,6 +5,7 @@ clockwork_desc = "A sigil of some purpose." icon_state = "sigil" layer = LOW_OBJ_LAYER + plane = ABOVE_WALL_PLANE alpha = 50 resistance_flags = NONE var/affects_servants = FALSE diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 8f5ab7dd5e..97389848ba 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -17,6 +17,7 @@ active_power_usage = 0 power_channel = ENVIRON layer = GAS_PIPE_HIDDEN_LAYER //under wires + plane = ABOVE_WALL_PLANE resistance_flags = FIRE_PROOF max_integrity = 200 obj_flags = CAN_BE_HIT | ON_BLUEPRINTS diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm index c164dc5ae3..6b685d4bc1 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm @@ -7,6 +7,7 @@ name = "circulator/heat exchanger" desc = "A gas circulator pump and heat exchanger." icon_state = "circ-off-0" + plane = GAME_PLANE var/active = FALSE diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index a45728d51f..c229a4ba27 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -32,7 +32,7 @@ var/turf/T = loc if(level == 2 || (istype(T) && !T.intact)) showpipe = TRUE - plane = GAME_PLANE + plane = ABOVE_WALL_PLANE else showpipe = FALSE plane = FLOOR_PLANE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9b7183092d..d203856074 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -6,6 +6,7 @@ max_integrity = 350 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 30, "acid" = 30) layer = ABOVE_WINDOW_LAYER + plane = GAME_PLANE state_open = FALSE circuit = /obj/item/circuitboard/machine/cryo_tube pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index c1bd59f49b..79ff24e8b7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -7,6 +7,7 @@ max_integrity = 800 density = TRUE layer = ABOVE_WINDOW_LAYER + plane = GAME_PLANE pipe_flags = PIPING_ONE_PER_TURF var/volume = 10000 //in liters var/gas_type = 0 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index dddfdf08c1..7af3e57bc7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -9,6 +9,7 @@ max_integrity = 300 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) layer = OBJ_LAYER + plane = GAME_PLANE circuit = /obj/item/circuitboard/machine/thermomachine ui_x = 300 ui_y = 230 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 100dbc66ae..4ffe7f2ea4 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2385,9 +2385,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("ambientocclusion") ambientocclusion = !ambientocclusion if(parent && parent.screen && parent.screen.len) - var/obj/screen/plane_master/game_world/PM = parent.mob.hud_used.plane_masters["[GAME_PLANE]"] + var/obj/screen/plane_master/game_world/G = parent.mob.hud_used.plane_masters["[GAME_PLANE]"] + var/obj/screen/plane_master/above_wall/A = parent.mob.hud_used.plane_masters["[ABOVE_WALL_PLANE]"] var/obj/screen/plane_master/wall/W = parent.mob.hud_used.plane_masters["[WALL_PLANE]"] - PM.backdrop(parent.mob) + G.backdrop(parent.mob) + A.backdrop(parent.mob) W.backdrop(parent.mob) if("auto_fit_viewport") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index c8563c653f..0d674a2f77 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -39,6 +39,7 @@ By design, d1 is the smallest direction and d2 is the highest icon = 'icons/obj/power_cond/cables.dmi' icon_state = "0-1" level = 1 //is underfloor + plane = ABOVE_WALL_PLANE layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER anchored = TRUE obj_flags = CAN_BE_HIT | ON_BLUEPRINTS diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index aed2310a7f..45d3d9da25 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -14,6 +14,7 @@ max_integrity = 200 armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes + plane = ABOVE_WALL_PLANE rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE var/dpdir = NONE // bitmask of pipe directions var/initialize_dirs = NONE // bitflags of pipe directions added on init, see \code\_DEFINES\pipe_construction.dm