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
🆑 Fluffles
qol: you can pick up wheelchairs while on the ground
qol: you can place wheelchairs a tile away from you, like roller beds
/🆑
This commit is contained in:
FlufflesTheDog
2024-05-01 19:47:07 +02:00
committed by GitHub
parent a9dfdd84d0
commit 5aae4a3ddc
3 changed files with 17 additions and 13 deletions
+5 -6
View File
@@ -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))
@@ -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)
+7 -1
View File
@@ -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)