Files
VOREStation/code/game/objects/effects/bump_teleporter.dm
T
DrathekandGitHub 7c8bb85de3 Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d844.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d.

* Attempt to normalize example.yml (and another file I guess)

* Try again
2024-02-20 11:28:51 +01:00

35 lines
978 B
Plaintext

var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
/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 = 101 //nope, can't see this
anchored = TRUE
density = TRUE
opacity = 0
/obj/effect/bump_teleporter/New()
..()
BUMP_TELEPORTERS += src
/obj/effect/bump_teleporter/Destroy()
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 BUMP_TELEPORTERS)
if(BT.id == src.id_target)
M.forceMove(BT.loc) //Teleport to location with correct id. //VOREStation Edit
return