From 0a6e20b63ebec89936c986c6f14e72af0709ebed Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 31 Jul 2021 22:31:19 +0200 Subject: [PATCH] Sofa Physics (#12248) --- .../structures/stool_bed_chair_nest/chairs.dm | 13 +++++++++++++ html/changelogs/geeves-sofa_physics.yml | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 html/changelogs/geeves-sofa_physics.yml diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 54407a7be6d..4be39d049bb 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -77,6 +77,19 @@ base_icon = "comfychair" build_amt = 2 +/obj/structure/bed/chair/comfy/MouseDrop_T(mob/target, mob/user) + if(target == user && user.loc != loc && (reverse_dir[dir] & angle2dir(Get_Angle(src, user)))) + user.visible_message("[user] starts climbing over the back of \the [src]...", SPAN_NOTICE("You start climbing over the back of \the [src]...")) + if(do_after(user, 2 SECONDS)) + user.forceMove(loc) + return + return ..() + +/obj/structure/bed/chair/comfy/CanPass(atom/movable/mover, turf/target, height, air_group) + if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover)))) + return FALSE + return ..() + /obj/structure/bed/chair/comfy/brown/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER) diff --git a/html/changelogs/geeves-sofa_physics.yml b/html/changelogs/geeves-sofa_physics.yml new file mode 100644 index 00000000000..5ffc6334336 --- /dev/null +++ b/html/changelogs/geeves-sofa_physics.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "You can no longer phase through the backsides of comfy chairs/sofa, you need to leap over them by click dragging yourself onto the comfy chair/sofa." \ No newline at end of file