mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 07:58:57 +01:00
cca0dfe7b6
Part one of our nefarious plans to destroy lag forever, and also accomplish some cool shit. This replaces our renderer system with plane masters, this will also be used to turn skyboxes into backdrops and thus totally remove skybox updating lag. Additionally, this will let us manipulate entire planes very easily to do all sorts of zany shit. All credit goes to the original coders, this is some seriously cool stuff. Also fixes some bizarre smoothing behaviour, reduces updateoverlays calls since now not every single structure in the game tries smoothing with nothing. <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/9b7cecd7-3c47-448b-9dd8-9b904640bf82" /> <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/647d75a2-1bff-45ca-ab92-0aea10631afd" /> --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
16 lines
476 B
Plaintext
16 lines
476 B
Plaintext
/// Sets an effect to delete itself after a specific amount of time
|
|
/datum/element/temporary
|
|
|
|
/datum/element/temporary/Attach(datum/target, duration)
|
|
. = ..()
|
|
if (. == ELEMENT_INCOMPATIBLE)
|
|
return
|
|
if (!istype(target, /obj/effect))
|
|
return ELEMENT_INCOMPATIBLE
|
|
addtimer(CALLBACK(src, PROC_REF(delete_effect), WEAKREF(target)), duration)
|
|
|
|
/datum/element/temporary/proc/delete_effect(datum/weakref/target_ref)
|
|
SIGNAL_HANDLER
|
|
if (target_ref.resolve())
|
|
qdel(target_ref)
|