From d9f80d69057e7b39b471dd4b27d5f713fa630bbf Mon Sep 17 00:00:00 2001 From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com> Date: Mon, 8 Apr 2019 09:52:20 -0400 Subject: [PATCH] Telenom Fixing Ports https://github.com/VOREStation/VOREStation/pull/4960 so that the beacons allow yourself to get nommed from a teleporter trip. --- code/datums/helper_datums/teleport.dm | 30 +++++++++++++++++++----- code/datums/helper_datums/teleport_vr.dm | 9 ++----- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index a9ba96c3fa..f17a7c27ae 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -187,14 +187,32 @@ teleatom.visible_message("\The [teleatom] bounces off of the portal!") return 0 */ //VOREStation Removal End - //VOREStation Edit Start - if(!local || (destination.z in using_map.player_levels)) //VOREStation Edit + //TFF: port of VOREStation fix for teleporter beacons. + var/obstructed = 0 + var/turf/dest_turf = get_turf(destination) + if(local && !(dest_turf.z in using_map.player_levels)) + if(istype(teleatom, /mob/living)) + to_chat(teleatom, "The portal refuses to carry you that far away!") + return 0 + else if(istype(destination.loc, /obj/belly)) + var/obj/belly/destination_belly = destination.loc + var/mob/living/telenommer = destination_belly.owner + if(istype(telenommer)) + if(!isliving(teleatom)) + return 1 + else + var/mob/living/telemob = teleatom + if(telemob.can_be_drop_prey && telenommer.can_be_drop_pred) + return 1 + obstructed = 1 + else if(!isturf(destination.loc) || !destination.x || !destination.y || !destination.z) //If we're inside something or outside universe + obstructed = 1 + to_chat(teleatom, "Something is blocking way on the other side!") + if(obstructed) + return 0 + else return 1 if(isbelly(destination.loc)) //if we're going to televore var/obj/belly/B = destination.loc if(B.contents.len < 3) //avoid a 'belly of holding' situation return 1 - if(istype(teleatom, /mob/living)) - to_chat(teleatom, "The portal refuses to carry you that far away!") - return 0 - //VOREStation Edit End diff --git a/code/datums/helper_datums/teleport_vr.dm b/code/datums/helper_datums/teleport_vr.dm index eba2570c18..4075bc70f0 100644 --- a/code/datums/helper_datums/teleport_vr.dm +++ b/code/datums/helper_datums/teleport_vr.dm @@ -1,12 +1,8 @@ /datum/teleport/proc/try_televore() //Destination is in a belly - if(isbelly(destination.loc) && isliving(teleatom)) - var/mob/living/L = teleatom + if(isbelly(destination.loc)) var/obj/belly/B = destination.loc - - if(!L.can_be_drop_prey) //Overloading this as a pref for 'want to be unexpectedly eaten' - return FALSE - + teleatom.forceMove(get_turf(B)) //So we can splash the sound and sparks and everything. playSpecials(destination,effectout,soundout) teleatom.forceMove(B) @@ -14,4 +10,3 @@ //No fun! return FALSE - \ No newline at end of file