From 09b14dfbeace7446f2ce8d76c01d2a8b200f6f70 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Sat, 21 Apr 2018 22:53:24 -0500 Subject: [PATCH] Fixes teleportation bugs with cryopods and vore --- modular_citadel/code/game/machinery/cryopod.dm | 4 ++++ modular_citadel/code/modules/vore/eating/living_vr.dm | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modular_citadel/code/game/machinery/cryopod.dm b/modular_citadel/code/game/machinery/cryopod.dm index 6400326d48..6e10070011 100644 --- a/modular_citadel/code/game/machinery/cryopod.dm +++ b/modular_citadel/code/game/machinery/cryopod.dm @@ -415,6 +415,9 @@ target.client.cryo_warned = world.time return + if(!Adjacent(user)) + return + if(target == user) visible_message("[user] starts climbing into the cryo pod.") else @@ -423,6 +426,7 @@ if(occupant) to_chat(user, "\The [src] is in use.") return + close_machine(target) to_chat(target, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") diff --git a/modular_citadel/code/modules/vore/eating/living_vr.dm b/modular_citadel/code/modules/vore/eating/living_vr.dm index 50496c5c31..25aff73412 100644 --- a/modular_citadel/code/modules/vore/eating/living_vr.dm +++ b/modular_citadel/code/modules/vore/eating/living_vr.dm @@ -191,16 +191,21 @@ attempt_msg = text("[] is attempting to make [] [] [] into their []!",user,pred,lowertext(belly.vore_verb),prey,lowertext(belly.name)) success_msg = text("[] manages to make [] [] [] into their []!",user,pred,lowertext(belly.vore_verb),prey,lowertext(belly.name)) + if(!prey.Adjacent(user)) // let's not even bother attempting it yet if they aren't next to us. + return FALSE + // Announce that we start the attempt! user.visible_message(attempt_msg) // Now give the prey time to escape... return if they did var/swallow_time = delay || ishuman(prey) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time - - + if(!do_mob(src, user, swallow_time)) return FALSE // Prey escaped (or user disabled) before timer expired. + if(!prey.Adjacent(user)) //double check'd just in case they moved during the timer and the do_mob didn't fail for whatever reason + return FALSE + // If we got this far, nom successful! Announce it! user.visible_message(success_msg) for(var/mob/M in get_hearers_in_view(5, get_turf(user)))