Files
Citadel-Station-13/code/game/objects/structures/beds_chairs/sofa.dm
T
KathrinBailey 86790c69a5 credits accidently left out previously
re-adds nod to CEV Eris for their original sprites.
2020-03-03 14:38:16 +00:00

40 lines
1.2 KiB
Plaintext

// 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/corp_sofa
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"
icon = 'icons/obj/sofa.dmi'
buildstackamount = 1
var/mutable_appearance/armrest
/obj/structure/chair/corp_sofa/Initialize()
armrest = mutable_appearance(icon, "[icon_state]_armrest", ABOVE_MOB_LAYER)
return ..()
/obj/structure/chair/corp_sofa/post_buckle_mob(mob/living/M)
. = ..()
update_armrest()
/obj/structure/chair/corp_sofa/proc/update_armrest()
if(has_buckled_mobs())
add_overlay(armrest)
else
cut_overlay(armrest)
/obj/structure/chair/corp_sofa/post_unbuckle_mob()
. = ..()
update_armrest()
/obj/structure/chair/corp_sofa/left
icon_state = "corp_sofaend_left"
/obj/structure/chair/corp_sofa/right
icon_state = "corp_sofaend_right"
/obj/structure/chair/corp_sofa/corner
icon_state = "corp_sofacorner"
/obj/structure/chair/corp_sofa/corner/handle_layer() //only the armrest/back of this chair should cover the mob.
return