Comfy chair update, makes armrests show up.

This commit is contained in:
Graham Lloyd
2014-08-17 22:48:38 -04:00
parent 472a458d47
commit 75305a0ec4
3 changed files with 29 additions and 5 deletions
@@ -47,13 +47,21 @@
buckle_mob(M, user)
return
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
@@ -103,6 +111,7 @@
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return
/*
@@ -95,25 +95,40 @@
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
return ..()
/obj/structure/stool/bed/chair/comfy/afterbuckle()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/stool/bed/chair/comfy/brown
icon_state = "comfychair_brown"
color = rgb(255,113,0)
/obj/structure/stool/bed/chair/comfy/beige
icon_state = "comfychair_beige"
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/teal
icon_state = "comfychair_teal"
color = rgb(0,255,255)
/obj/structure/stool/bed/chair/office
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/comfy/black
icon_state = "comfychair_black"
color = rgb(167,164,153)
/obj/structure/stool/bed/chair/comfy/lime
icon_state = "comfychair_lime"
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office/Move()
..()