If you try to use the teleporter and the teleport was rejected for any reason (like having a nuclear disk), you won't get the chance to get a random damage from the teleport.

Fixes issue #2236.
Removed some spawn() calls.
Removed the chance of fail from the portal effects (the blue portals made with hand teleporters).
The portal datums will now return 0 if the teleport failed, and now use a new proc, start(), instead of New() to handle themselves.
Standarized teleport.dm from the helper_datums folder.
Removed the checks for centcomm z level and away missions z level for teleports. Now you can go there.
changed the /red messages from the teleports datum to span classes.
The "[something] bounces off of the portal!" were replaced for "The portal rejects [something]".
Removed an extra "the" on those messages.
This commit is contained in:
Aranclanos
2014-04-02 08:36:33 -03:00
parent d3d7e84c3f
commit fc915bf800
7 changed files with 173 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