TG Buckle Update (#12375)

This commit is contained in:
Fox McCloud
2019-09-22 18:22:57 -07:00
committed by variableundefined
parent 7846268dae
commit c87389a595
60 changed files with 640 additions and 533 deletions
+19 -10
View File
@@ -248,23 +248,32 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
toggleoff()
/obj/machinery/gateway/centeraway/Bumped(atom/movable/M as mob|obj)
/obj/machinery/gateway/centeraway/Bumped(atom/movable/AM)
if(!ready)
return
if(!active)
return
if(istype(M, /mob/living/carbon))
if(exilecheck(M))
if(!stationgate || QDELETED(stationgate))
return
if(isliving(AM))
if(exilecheck(AM))
return
if(istype(M, /obj))
if(M.can_buckle && M.has_buckled_mobs())
if(exilecheck(M.buckled_mob))
else
for(var/mob/living/L in AM.contents)
if(exilecheck(L))
atom_say("Rejecting [AM]: Exile implant detected in contained lifeform.")
return
for(var/mob/living/carbon/F in M)
if(exilecheck(F))
if(AM.has_buckled_mobs())
for(var/mob/living/L in AM.buckled_mobs)
if(exilecheck(L))
atom_say("Rejecting [AM]: Exile implant detected in close proximity lifeform.")
return
M.forceMove(get_step(stationgate.loc, SOUTH))
M.dir = SOUTH
AM.forceMove(get_step(stationgate.loc, SOUTH))
AM.setDir(SOUTH)
if(ismob(AM))
var/mob/M = AM
if(M.client)
M.client.move_delay = max(world.time + 5, M.client.move_delay)
/obj/machinery/gateway/centeraway/proc/exilecheck(var/mob/living/carbon/M)
for(var/obj/item/implant/exile/E in M)//Checking that there is an exile implant in the contents