Merge pull request #3275 from Aranclanos/TeleportersFix

Fixes and some minor changes regarding teleports/portals code.
This commit is contained in:
Razharas
2014-04-03 22:05:45 -07:00
7 changed files with 184 additions and 200 deletions
+3 -14
View File
@@ -5,22 +5,15 @@
icon_state = "portal"
density = 1
unacidable = 1//Can't destroy energy portals.
var/failchance = 5
var/obj/item/target = null
var/creator = null
anchored = 1.0
/obj/effect/portal/Bumped(mob/M as mob|obj)
spawn(0)
src.teleport(M)
return
return
src.teleport(M)
/obj/effect/portal/Crossed(AM as mob|obj)
spawn(0)
src.teleport(AM)
return
return
src.teleport(AM)
/obj/effect/portal/New(loc, turf/target, creator, lifespan=300)
portals += src
@@ -52,9 +45,5 @@
qdel(src)
return
if (istype(M, /atom/movable))
if(prob(failchance)) //oh dear a problem, put em in deep space
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, 1) ///You will appear adjacent to the beacon