Makes Telescience portals more accurate, fixing a number of issues (#7245)

Telescience portals now have a precision of 0, meaning they output on the turf the portal is on.
This means echoes can once again be reliably placed back into their bodies.
This also means calibration should hopefully result in 1/4 the explosions.
If you don't like GPS units phasing into walls and blowing you up 90% of the time, this is the PR for you
This commit is contained in:
MarinaGryphon
2019-11-23 11:15:14 +02:00
committed by Erki
parent a63576e1de
commit d7e45beb12
3 changed files with 11 additions and 4 deletions
+5 -2
View File
@@ -8,6 +8,7 @@
var/failchance = 5
var/obj/target = null
var/creator = null
var/precision = 1
anchored = 1.0
/obj/effect/portal/CollidedWith(mob/M as mob|obj)
@@ -22,13 +23,15 @@
set waitfor = FALSE
src.teleport(user)
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300, precise = 1)
..()
src.target = target
src.creator = creator
if(lifespan > 0)
QDEL_IN(src, lifespan)
precision = precise
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
if(istype(M, /obj/effect)) //sparks don't teleport
@@ -45,4 +48,4 @@
src.icon_state = "portal1"
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
else
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
do_teleport(M, target, precision)