mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 04:52:10 +00:00
* [TM Candidate] Overhauls orbit and POI code to fix part of issue #61508 where players could observe /mob/living/new_player on the lobby. * E * Missed merge Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk> Co-authored-by: Gandalf <jzo123@hotmail.com>
21 lines
753 B
Plaintext
21 lines
753 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
|
|
|
|
// New players are abstract mobs assigned to people who are still in the lobby screen.
|
|
// As a result, they are not a valid POI and should never be a valid POI. If they
|
|
// somehow get this element attached to them, there's something we need to debug.
|
|
if(isnewplayer(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
SSpoints_of_interest.on_poi_element_added(target)
|
|
return ..()
|
|
|
|
/datum/element/point_of_interest/Detach(datum/target)
|
|
SSpoints_of_interest.on_poi_element_removed(target)
|
|
return ..()
|