mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-04 14:01:22 +00:00
* Replace direct poi_list manipulation with element (#55416) Replaces GLOB.poi_list |= src and GLOB.poi_list -= src with an element that handles it directly. More consistent code, especially when a lot of code couldn't decide how to add/remove (some |=, some -=, some .Remove, etc). * Replace direct poi_list manipulation with element Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
14 lines
388 B
Plaintext
14 lines
388 B
Plaintext
/// Designates the atom as a "point of interest", meaning it can be directly orbited
|
|
/datum/element/point_of_interest
|
|
element_flags = ELEMENT_DETACH
|
|
|
|
/datum/element/point_of_interest/Attach(datum/target)
|
|
if (!isatom(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
GLOB.poi_list += target
|
|
return ..()
|
|
|
|
/datum/element/point_of_interest/Detach(datum/target)
|
|
GLOB.poi_list -= target
|
|
return ..()
|