[MIRROR] Add pAI internal GPS to possible software (#3184)

* Add pAI internal GPS to possible software (#56404)

pAIs are now a useful space travelling companion, they can help you
navigate if lost (although only the pAI has the GPS view, so they'll
need to communicate the information). If you're holding a GPS, then the
pAI can find you even if you get separated.

* Add pAI internal GPS to possible software

Co-authored-by: coiax <yellowbounder@gmail.com>
This commit is contained in:
SkyratBot
2021-02-08 23:38:53 +00:00
committed by GitHub
co-authored by coiax
parent 2db538593b
commit 53df094bab
7 changed files with 59 additions and 1 deletions
+11 -1
View File
@@ -20,11 +20,18 @@ GLOBAL_LIST_EMPTY(GPS_list)
/datum/component/gps/item
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
/// UI state of GPS, altering when it can be used.
var/datum/ui_state/state = null
/datum/component/gps/item/Initialize(_gpstag = "COM0", emp_proof = FALSE)
/datum/component/gps/item/Initialize(_gpstag = "COM0", emp_proof = FALSE, state = null)
. = ..()
if(. == COMPONENT_INCOMPATIBLE || !isitem(parent))
return COMPONENT_INCOMPATIBLE
if(isnull(state))
state = GLOB.default_state
src.state = state
var/atom/A = parent
A.add_overlay("working")
A.name = "[initial(A.name)] ([gpstag])"
@@ -98,6 +105,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
ui.open()
ui.set_autoupdate(updating)
/datum/component/gps/item/ui_state(mob/user)
return state
/datum/component/gps/item/ui_data(mob/user)
var/list/data = list()
data["power"] = tracking