mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes various layering issues (#33871)
* Fixes pipe node layering * Fixes more plane stuff * Might as well do this too * Fixes layering for cages and shelters Also inflicts necrotic damage to me directly
This commit is contained in:
@@ -269,6 +269,10 @@ Why is FLOAT_PLANE added to a bunch of these?
|
||||
plane = initial(plane)
|
||||
layer = initial(layer)
|
||||
|
||||
//Adjusts plane/layer for contained mobs when their reset_layer() is called. Should probably be extended to all movables at some point but I'm just making a quick fix right now
|
||||
/atom/proc/adjust_layer(mob/M)
|
||||
return
|
||||
|
||||
/obj/abstract/screen/plane_master
|
||||
appearance_flags = PLANE_MASTER
|
||||
screen_loc = "CENTER,CENTER"
|
||||
|
||||
@@ -163,7 +163,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
var/image/nodecon = icon_node_con(con_dir)
|
||||
if(nodecon)
|
||||
nodecon.color = node_color_for(connected_node)
|
||||
nodecon.plane = node_plane()
|
||||
nodecon.plane = relative_plane(node_plane())
|
||||
nodecon.layer = node_layer()
|
||||
underlays += nodecon
|
||||
if (!adjacent_procd && connected_node.update_icon_ready && !(istype(connected_node,/obj/machinery/atmospherics/pipe/simple)))
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
|
||||
if(cover_state == C_CLOSED)
|
||||
var/image/cover_overlay = image('icons/obj/cage.dmi', icon_state = "cage_cover", layer = OBJ_LAYER)
|
||||
cover_overlay.plane = OBJ_PLANE
|
||||
cover_overlay.plane = FLOAT_PLANE
|
||||
overlays += cover_overlay
|
||||
else if(door_state == C_CLOSED) //Door is only visible when the cover is open
|
||||
var/image/door_overlay = image('icons/obj/cage.dmi', icon_state = "cage_door")
|
||||
door_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
door_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
overlays += door_overlay
|
||||
|
||||
/obj/structure/cage/attack_animal(mob/living/simple_animal/user)
|
||||
|
||||
@@ -353,12 +353,16 @@
|
||||
vis_contents.Cut()
|
||||
overlays.Cut()
|
||||
for(var/mob/living/L in contents)
|
||||
L.reset_layer()
|
||||
vis_contents.Add(L)
|
||||
if(contents.len)
|
||||
var/image/cover_overlay = image('icons/obj/inflatable.dmi', icon_state = "shelter_top", layer = FLY_LAYER)
|
||||
cover_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
cover_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
overlays += cover_overlay
|
||||
|
||||
/obj/structure/inflatable/shelter/adjust_layer(mob/M)
|
||||
M.plane = relative_plane(M.plane)
|
||||
|
||||
/obj/structure/inflatable/shelter/attack_hand(mob/user)
|
||||
if(user.loc == src && ishuman(user))
|
||||
if(!laundry(user))
|
||||
@@ -525,4 +529,7 @@
|
||||
|
||||
/obj/structure/inflatable/shelter/Exited(var/atom/movable/mover)
|
||||
update_icon()
|
||||
var/mob/living/L = mover
|
||||
if(istype(L))
|
||||
L.reset_layer()
|
||||
return ..()
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
/obj/structure/bed/chair/wood/throne/New()
|
||||
..()
|
||||
buckle_overlay = image("icons/obj/stools-chairs-beds.dmi", "[icon_state]_arm", CHAIR_ARMREST_LAYER)
|
||||
buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
|
||||
/obj/structure/bed/chair/holowood/normal
|
||||
icon_state = "wooden_chair"
|
||||
@@ -286,9 +286,9 @@
|
||||
/obj/structure/bed/chair/comfy/New()
|
||||
..()
|
||||
buckle_overlay = image("icons/obj/objects.dmi", "[icon_state]_armrest", CHAIR_ARMREST_LAYER)
|
||||
buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
legs = image("icons/obj/objects.dmi", "[icon_state]_legs", CHAIR_LEG_LAYER)
|
||||
legs.plane = OBJ_PLANE
|
||||
legs.plane = FLOAT_PLANE
|
||||
legs.appearance_flags = RESET_COLOR
|
||||
overlays += legs
|
||||
..()
|
||||
@@ -388,7 +388,7 @@
|
||||
/obj/structure/bed/chair/office/New()
|
||||
..()
|
||||
buckle_overlay = image("icons/obj/objects.dmi", "[icon_state]-overlay", CHAIR_ARMREST_LAYER)
|
||||
buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
|
||||
/obj/structure/bed/chair/office/handle_layer() // Fixes layer problem when and office chair is buckled and facing north
|
||||
if(dir == NORTH && !is_locking(mob_lock_type))
|
||||
@@ -459,11 +459,11 @@
|
||||
// layer stuff
|
||||
/obj/structure/bed/chair/comfy/couch/New()
|
||||
legs = image("icons/obj/objects.dmi", "[icon_state]_legs", CHAIR_LEG_LAYER) // since i dont want the legs colored they are a separate overlay
|
||||
legs.plane = OBJ_PLANE //
|
||||
legs.plane = FLOAT_PLANE //
|
||||
legs.appearance_flags = RESET_COLOR //
|
||||
overlays += legs
|
||||
secondary_buckle_overlay = image("icons/obj/objects.dmi", "[icon_state]_armrest_legs", CHAIR_ARMREST_LAYER) // since i dont want the legs colored they are a separate overlay
|
||||
secondary_buckle_overlay.plane = ABOVE_HUMAN_PLANE //
|
||||
secondary_buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE) //
|
||||
secondary_buckle_overlay.appearance_flags = RESET_COLOR
|
||||
..()
|
||||
overlays += buckle_overlay
|
||||
@@ -685,7 +685,7 @@
|
||||
/obj/structure/bed/chair/shuttle/New()
|
||||
..()
|
||||
buckle_overlay = image("icons/obj/stools-chairs-beds.dmi", "[icon_state]_buckle", CHAIR_ARMREST_LAYER)
|
||||
buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
|
||||
/obj/structure/bed/chair/shuttle/red
|
||||
icon_state = "shuttleseat_red"
|
||||
@@ -705,14 +705,14 @@
|
||||
..()
|
||||
if (seat_color)
|
||||
var/image/I1 = image("icons/obj/stools-chairs-beds.dmi", "shuttleseat_color", layer)
|
||||
I1.plane = plane
|
||||
I1.plane = FLOAT_PLANE
|
||||
I1.color = seat_color
|
||||
overlays += I1
|
||||
|
||||
var/image/I2 = image("icons/obj/stools-chairs-beds.dmi", "shuttleseat_color_buckle", CHAIR_ARMREST_LAYER)
|
||||
I2.color = seat_color
|
||||
secondary_buckle_overlay = I2
|
||||
secondary_buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
secondary_buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
|
||||
/obj/structure/bed/chair/shuttle/gamer
|
||||
desc = "Ain't got nothing to compensate."
|
||||
@@ -737,4 +737,4 @@
|
||||
/obj/structure/bed/chair/plastic/plastic_chair/New()
|
||||
..()
|
||||
buckle_overlay = image("icons/obj/stools-chairs-beds.dmi", "[icon_state]_armrest", CHAIR_ARMREST_LAYER)
|
||||
buckle_overlay.plane = ABOVE_HUMAN_PLANE
|
||||
buckle_overlay.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
if(on)
|
||||
var/image/water = image('icons/obj/watercloset.dmi', src, "water", BELOW_OBJ_LAYER, dir)
|
||||
water.plane = ABOVE_HUMAN_PLANE
|
||||
water.plane = relative_plane(ABOVE_HUMAN_PLANE)
|
||||
overlays += water
|
||||
if(watertemp == "freezing") //No mist if the water is really cold
|
||||
return
|
||||
|
||||
@@ -247,7 +247,7 @@ var/list/meson_images = list()
|
||||
meson_images -= meson_image
|
||||
if(is_on_mesons)
|
||||
meson_image = image(icon,loc,icon_state,layer,dir)
|
||||
meson_image.plane = plane
|
||||
meson_image.plane = relative_plane_to_plane(plane, loc.plane)
|
||||
meson_images += meson_image
|
||||
for (var/mob/L in meson_wearers)
|
||||
if (L.client)
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
/mob/living/carbon/alien/larva/reset_layer()
|
||||
if(stat == DEAD)
|
||||
plane = MOB_PLANE
|
||||
loc.adjust_layer(src)
|
||||
|
||||
/mob/living/carbon/alien/larva/proc/transfer_personality(var/client/candidate)
|
||||
ckey = candidate.ckey
|
||||
|
||||
@@ -1714,6 +1714,7 @@
|
||||
var/area/this_area = get_area(src)
|
||||
if(istype(this_area) && this_area.project_shadows)
|
||||
update_shadow()
|
||||
loc.adjust_layer(src)
|
||||
|
||||
/mob/living/carbon/human/set_hand_amount(new_amount) //Humans need hand organs to use the new hands. This proc will give them some
|
||||
if(new_amount > held_items.len)
|
||||
|
||||
@@ -480,6 +480,7 @@
|
||||
plane = LYING_MOB_PLANE
|
||||
else
|
||||
plane = MOB_PLANE
|
||||
loc.adjust_layer(src)
|
||||
|
||||
/mob/living/carbon/monkey/send_to_past(var/duration)
|
||||
..()
|
||||
|
||||
@@ -204,7 +204,7 @@ var/global/list/falltempoverlays = list()
|
||||
var/matrix/original
|
||||
if(!fallimage)
|
||||
fallimage = image(icon = 'icons/effects/640x640.dmi', icon_state = "fall", layer = DECAL_LAYER)
|
||||
fallimage.plane = ABOVE_TURF_PLANE
|
||||
fallimage.plane = relative_plane_to_plane(ABOVE_TURF_PLANE, T_mob.plane)
|
||||
original = fallimage.transform
|
||||
fallimage.transform /= 50
|
||||
fallimage.mouse_opacity = 0
|
||||
|
||||
Reference in New Issue
Block a user