mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-10 09:31:52 +00:00
This commit first and foremost ports the -tg- atom pooling system, and removes the old experimental system entirely. Secondly, this PR modifies the qdel system to use a -tg- lookalike "destroy hint" system, which means that individual objects can tell qdel what to do with them beyond taking care of things they need to delete. This ties into the atom pooling system via a new hint define, QDEL_HINT_PUTINPOOL, which will place the atom in the pool instead of deleting it as per standard. Emitter beams are now fully pooled. Qdel now has semi-compatibility with all datum types, however it is not the same as -tg-'s "Queue everything!" system. It simply passes it through the GC immediately and adds it to the "hard del" lists. This means that reagents can be qdel'ed, but there is no purpose as of yet, as it is more or less the same as just deleting them, with the added effect of adding logs of them being deleted to the garbage collector.
34 lines
946 B
Plaintext
34 lines
946 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 = 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/Bumped(atom/user)
|
|
if(!ismob(user))
|
|
//user.loc = src.loc //Stop at teleporter location
|
|
return
|
|
|
|
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)
|
|
usr.loc = BT.loc //Teleport to location with correct id.
|
|
return |