Hand tele portals malfunctions teleport to random Z levels (#16126)

* thinking about portals

* affected's suggestion

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* teleporter machine change

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
hal9000PR
2021-06-29 11:46:13 +01:00
committed by GitHub
co-authored by AffectedArc07
parent c1d19836e1
commit 27fe4da2df
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -403,7 +403,7 @@
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
var/list/target_z = levels_by_trait(REACHABLE)
var/list/target_z = levels_by_trait(SPAWN_RUINS)
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
+3 -1
View File
@@ -101,7 +101,9 @@
if(prob(failchance))
icon_state = fail_icon
if(!do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to deep space.
var/list/target_z = levels_by_trait(SPAWN_RUINS)
target_z -= M.z
if(!do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), pick(target_z)), 0, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to deep space.
invalid_teleport()
return FALSE
else