Files
Polaris/code/modules/effects/vfx/_effect_system.dm
Atermonera 0232be9531 Repaths obj/effect/effect, datum/effect/effect [MDB_IGNORE] (#8312)
* Repaths obj/effect/effect, datum/effect/effect

* linter fixes

* No new

Co-authored-by: Atermonera <forslandm@gmail.com>
2022-01-16 00:14:39 -08:00

38 lines
1.0 KiB
Plaintext

/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
defined, then set up when it is created with New(). Then this same system can just be reused each time
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
would spawn and follow the beaker, even if it is carried or thrown.
*/
/obj/effect/vfx
name = "effect"
icon = 'icons/effects/effects.dmi'
mouse_opacity = 0
unacidable = 1//So effect are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
/datum/effect_system
var/number = 3
var/cardinals = 0
var/turf/location
var/atom/holder
var/setup = 0
/datum/effect_system/proc/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
setup = 1
/datum/effect_system/proc/attach(atom/atom)
holder = atom
/datum/effect_system/proc/start()
/datum/effect_system/Destroy()
holder = null
return ..()