Merge pull request #3711 from Tastyfish/cartdoors

Allows wheelchairs, janicarts, and ambulances to open doors
This commit is contained in:
Fox McCloud
2016-02-26 01:59:56 -05:00
4 changed files with 15 additions and 6 deletions
+4 -5
View File
@@ -97,16 +97,15 @@
/atom/movable/Crossed(atom/movable/AM)
return
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, sendBump)
if(src.throwing)
src.throw_impact(A)
if ((A && yes))
if (A && sendBump)
A.last_bumped = world.time
A.Bumped(src)
return
..()
return
else
..()
/atom/movable/proc/forceMove(atom/destination)
if(destination)
+4
View File
@@ -91,6 +91,10 @@
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
/obj/structure/stool/bed/chair/janicart/Bump(atom/A)
if(buckled_mob && istype(A, /obj/machinery/door))
A.Bumped(buckled_mob)
/obj/structure/stool/bed/chair/janicart/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
@@ -72,6 +72,9 @@
..()
if(!buckled_mob) return
if(istype(A, /obj/machinery/door))
A.Bumped(buckled_mob)
if(propelled)
var/mob/living/occupant = buckled_mob
unbuckle_mob()
@@ -150,7 +153,7 @@
else
. = 1
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
/obj/structure/stool/bed/chair/wheelchair/bike/handle_rotation()
overlays = null
var/image/O = image(icon = 'icons/vehicles/motorcycle.dmi', icon_state = "motorcycle_overlay_4d", layer = FLY_LAYER, dir = src.dir)
overlays += O
+3
View File
@@ -54,6 +54,9 @@
var/turf/T = get_step(A, dir)
if(isturf(T))
A.Move(T) //bump things away when hit
if(ismob(load) && istype(Obstacle, /obj/machinery/door))
Obstacle.Bumped(load)
if(emagged)
if(istype(A, /mob/living))