mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Fixes ability to telenom via command teleporter
This commit is contained in:
@@ -188,9 +188,28 @@
|
|||||||
return 0
|
return 0
|
||||||
*/ //VOREStation Removal End
|
*/ //VOREStation Removal End
|
||||||
//VOREStation Edit Start
|
//VOREStation Edit Start
|
||||||
if(!local || (destination.z in using_map.player_levels)) //VOREStation Edit
|
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, "<span class='warning'>The portal refuses to carry you that far away!</span>")
|
||||||
|
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, "<span class='warning'>Something is blocking way on the other side!</span>")
|
||||||
|
if(obstructed)
|
||||||
|
return 0
|
||||||
|
else
|
||||||
return 1
|
return 1
|
||||||
if(istype(teleatom, /mob/living))
|
|
||||||
to_chat(teleatom, "<span class='warning'>The portal refuses to carry you that far away!</span>")
|
|
||||||
return 0
|
|
||||||
//VOREStation Edit End
|
//VOREStation Edit End
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
/datum/teleport/proc/try_televore()
|
/datum/teleport/proc/try_televore()
|
||||||
//Destination is in a belly
|
//Destination is in a belly
|
||||||
if(isbelly(destination.loc) && isliving(teleatom))
|
if(isbelly(destination.loc))
|
||||||
var/mob/living/L = teleatom
|
|
||||||
var/obj/belly/B = 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.
|
teleatom.forceMove(get_turf(B)) //So we can splash the sound and sparks and everything.
|
||||||
playSpecials(destination,effectout,soundout)
|
playSpecials(destination,effectout,soundout)
|
||||||
teleatom.forceMove(B)
|
teleatom.forceMove(B)
|
||||||
@@ -14,4 +10,3 @@
|
|||||||
|
|
||||||
//No fun!
|
//No fun!
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
Reference in New Issue
Block a user