mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-10 00:43:14 +00:00
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).
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 ..()
|