Fixes teleportation bugs with cryopods and vore

This commit is contained in:
Poojawa
2018-04-21 22:53:24 -05:00
parent f98040513a
commit 09b14dfbea
2 changed files with 11 additions and 2 deletions
@@ -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, "<span class='boldnotice'>\The [src] is in use.</span>")
return
close_machine(target)
to_chat(target, "<span class='boldnotice'>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</span>")
@@ -191,16 +191,21 @@
attempt_msg = text("<span class='warning'>[] is attempting to make [] [] [] into their []!</span>",user,pred,lowertext(belly.vore_verb),prey,lowertext(belly.name))
success_msg = text("<span class='warning'>[] manages to make [] [] [] into their []!</span>",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)))