From 6dbfd469a20a6c1ac2c3770b8a85047c83cd6c03 Mon Sep 17 00:00:00 2001 From: SteelSlayer Date: Sun, 10 Nov 2019 11:31:02 -0600 Subject: [PATCH] Adds a cancel button to the wizard teleport spell --- code/datums/spells/area_teleport.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/spells/area_teleport.dm b/code/datums/spells/area_teleport.dm index 2f07f106d2a..4aa7eafbed6 100644 --- a/code/datums/spells/area_teleport.dm +++ b/code/datums/spells/area_teleport.dm @@ -25,10 +25,13 @@ var/A = null if(!randomise_selection) - A = input("Area to teleport to", "Teleport", A) in teleportlocs + A = input("Area to teleport to", "Teleport", A) as null|anything in teleportlocs else A = pick(teleportlocs) + if(!A) + return + var/area/thearea = teleportlocs[A] if(thearea.tele_proof && !istype(thearea, /area/wizard_station))