mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Wheelchair fixes
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||||
..()
|
..()
|
||||||
overlays = null
|
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
|
overlays += O
|
||||||
if(buckled_mob)
|
if(buckled_mob)
|
||||||
buckled_mob.set_dir(dir)
|
buckled_mob.set_dir(dir)
|
||||||
@@ -116,26 +116,21 @@
|
|||||||
user_unbuckle_mob(user)
|
user_unbuckle_mob(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
|
||||||
..()
|
if(in_range(src, user))
|
||||||
if(over_object == usr && in_range(src, usr))
|
if(!ishuman(user)) return
|
||||||
if(!ishuman(usr)) return
|
if(user == buckled_mob)
|
||||||
if(usr == buckled_mob)
|
user << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||||
usr << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
|
||||||
return
|
return
|
||||||
if(!pulling)
|
if(!pulling)
|
||||||
pulling = usr
|
pulling = user
|
||||||
usr.pulledby = src
|
user.pulledby = src
|
||||||
if(usr.pulling)
|
if(user.pulling)
|
||||||
usr.stop_pulling()
|
user.stop_pulling()
|
||||||
usr.set_dir(get_dir(usr, src))
|
user.set_dir(get_dir(user, src))
|
||||||
usr << "You grip \the [name]'s handles."
|
user << "You grip \the [name]'s handles."
|
||||||
else
|
else
|
||||||
if(usr != pulling)
|
usr << "You let go of \the [name]'s handles."
|
||||||
for(var/mob/O in viewers(pulling, null))
|
|
||||||
O.show_message("<span class='warning'>[usr] breaks [pulling]'s grip on the wheelchair.</span>", 1)
|
|
||||||
else
|
|
||||||
usr << "You let go of \the [name]'s handles."
|
|
||||||
pulling.pulledby = null
|
pulling.pulledby = null
|
||||||
pulling = null
|
pulling = null
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
E.process()
|
E.process()
|
||||||
number_wounds += E.number_wounds
|
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
|
//Moving around with fractured ribs won't do you any good
|
||||||
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
|
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
|
||||||
var/obj/item/organ/I = pick(E.internal_organs)
|
var/obj/item/organ/I = pick(E.internal_organs)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ default behaviour is:
|
|||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
return
|
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
|
var/turf/oldloc = loc
|
||||||
forceMove(tmob.loc)
|
forceMove(tmob.loc)
|
||||||
tmob.forceMove(oldloc)
|
tmob.forceMove(oldloc)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/mob/proc/setMoveCooldown(var/timeout)
|
/mob/proc/setMoveCooldown(var/timeout)
|
||||||
if(client)
|
if(client)
|
||||||
client.move_delay = max(world.time + timeout, client.move_delay)
|
client.move_delay = max(world.time + timeout, client.move_delay)
|
||||||
|
|
||||||
/client/North()
|
/client/North()
|
||||||
@@ -300,8 +300,8 @@
|
|||||||
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
||||||
return mob.pulledby.relaymove(mob, direct)
|
return mob.pulledby.relaymove(mob, direct)
|
||||||
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
|
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
|
||||||
if(ishuman(mob.buckled))
|
if(ishuman(mob))
|
||||||
var/mob/living/carbon/human/driver = mob.buckled
|
var/mob/living/carbon/human/driver = mob
|
||||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_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)))
|
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
|
||||||
@@ -450,8 +450,8 @@
|
|||||||
if(!Check_Dense_Object()) //Nothing to push off of so end here
|
if(!Check_Dense_Object()) //Nothing to push off of so end here
|
||||||
update_floating(0)
|
update_floating(0)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
update_floating(1)
|
update_floating(1)
|
||||||
|
|
||||||
if(restrained()) //Check to see if we can do things
|
if(restrained()) //Check to see if we can do things
|
||||||
return 0
|
return 0
|
||||||
@@ -477,10 +477,10 @@
|
|||||||
|
|
||||||
if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity
|
if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity
|
||||||
var/area/A = turf.loc
|
var/area/A = turf.loc
|
||||||
if(istype(A) && A.has_gravity == 0)
|
if(istype(A) && A.has_gravity == 0)
|
||||||
if(shoegrip == null)
|
if(shoegrip == null)
|
||||||
shoegrip = Check_Shoegrip() //Shoegrip is only ever checked when a zero-gravity floor is encountered to reduce load
|
shoegrip = Check_Shoegrip() //Shoegrip is only ever checked when a zero-gravity floor is encountered to reduce load
|
||||||
if(!shoegrip)
|
if(!shoegrip)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
dense_object++
|
dense_object++
|
||||||
|
|||||||
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