mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-28 07:39:13 +01:00
Revert "Change fail behavior 5% to a random teleport within 10 tiles"
This reverts commit 84c55f0a4c.
This commit is contained in:
@@ -175,8 +175,8 @@ Frequency:
|
||||
for(var/mob/O in hearers(user, null))
|
||||
O.show_message("<span class='notice'>Locked In.</span>", 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
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user