From 81d0e5ea8972da17365aa780cf4ede3370bc6226 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Mon, 4 Apr 2022 17:56:26 +0200 Subject: [PATCH] Revert "Change fail behavior 5% to a random teleport within 10 tiles" This reverts commit 84c55f0a4c58dcd692672d65e1f4c7df9de0d3f0. --- .../objects/items/weapons/teleportation.dm | 4 ++-- .../objects/items/weapons/teleportation_ch.dm | 21 ------------------- vorestation.dme | 1 - 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 code/game/objects/items/weapons/teleportation_ch.dm diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index d364edeecc..c1ad302407 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -175,8 +175,8 @@ Frequency: for(var/mob/O in hearers(user, null)) O.show_message("Locked In.", 2) var/obj/effect/portal/P = new /obj/effect/portal( get_turf(src) ) - P.failchance = 0 //CHOMPEdit : we make our own failchance - P.target = handle_fail(T) //CHOMPEdit + P.target = T P.creator = src + P.failchance = 0 //CHOMPEdit : funny 5% chance to be spaced and die makes the hand tele kinda useless. src.add_fingerprint(user) return diff --git a/code/game/objects/items/weapons/teleportation_ch.dm b/code/game/objects/items/weapons/teleportation_ch.dm deleted file mode 100644 index e1bcbcf339..0000000000 --- a/code/game/objects/items/weapons/teleportation_ch.dm +++ /dev/null @@ -1,21 +0,0 @@ -//Handle the failchance of a hand tele -//Default action is to randomise you in space. -//This proc allows custom actions. -/obj/item/weapon/hand_tele/proc/handle_fail(var/target) - - // Failure - if(prob(5) || !target) - - var/list/turfs = list( ) - for(var/turf/T in orange(10)) - if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb - if(T.y>world.maxy-8 || T.y<8) continue - if(T.block_tele) continue - turfs += T - - target = pick(turfs) - return target - - // Success - else - return target \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 65bf55abf6..de599fdda0 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1362,7 +1362,6 @@ #include "code\game\objects\items\weapons\tape.dm" #include "code\game\objects\items\weapons\taskmanager_ch.dm" #include "code\game\objects\items\weapons\teleportation.dm" -#include "code\game\objects\items\weapons\teleportation_ch.dm" #include "code\game\objects\items\weapons\towels.dm" #include "code\game\objects\items\weapons\traps.dm" #include "code\game\objects\items\weapons\traps_vr.dm"