mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
35 lines
1003 B
Plaintext
35 lines
1003 B
Plaintext
GLOBAL_LIST_EMPTY(bump_teleporters)
|
|
|
|
/obj/effect/bump_teleporter
|
|
name = "bump-teleporter"
|
|
icon = 'icons/mob/screen1.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
|
|
|
|
/obj/effect/bump_teleporter/Initialize(mapload)
|
|
. = ..()
|
|
GLOB.bump_teleporters += src
|
|
|
|
/obj/effect/bump_teleporter/Destroy()
|
|
GLOB.bump_teleporters -= src
|
|
return ..()
|
|
|
|
/obj/effect/bump_teleporter/Bumped(atom/user)
|
|
if(!ismob(user))
|
|
//user.loc = src.loc //Stop at teleporter location
|
|
return
|
|
var/mob/M = user //VOREStation edit
|
|
if(!id_target)
|
|
//user.loc = 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)
|
|
M.forceMove(BT.loc) //Teleport to location with correct id. //VOREStation Edit
|
|
return
|