diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 5b9a86c8ed..01f06f14a4 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -12,6 +12,7 @@
desc = "This is used to lie in, sleep in or strap on."
icon_state = "bed"
var/mob/living/buckled_mob
+ var/movable = 0 // For mobility checks
/obj/structure/stool/bed/psych
name = "psychiatrists couch"
@@ -35,6 +36,9 @@
manual_unbuckle(user)
return
+/obj/structure/stool/bed/proc/handle_rotation()
+ return
+
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
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 63fe705be7..9982017c6b 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -39,7 +39,7 @@
rotate()
return
-/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
+/obj/structure/stool/bed/chair/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
@@ -107,6 +107,7 @@
/obj/structure/stool/bed/chair/office
anchored = 0
+ movable = 1
/obj/structure/stool/bed/chair/comfy/black
icon_state = "comfychair_black"
@@ -148,7 +149,7 @@
victim.apply_effect(6, WEAKEN, 0)
victim.apply_effect(6, STUTTER, 0)
victim.take_organ_damage(10)
- occupant.visible_message("[occupant] clashed into \the [A]!")
+ occupant.visible_message("[occupant] crashed into \the [A]!")
/obj/structure/stool/bed/chair/office/light
icon_state = "officechair_white"
diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
index c3ad95b832..adec836a78 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
@@ -3,9 +3,11 @@
desc = "You sit in this. Either by will or force."
icon_state = "wheelchair"
anchored = 0
+ movable = 1
var/driving = 0
var/mob/living/pulling = null
+ var/bloodiness
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
@@ -22,7 +24,7 @@
user.pulledby = null
user << "\red You lost your grip!"
return
- if(user.pulling)
+ if(user.pulling && (user == pulling))
pulling = null
user.pulledby = null
return
@@ -31,7 +33,8 @@
if(pulling && (get_dist(src, pulling) > 1))
pulling = null
user.pulledby = null
- return
+ if(user==pulling)
+ return
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
user << "\red You cannot go there."
return
@@ -67,26 +70,36 @@
pulling = null
user.pulledby = null
pulling.dir = get_dir(pulling, src) // When everything is right, face the wheelchair
+ if(bloodiness)
+ create_track()
driving = 0
/obj/structure/stool/bed/chair/wheelchair/Move()
..()
- if(!driving && buckled_mob)
+ if(buckled_mob)
var/mob/living/occupant = buckled_mob
- occupant.buckled = null
- occupant.Move(src.loc)
- occupant.buckled = src
- if (occupant && (src.loc != occupant.loc))
- if (propelled)
- for (var/mob/O in src.loc)
- if (O != occupant)
- Bump(O)
- else
- unbuckle()
+ if(!driving)
+ occupant.buckled = null
+ occupant.Move(src.loc)
+ occupant.buckled = src
+ if (occupant && (src.loc != occupant.loc))
+ if (propelled)
+ for (var/mob/O in src.loc)
+ if (O != occupant)
+ Bump(O)
+ else
+ unbuckle()
+ if (pulling && (get_dist(src, pulling) > 1))
+ pulling.pulledby = null
+ pulling << "\red You lost your grip!"
+ pulling = null
+ else
+ if (occupant && (src.loc != occupant.loc))
+ src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
handle_rotation()
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
- if (pulling && (pulling == usr))
+ if (pulling)
MouseDrop(usr)
else
manual_unbuckle(user)
@@ -137,11 +150,25 @@
if(pulling)
occupant.visible_message("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!")
- pulling.attack_log += "\[[time_stamp()]\] Clashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]"
+ pulling.attack_log += "\[[time_stamp()]\] Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]"
occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]"
msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (JMP)")
else
- occupant.visible_message("[occupant] clashed into \the [A]!")
+ occupant.visible_message("[occupant] crashed into \the [A]!")
+
+/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
+ var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
+ var/newdir = get_dir(get_step(loc, dir), loc)
+ if(newdir == dir)
+ B.dir = newdir
+ else
+ newdir = newdir | dir
+ if(newdir == 3)
+ newdir = 1
+ else if(newdir == 12)
+ newdir = 4
+ B.dir = newdir
+ bloodiness--
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
if(M == pulling)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 000600781b..f4edb30e24 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -112,7 +112,7 @@
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
- if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
+ if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 18d415fd39..2b0d1b2c01 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -755,7 +755,7 @@ note dizziness decrements automatically in the mob's Life() proc.
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/proc/update_canmove()
- if(buckled)
+ if(buckled && (!buckled.movable))
anchored = 1
canmove = 0
if( istype(buckled,/obj/structure/stool/bed/chair) )
@@ -778,9 +778,9 @@ note dizziness decrements automatically in the mob's Life() proc.
anchored = 1
canmove = 0
lying = 0
- else
+ else if (!buckled)
lying = !can_stand
- canmove = has_limbs
+ //canmove = has_limbs
if(lying)
density = 0
diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm
index 27ce16d113..ef2ea18a5e 100644
--- a/code/modules/vehicles/vehicle.dm
+++ b/code/modules/vehicles/vehicle.dm
@@ -19,6 +19,7 @@
var/emagged = 0
var/powered = 0 //set if vehicle is powered and should use fuel when moving
var/move_delay = 1 //set this to limit the speed of the vehicle
+ var/movable = 1
var/obj/item/weapon/cell/cell
var/power_use = 5 //set this to adjust the amount of power the vehicle uses per move
@@ -47,7 +48,7 @@
if(on && powered)
cell.use(power_use)
anchored = init_anc
-
+
if(load)
load.loc = loc
load.dir = dir
@@ -288,7 +289,7 @@
/obj/vehicle/proc/unload(var/mob/user, var/direction)
if(!load)
return
-
+
var/turf/dest = null
//find a turf to unload to