From f8ddd70798d052d1e43ad0aac9c4cbb87b9d7f30 Mon Sep 17 00:00:00 2001 From: "sieve32@gmail.com" Date: Thu, 9 Aug 2012 17:37:04 +0000 Subject: [PATCH] -Adds CanPass() checks as needed to mulebots, now you can no longer use MULEs to bypass windows or flaps, and CanPass() checks are run for flaps when something is loaded, meaning you can't get on the MULE if it is under flaps Fixes Issue 399 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4351 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/bots/mulebot.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 24c3d8faee6..8dba67e4ba8 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -470,6 +470,9 @@ if(get_dist(C, src) > 1 || load || !on) return + for(var/obj/structure/plasticflaps/P in src.loc)//Takes flaps into account + if(!CanPass(C,P)) + return mode = 1 // if a create, close before loading @@ -517,7 +520,12 @@ if(dirn) - step(load, dirn) + var/turf/T = src.loc + T = get_step(T,dirn) + if(CanPass(load,T))//Can't get off onto anything that wouldn't let you pass normally + step(load, dirn) + else + load.loc = src.loc//Drops you right there, so you shouldn't be able to get yourself stuck load = null