From 8e88f7da46a5ae21b307faa7aa95ec8a9e7e89d3 Mon Sep 17 00:00:00 2001 From: FlufflesTheDog Date: Wed, 1 May 2024 10:47:07 -0700 Subject: [PATCH] Wheelchair qol (#82968) ## About The Pull Request Lets you pick up wheelchairs while resting, and lets you place wheelchairs on adjacent tiles, much like medical roller beds. ## Why It's Good For The Game Makes life just a little bit easier. Barely being able to move is already enough of a downside. I think allowing the little bit of extra independence being able to pick up your own chair (without just finding or making a basic chair first) offers is justifiable. And being able to place the chair a tile away just saves needing to pixel hunt or shuffle around to buckle yourself. ## Changelog :cl: Fluffles qol: you can pick up wheelchairs while on the ground qol: you can place wheelchairs a tile away from you, like roller beds /:cl: --- code/game/objects/items/bodybag.dm | 11 +++++------ code/game/objects/structures/beds_chairs/bed.dm | 11 +++++------ code/modules/vehicles/wheelchair.dm | 8 +++++++- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 7e67b23c3b7..19d3d273337 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -14,12 +14,11 @@ else deploy_bodybag(user, get_turf(src)) -/obj/item/bodybag/afterattack(atom/target, mob/user, proximity) - . = ..() - if(proximity) - if(isopenturf(target)) - deploy_bodybag(user, target) - +/obj/item/bodybag/interact_with_atom(atom/interacting_with, mob/living/user, flags) + if(isopenturf(interacting_with)) + deploy_bodybag(user, interacting_with) + return ITEM_INTERACT_SUCCESS + return NONE /obj/item/bodybag/attempt_pickup(mob/user) // can't pick ourselves up if we are inside of the bodybag, else very weird things may happen if(contains(user)) diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index 0e3845d2efa..e037043cc91 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -218,13 +218,12 @@ /obj/item/emergency_bed/attack_self(mob/user) deploy_bed(user, user.loc) -/obj/item/emergency_bed/afterattack(obj/target, mob/user, proximity) - . = ..() - if(!proximity) - return +/obj/item/emergency_bed/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(isopenturf(interacting_with)) + deploy_bed(user, interacting_with) + return ITEM_INTERACT_SUCCESS + return NONE - if(isopenturf(target)) - deploy_bed(user, target) /obj/item/emergency_bed/proc/deploy_bed(mob/user, atom/location) var/obj/structure/bed/medical/emergency/deployed = new /obj/structure/bed/medical/emergency(location) diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm index 92fcb995f76..d40b57276c0 100644 --- a/code/modules/vehicles/wheelchair.dm +++ b/code/modules/vehicles/wheelchair.dm @@ -126,7 +126,7 @@ . = ..() if(over_object != usr || !Adjacent(usr) || !foldabletype) return FALSE - if(!ishuman(usr) || !usr.can_perform_action(src)) + if(!ishuman(usr) || !usr.can_perform_action(src, ALLOW_RESTING)) return FALSE if(has_buckled_mobs()) return FALSE @@ -138,6 +138,12 @@ /obj/item/wheelchair/attack_self(mob/user) //Deploys wheelchair on in-hand use deploy_wheelchair(user, user.loc) +/obj/item/wheelchair/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(isopenturf(interacting_with)) + deploy_wheelchair(user, interacting_with) + return ITEM_INTERACT_SUCCESS + return NONE + /obj/item/wheelchair/proc/deploy_wheelchair(mob/user, atom/location) var/obj/vehicle/ridden/wheelchair/wheelchair_unfolded = new unfolded_type(location) wheelchair_unfolded.add_fingerprint(user)