mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Add afterbuckle proc to beds, refactor comfychairs
This commit ports Baystation12/Baystation12#8527, as well as their afterbuckle system. After a mob is buckled/unbuckled, afterbuckle will be called on the object, which does nothing by default. Comfy Chairs have been refactored to use a grayscale sprite, and also to use overlays for the arms. This means that new colors are just a RGB definition.
This commit is contained in:
@@ -54,13 +54,20 @@
|
||||
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)
|
||||
@@ -110,6 +117,7 @@
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -97,26 +97,53 @@
|
||||
/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(141,70,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
icon_state = "comfychair_beige"
|
||||
/obj/structure/stool/bed/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/teal
|
||||
icon_state = "comfychair_teal"
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/office
|
||||
anchored = 0
|
||||
movable = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
icon_state = "comfychair_black"
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
icon_state = "comfychair_lime"
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
|
||||
Reference in New Issue
Block a user