From 03c61e542c8ab4a84be2aff87de14d8b8c18172e Mon Sep 17 00:00:00 2001 From: Cody Brittain Date: Wed, 3 Apr 2024 16:17:21 -0400 Subject: [PATCH] Fixes various issues with layers (#18846) Fixes #18842, among other misc issues --------- Co-authored-by: Cody Brittain --- code/game/machinery/doors/blast_door.dm | 4 +- code/game/machinery/vending.dm | 2 +- .../structures/stool_bed_chair_nest/chairs.dm | 8 ++-- code/modules/atmospherics/pipes.dm | 17 ------- code/modules/power/lights/construction.dm | 5 +-- code/modules/power/lights/fixtures.dm | 4 +- .../Generalcamo - Layer Bugfixes.yml | 44 +++++++++++++++++++ 7 files changed, 54 insertions(+), 30 deletions(-) create mode 100644 html/changelogs/Generalcamo - Layer Bugfixes.yml diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index ff4e8a6a596..32683807efa 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -15,9 +15,8 @@ icon = 'icons/obj/doors/rapid_pdoor.dmi' icon_state = null dir = 1 - closed_layer = ABOVE_DOOR_LAYER + closed_layer = ABOVE_WINDOW_LAYER explosion_resistance = 25 - open_layer = BELOW_TABLE_LAYER /// Most blast doors are infrequently toggled and sometimes used with regular doors anyways. /// Turning this off prevents awkward zone geometry in places like medbay lobby, for example. @@ -31,7 +30,6 @@ var/open_sound = 'sound/machines/blastdooropen.ogg' var/close_sound = 'sound/machines/blastdoorclose.ogg' var/damage = BLAST_DOOR_CRUSH_DAMAGE - closed_layer = ABOVE_DOOR_LAYER var/id = 1.0 var/_wifi_id diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 08f8dfebb7f..d52a398d173 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -45,7 +45,7 @@ desc = "A generic vending machine." icon = 'icons/obj/vending.dmi' icon_state = "generic" - layer = BELOW_OBJ_LAYER + layer = STRUCTURE_LAYER anchored = 1 density = 1 clicksound = /singleton/sound_category/button_sound diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index cc6e74ee492..725d428045b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -26,15 +26,15 @@ /obj/structure/bed/stool/chair/update_icon() ..() // This handles all chair-specific funky stuff, such as chair backrests, armrests, padding and buckles. - generate_overlay_cache(material, CACHE_TYPE_OVER, FLY_LAYER) // Generate overlay for backrest + generate_overlay_cache(material, CACHE_TYPE_OVER, ABOVE_HUMAN_LAYER) // Generate overlay for backrest // Padding overlay. if(padding_material) - generate_overlay_cache(padding_material, CACHE_TYPE_PADDING_OVER, FLY_LAYER, TRUE) // Generate padding overlay for backrest + generate_overlay_cache(padding_material, CACHE_TYPE_PADDING_OVER, ABOVE_HUMAN_LAYER, TRUE) // Generate padding overlay for backrest if(buckled) - generate_overlay_cache(material, CACHE_TYPE_ARMREST, FLY_LAYER) // Generate armrests + generate_overlay_cache(material, CACHE_TYPE_ARMREST, ABOVE_HUMAN_LAYER) // Generate armrests if(padding_material) - generate_overlay_cache(padding_material, CACHE_TYPE_PADDING_ARMREST, FLY_LAYER, TRUE) // Generate padding overlay for armrest + generate_overlay_cache(padding_material, CACHE_TYPE_PADDING_ARMREST, ABOVE_HUMAN_LAYER, TRUE) // Generate padding overlay for armrest /obj/structure/bed/stool/chair/set_dir() . = ..() diff --git a/code/modules/atmospherics/pipes.dm b/code/modules/atmospherics/pipes.dm index 86ffb4c5db1..8f946dd6a00 100644 --- a/code/modules/atmospherics/pipes.dm +++ b/code/modules/atmospherics/pipes.dm @@ -7,7 +7,6 @@ var/volume = 0 force = 25 - layer = PIPE_LAYER use_power = POWER_USE_OFF var/alert_pressure = ATMOS_DEFAULT_ALERT_PRESSURE @@ -373,7 +372,6 @@ a Universal Adapter pipe." icon_state = "intact-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -384,7 +382,6 @@ a Universal Adapter pipe." icon_state = "intact-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -441,7 +438,6 @@ a Universal Adapter pipe." icon_state = "intact-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -452,7 +448,6 @@ a Universal Adapter pipe." icon_state = "intact-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -698,7 +693,6 @@ a Universal Adapter pipe." icon_state = "map-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -709,7 +703,6 @@ a Universal Adapter pipe." icon_state = "map-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -766,7 +759,6 @@ a Universal Adapter pipe." icon_state = "map-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -777,7 +769,6 @@ a Universal Adapter pipe." icon_state = "map-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -1025,7 +1016,6 @@ a Universal Adapter pipe." icon_state = "map_4way-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.38 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -1036,7 +1026,6 @@ a Universal Adapter pipe." icon_state = "map_4way-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.39 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -1093,7 +1082,6 @@ a Universal Adapter pipe." icon_state = "map_4way-fuel" connect_types = CONNECT_TYPE_FUEL - layer = 2.38 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -1104,7 +1092,6 @@ a Universal Adapter pipe." icon_state = "map_4way-aux" connect_types = CONNECT_TYPE_AUX - layer = 2.39 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -1231,7 +1218,6 @@ name = "fuel pipe endcap" desc = "An endcap for fuel pipes" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -1239,7 +1225,6 @@ name = "auxiliary pipe endcap" desc = "An endcap for auxiliary pipes" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN @@ -1266,7 +1251,6 @@ name = "fuel pipe endcap" desc = "An endcap for fuel pipes" connect_types = CONNECT_TYPE_FUEL - layer = 2.40 icon_connect_type = "-fuel" color = PIPE_COLOR_YELLOW @@ -1274,7 +1258,6 @@ name = "auxiliary pipe endcap" desc = "An endcap for auxiliary pipes" connect_types = CONNECT_TYPE_AUX - layer = 2.41 icon_connect_type = "-aux" color = PIPE_COLOR_CYAN diff --git a/code/modules/power/lights/construction.dm b/code/modules/power/lights/construction.dm index afd45be4544..69e2724923a 100644 --- a/code/modules/power/lights/construction.dm +++ b/code/modules/power/lights/construction.dm @@ -206,7 +206,6 @@ icon = 'icons/obj/machinery/light.dmi' icon_state = "slight-construct-stage1" anchored = TRUE - layer = 5 stage = 1 fixture_type = "spotlight" sheets_refunded = 3 @@ -217,7 +216,7 @@ icon = 'icons/obj/machinery/light.dmi' icon_state = "floor-construct-stage1" anchored = TRUE - layer = 2.5 + layer = TURF_DETAIL_LAYER stage = 1 fixture_type = "floorbulb" sheets_refunded = 1 @@ -228,6 +227,6 @@ icon = 'icons/obj/machinery/light.dmi' icon_state = "floortube-construct-stage1" anchored = TRUE - layer = 2.5 + layer = TURF_DETAIL_LAYER stage = 1 fixture_type = "floorlight" diff --git a/code/modules/power/lights/fixtures.dm b/code/modules/power/lights/fixtures.dm index d1f90ab13e7..3536cfcb606 100644 --- a/code/modules/power/lights/fixtures.dm +++ b/code/modules/power/lights/fixtures.dm @@ -76,7 +76,7 @@ icon_state = "floortube_example" base_state = "floortube" desc = "A lighting fixture. This one is set into the floor." - layer = 2.5 + layer = TURF_DETAIL_LAYER fitting_has_empty_icon = TRUE fitting_is_on_floor = TRUE @@ -100,7 +100,7 @@ icon_state = "floor_example" base_state = "floor" desc = "A small lighting fixture. This one is set into the floor." - layer = 2.5 + layer = TURF_DETAIL_LAYER fitting_is_on_floor = TRUE /obj/machinery/light/small/emergency diff --git a/html/changelogs/Generalcamo - Layer Bugfixes.yml b/html/changelogs/Generalcamo - Layer Bugfixes.yml new file mode 100644 index 00000000000..7d1a2e4dc6e --- /dev/null +++ b/html/changelogs/Generalcamo - Layer Bugfixes.yml @@ -0,0 +1,44 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed platforms layering over vending machines." + - bugfix: "Fixed chairs rendering over railings." + - bugfix: "Fixed pipes rendering under plating." + - bugfix: "Fixed closed blastdoors rendering under windows."