From f7d1de61fac6b6447a12183778b7d3b9e2e4f1f1 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Sun, 3 Apr 2022 16:08:27 +0200 Subject: [PATCH 1/3] Removes hand tele 5% chance to space Hand tele is supposed to be a reasonably powerful sensitive item for heads. The 5% chance to just yeet you into space is kinda spicy making it extremely unwise to use. I didn't even know the 5% chance was innate, admittedly. --- code/game/objects/items/weapons/teleportation.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 5d9efa2ad7..c1ad302407 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -177,5 +177,6 @@ Frequency: var/obj/effect/portal/P = new /obj/effect/portal( get_turf(src) ) 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 From 84c55f0a4c58dcd692672d65e1f4c7df9de0d3f0 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Mon, 4 Apr 2022 17:56:26 +0200 Subject: [PATCH 2/3] Change fail behavior 5% to a random teleport within 10 tiles --- .../objects/items/weapons/teleportation.dm | 4 ++-- .../objects/items/weapons/teleportation_ch.dm | 21 +++++++++++++++++++ vorestation.dme | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) create 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 c1ad302407..d364edeecc 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.target = T + P.failchance = 0 //CHOMPEdit : we make our own failchance + P.target = handle_fail(T) //CHOMPEdit 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 new file mode 100644 index 0000000000..e1bcbcf339 --- /dev/null +++ b/code/game/objects/items/weapons/teleportation_ch.dm @@ -0,0 +1,21 @@ +//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 de599fdda0..65bf55abf6 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1362,6 +1362,7 @@ #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" From 81d0e5ea8972da17365aa780cf4ede3370bc6226 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Mon, 4 Apr 2022 17:56:26 +0200 Subject: [PATCH 3/3] 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"