mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #14066 from Heroman3003/sofix
Hopefully fixes corner sofas
This commit is contained in:
@@ -299,7 +299,7 @@
|
|||||||
|
|
||||||
/obj/structure/bed/chair/sofa/update_layer()
|
/obj/structure/bed/chair/sofa/update_layer()
|
||||||
// Corner east/west should be on top of mobs, any other state's north should be.
|
// Corner east/west should be on top of mobs, any other state's north should be.
|
||||||
if((corner_piece && ((dir & EAST) || (dir & WEST))) || (!corner_piece && (dir & NORTH)))
|
if(!corner_piece && (dir & NORTH))
|
||||||
plane = MOB_PLANE
|
plane = MOB_PLANE
|
||||||
layer = MOB_LAYER + 0.1
|
layer = MOB_LAYER + 0.1
|
||||||
else
|
else
|
||||||
@@ -318,6 +318,18 @@
|
|||||||
base_icon = "sofacorner"
|
base_icon = "sofacorner"
|
||||||
corner_piece = TRUE
|
corner_piece = TRUE
|
||||||
|
|
||||||
|
/obj/structure/bed/chair/sofa/corner/update_icon()
|
||||||
|
..()
|
||||||
|
var/cache_key = "[base_icon]-armrest-[padding_material ? padding_material.name : "no_material"]-permanent"
|
||||||
|
if(isnull(stool_cache[cache_key]))
|
||||||
|
var/image/I = image(icon, "[base_icon]_armrest")
|
||||||
|
I.plane = MOB_PLANE
|
||||||
|
I.layer = ABOVE_MOB_LAYER
|
||||||
|
if(padding_material)
|
||||||
|
I.color = padding_material.icon_colour
|
||||||
|
stool_cache[cache_key] = I
|
||||||
|
add_overlay(stool_cache[cache_key])
|
||||||
|
|
||||||
// Wooden nonsofa - no corners
|
// Wooden nonsofa - no corners
|
||||||
/obj/structure/bed/chair/sofa/pew
|
/obj/structure/bed/chair/sofa/pew
|
||||||
name = "pew bench"
|
name = "pew bench"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user