Files
2024-10-04 00:57:29 -04:00

56 lines
1.5 KiB
Plaintext

//GS13 EDIT, we changed the default sofa sprite here.
/obj/structure/chair/sofa
name = "old ratty sofa"
icon_state = "corp_sofamiddle"
icon = 'icons/obj/sofa.dmi'
buildstackamount = 1
item_chair = null
var/mutable_appearance/armrest
/obj/structure/chair/sofa/Initialize(mapload)
armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER)
return ..()
/obj/structure/chair/sofa/post_buckle_mob(mob/living/M)
. = ..()
update_armrest()
/obj/structure/chair/sofa/proc/update_armrest()
if(has_buckled_mobs())
add_overlay(armrest)
else
cut_overlay(armrest)
/obj/structure/chair/sofa/post_unbuckle_mob()
. = ..()
update_armrest()
/obj/structure/chair/sofa/left
icon_state = "corp_sofaend_left"
/obj/structure/chair/sofa/right
icon_state = "corp_sofaend_right"
/obj/structure/chair/sofa/corner
icon_state = "corp_sofacorner"
/obj/structure/chair/sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return
// Credit for the sprites goes to CEV Eris. The sprites were taken from Hyper Station and modified to fit with armrests which were also added.
/obj/structure/chair/sofa/corp
name = "sofa"
desc = "Soft, cushy and cozy. These sofas reek of bland faceless corporatism, but they aren't old and ratty at least."
icon_state = "corp_sofamiddle"
/obj/structure/chair/sofa/corp/left
icon_state = "corp_sofaend_left"
/obj/structure/chair/sofa/corp/right
icon_state = "corp_sofaend_right"
/obj/structure/chair/sofa/corp/corner
icon_state = "corp_sofacorner"