Makes random teleporter teleports more random (#15674)

This commit is contained in:
Qwertytoforty
2021-03-07 06:47:19 -05:00
committed by GitHub
parent 804ac31c56
commit 8395ca99b2
+3 -1
View File
@@ -401,7 +401,9 @@
if(!calibrated && com.cc_beacon)
visible_message("<span class='alert'>Cannot lock on target. Please calibrate the teleporter before attempting long range teleportation.</span>")
else if(!calibrated && prob(25 - ((accurate) * 10)) && !com.cc_beacon) //oh dear a problem
. = do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), 3), 2, bypass_area_flag = com.area_bypass)
var/list/target_z = levels_by_trait(REACHABLE)
target_z -= M.z //Where to sir? Anywhere but here.
. = do_teleport(M, locate(rand((2*TRANSITIONEDGE), world.maxx - (2*TRANSITIONEDGE)), rand((2*TRANSITIONEDGE), world.maxy - (2*TRANSITIONEDGE)), pick(target_z)), 2, bypass_area_flag = com.area_bypass)
else
. = do_teleport(M, com.target, bypass_area_flag = com.area_bypass)
calibrated = FALSE