mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Fixes layering issues brought by the FoV PR. (#63903)
* Fixed most (not all) incorrect planes and layers detected by the unit test.
This commit is contained in:
@@ -337,6 +337,7 @@
|
||||
integrity_failure = 0.05
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
layer = MOB_LAYER
|
||||
plane = GAME_PLANE_FOV_HIDDEN
|
||||
var/obj/item/clothing/mask/facehugger/child
|
||||
///Proximity monitor associated with this atom, needed for proximity checks.
|
||||
var/datum/proximity_monitor/proximity_monitor
|
||||
|
||||
@@ -111,8 +111,10 @@
|
||||
/obj/structure/chair/proc/handle_layer()
|
||||
if(has_buckled_mobs() && dir == NORTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
plane = GAME_PLANE
|
||||
|
||||
/obj/structure/chair/post_buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
@@ -167,7 +169,7 @@
|
||||
/obj/structure/chair/comfy/Initialize(mapload)
|
||||
armrest = GetArmrest()
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
armrest.plane = ABOVE_GAME_PLANE
|
||||
armrest.plane = GAME_PLANE_UPPER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/proc/GetArmrest()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
/obj/structure/chair/pew/left/Initialize(mapload)
|
||||
leftpewarmrest = GetLeftPewArmrest()
|
||||
leftpewarmrest.layer = ABOVE_MOB_LAYER
|
||||
leftpewarmrest.plane = GAME_PLANE_UPPER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/pew/left/proc/GetLeftPewArmrest()
|
||||
@@ -52,6 +53,7 @@
|
||||
/obj/structure/chair/pew/right/Initialize(mapload)
|
||||
rightpewarmrest = GetRightPewArmrest()
|
||||
rightpewarmrest.layer = ABOVE_MOB_LAYER
|
||||
rightpewarmrest.plane = GAME_PLANE_UPPER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/pew/right/proc/GetRightPewArmrest()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/obj/structure/chair/sofa/Initialize(mapload)
|
||||
armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER)
|
||||
armrest.plane = GAME_PLANE_UPPER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/sofa/electrify_self(obj/item/assembly/shock_kit/input_shock_kit, mob/user, list/overlays_from_child_procs)
|
||||
|
||||
@@ -17,8 +17,7 @@ LINEN BINS
|
||||
icon_state = "sheetwhite"
|
||||
inhand_icon_state = "sheetwhite"
|
||||
slot_flags = ITEM_SLOT_NECK
|
||||
layer = MOB_LAYER
|
||||
plane = GAME_PLANE_FOV_HIDDEN
|
||||
layer = BELOW_MOB_LAYER
|
||||
throwforce = 0
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
@@ -46,11 +45,13 @@ LINEN BINS
|
||||
return
|
||||
if(layer == initial(layer))
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
to_chat(user, span_notice("You cover yourself with [src]."))
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
else
|
||||
layer = initial(layer)
|
||||
plane = initial(plane)
|
||||
to_chat(user, span_notice("You smooth [src] out beneath you."))
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
max_integrity = 100
|
||||
buckle_lying = 0
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
var/view_range = 2.5
|
||||
var/cooldown = 0
|
||||
/// The projectile that the turret fires
|
||||
@@ -92,6 +93,7 @@
|
||||
M.put_in_hands(TC)
|
||||
M.pixel_y = 14
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
setDir(SOUTH)
|
||||
playsound(src,'sound/mecha/mechmove01.ogg', 50, TRUE)
|
||||
set_anchored(TRUE)
|
||||
@@ -126,34 +128,42 @@
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
user.pixel_x = 0
|
||||
user.pixel_y = -14
|
||||
if(NORTHEAST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
user.pixel_x = -8
|
||||
user.pixel_y = -4
|
||||
if(EAST)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
user.pixel_x = -14
|
||||
user.pixel_y = 0
|
||||
if(SOUTHEAST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
user.pixel_x = -8
|
||||
user.pixel_y = 4
|
||||
if(SOUTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
user.pixel_x = 0
|
||||
user.pixel_y = 14
|
||||
if(SOUTHWEST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
user.pixel_x = 8
|
||||
user.pixel_y = 4
|
||||
if(WEST)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
user.pixel_x = 14
|
||||
user.pixel_y = 0
|
||||
if(NORTHWEST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
user.pixel_x = 8
|
||||
user.pixel_y = -4
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
density = TRUE
|
||||
pixel_x = -16
|
||||
layer = FLY_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/W, mob/user, params)
|
||||
@@ -306,6 +307,7 @@
|
||||
icon_state = "plant-01"
|
||||
desc = "A little bit of nature contained in a pot."
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 10
|
||||
throwforce = 13
|
||||
@@ -490,6 +492,7 @@
|
||||
pixel_x = -16
|
||||
pixel_y = -12
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
|
||||
/obj/structure/flora/rock/pile/largejungle
|
||||
name = "rocks"
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
density = TRUE
|
||||
deconstructible = FALSE
|
||||
layer = EDGED_TURF_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
/**
|
||||
* A variety of statue in disrepair; parts are broken off and a gemstone is missing
|
||||
*/
|
||||
@@ -104,6 +105,7 @@
|
||||
icon_state = "frontwalltop"
|
||||
density = FALSE
|
||||
layer = ABOVE_ALL_MOB_LAYER //except for the stairs tile, which should be set to OBJ_LAYER aka 3.
|
||||
plane = ABOVE_GAME_PLANE
|
||||
|
||||
|
||||
/obj/structure/fluff/bus/passable/seat
|
||||
@@ -112,6 +114,7 @@
|
||||
icon_state = "backseat"
|
||||
pixel_y = 17
|
||||
layer = OBJ_LAYER
|
||||
plane = GAME_PLANE
|
||||
|
||||
|
||||
/obj/structure/fluff/bus/passable/seat/driver
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
buckle_lying = 0
|
||||
buckle_prevents_pull = TRUE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
var/blade_status = GUILLOTINE_BLADE_RAISED
|
||||
var/blade_sharpness = GUILLOTINE_BLADE_MAX_SHARP // How sharp the blade is
|
||||
var/kill_count = 0
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "punchingbag"
|
||||
anchored = TRUE
|
||||
layer = WALL_OBJ_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
|
||||
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
|
||||
|
||||
@@ -82,6 +83,7 @@
|
||||
|
||||
/obj/structure/weightmachine/weightlifter/AnimateMachine(mob/living/user)
|
||||
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
|
||||
swole_overlay.plane = GAME_PLANE_UPPER
|
||||
add_overlay(swole_overlay)
|
||||
var/reps = 0
|
||||
user.pixel_y = 5
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
. = ..()
|
||||
if(use_vis_overlay)
|
||||
alpha = 0
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, plane, dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, GAME_PLANE_UPPER, dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
|
||||
if(source_projector)
|
||||
projector = source_projector
|
||||
LAZYADD(projector.signs, src)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/structure/plasticflaps/Initialize(mapload)
|
||||
. = ..()
|
||||
alpha = 0
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, plane, dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, GAME_PLANE_UPPER, dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
return
|
||||
var/mutable_appearance/water_falling = mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER)
|
||||
water_falling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
water_falling.plane = GAME_PLANE_UPPER
|
||||
. += water_falling
|
||||
|
||||
/obj/machinery/shower/proc/handle_mist()
|
||||
@@ -211,6 +212,7 @@
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mist"
|
||||
layer = FLY_LAYER
|
||||
plane = ABOVE_GAME_PLANE
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
|
||||
@@ -655,10 +655,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
|
||||
open = !open
|
||||
if(open)
|
||||
layer = SIGN_LAYER
|
||||
plane = GAME_PLANE
|
||||
set_density(FALSE)
|
||||
set_opacity(FALSE)
|
||||
else
|
||||
layer = WALL_OBJ_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
set_density(TRUE)
|
||||
if(opaque_closed)
|
||||
set_opacity(TRUE)
|
||||
@@ -755,6 +757,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
|
||||
/obj/structure/curtain/cloth/fancy/mechanical/proc/open()
|
||||
icon_state = "[icon_type]-open"
|
||||
layer = SIGN_LAYER
|
||||
plane = GAME_PLANE
|
||||
set_density(FALSE)
|
||||
open = TRUE
|
||||
set_opacity(FALSE)
|
||||
@@ -762,6 +765,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
|
||||
/obj/structure/curtain/cloth/fancy/mechanical/proc/close()
|
||||
icon_state = "[icon_type]-closed"
|
||||
layer = WALL_OBJ_LAYER
|
||||
plane = GAME_PLANE_UPPER
|
||||
set_density(TRUE)
|
||||
open = FALSE
|
||||
if(opaque_closed)
|
||||
|
||||
Reference in New Issue
Block a user