mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Wheelchair fixes
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
..()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
var/image/O = image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
@@ -116,24 +116,19 @@
|
||||
user_unbuckle_mob(user)
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && in_range(src, usr))
|
||||
if(!ishuman(usr)) return
|
||||
if(usr == buckled_mob)
|
||||
usr << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
|
||||
if(in_range(src, user))
|
||||
if(!ishuman(user)) return
|
||||
if(user == buckled_mob)
|
||||
user << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||
return
|
||||
if(!pulling)
|
||||
pulling = usr
|
||||
usr.pulledby = src
|
||||
if(usr.pulling)
|
||||
usr.stop_pulling()
|
||||
usr.set_dir(get_dir(usr, src))
|
||||
usr << "You grip \the [name]'s handles."
|
||||
else
|
||||
if(usr != pulling)
|
||||
for(var/mob/O in viewers(pulling, null))
|
||||
O.show_message("<span class='warning'>[usr] breaks [pulling]'s grip on the wheelchair.</span>", 1)
|
||||
pulling = user
|
||||
user.pulledby = src
|
||||
if(user.pulling)
|
||||
user.stop_pulling()
|
||||
user.set_dir(get_dir(user, src))
|
||||
user << "You grip \the [name]'s handles."
|
||||
else
|
||||
usr << "You let go of \the [name]'s handles."
|
||||
pulling.pulledby = null
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
E.process()
|
||||
number_wounds += E.number_wounds
|
||||
|
||||
if (!lying && world.time - l_move_time < 15)
|
||||
if (!lying && !buckled && world.time - l_move_time < 15)
|
||||
//Moving around with fractured ribs won't do you any good
|
||||
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
|
||||
var/obj/item/organ/I = pick(E.internal_organs)
|
||||
|
||||
@@ -85,7 +85,7 @@ default behaviour is:
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
|
||||
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !tmob.buckled && !buckled && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
forceMove(tmob.loc)
|
||||
tmob.forceMove(oldloc)
|
||||
|
||||
@@ -300,8 +300,8 @@
|
||||
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
||||
return mob.pulledby.relaymove(mob, direct)
|
||||
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
if(ishuman(mob.buckled))
|
||||
var/mob/living/carbon/human/driver = mob.buckled
|
||||
if(ishuman(mob))
|
||||
var/mob/living/carbon/human/driver = mob
|
||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 124 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user