mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
35 lines
976 B
Plaintext
35 lines
976 B
Plaintext
var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
|
|
|
/obj/effect/bump_teleporter
|
|
name = "bump-teleporter"
|
|
icon = 'icons/mob/screen/generic.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 = 101 //nope, can't see this
|
|
anchored = 1
|
|
density = 1
|
|
opacity = 0
|
|
|
|
/obj/effect/bump_teleporter/New()
|
|
..()
|
|
BUMP_TELEPORTERS += src
|
|
|
|
/obj/effect/bump_teleporter/Destroy()
|
|
BUMP_TELEPORTERS -= src
|
|
return ..()
|
|
|
|
/obj/effect/bump_teleporter/CollidedWith(atom/user)
|
|
if(!ismob(user))
|
|
//user.forceMove(src.loc) //Stop at teleporter location
|
|
return
|
|
|
|
if(!id_target)
|
|
//user.forceMove(src.loc) //Stop at teleporter location, there is nowhere to teleport to.
|
|
return
|
|
|
|
for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
|
|
if(BT.id == src.id_target)
|
|
usr.forceMove(BT.loc) //Teleport to location with correct id.
|
|
return
|