Files
Bubberstation/code/game/objects/effects/bump_teleporter.dm
oranges e04fd83b9d Rename Bumped to CollidedWith
In light of the change of Bump to Collide, this should also be done
as it will make it less confusing for devs in the future

I also ended up changing a bunch of the code in the CollidedWith procs,
things that were assuming types, doing bad loc changes and so forth
2017-07-15 00:25:22 +00:00

31 lines
815 B
Plaintext

/obj/effect/bump_teleporter
name = "bump-teleporter"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x2"
var/id = null //id of this bump_teleporter.
var/id_target = null //id of bump_teleporter which this moves you to.
invisibility = INVISIBILITY_ABSTRACT //nope, can't see this
anchored = TRUE
density = TRUE
opacity = 0
var/static/list/AllTeleporters
/obj/effect/bump_teleporter/New()
..()
LAZYADD(AllTeleporters, src)
/obj/effect/bump_teleporter/Destroy()
LAZYREMOVE(AllTeleporters, src)
return ..()
/obj/effect/bump_teleporter/CollidedWith(atom/movable/AM)
if(!ismob(AM))
return
if(!id_target)
return
for(var/obj/effect/bump_teleporter/BT in AllTeleporters)
if(BT.id == src.id_target)
AM.forceMove(BT.loc) //Teleport to location with correct id.