Files
Aurora.3/code/game/objects/effects/bump_teleporter.dm
T
BatrachophrenoandGitHub 9d6b304ac7 [IDB Ignore] Centralize HUD icon file location (#22464)
Moves all HUD screen object icon files from various scattered locations
to icons/hud. No changes made to any icon_states in this PR, no
player-facing changes. Part of larger icon organization work and in
preparation for action button rework.
2026-05-18 19:19:40 +00:00

37 lines
995 B
Plaintext

GLOBAL_LIST_INIT_TYPED(bump_teleporters, /obj/effect/bump_teleporter, list())
/obj/effect/bump_teleporter
name = "bump-teleporter"
icon = 'icons/hud/mob/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()
..()
GLOB.bump_teleporters += src
/obj/effect/bump_teleporter/Destroy()
GLOB.bump_teleporters -= src
return ..()
/obj/effect/bump_teleporter/CollidedWith(atom/bumped_atom)
. = ..()
if(!ismob(bumped_atom))
//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 GLOB.bump_teleporters)
if(BT.id == src.id_target)
usr.forceMove(BT.loc) //Teleport to location with correct id.
return