mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
GPS now working :)
This commit is contained in:
@@ -20,14 +20,22 @@ 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, starton = TRUE)
|
||||
/datum/component/gps/item/Initialize(_gpstag = "COM0", emp_proof = FALSE, starton = TRUE, state = null, overlay_state = "working")
|
||||
. = ..()
|
||||
if(. == COMPONENT_INCOMPATIBLE || !isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
if(isnull(state))
|
||||
state = GLOB.default_state
|
||||
src.state = state
|
||||
|
||||
var/atom/A = parent
|
||||
if(starton)
|
||||
A.add_overlay("working")
|
||||
if(overlay_state)
|
||||
A.add_overlay(overlay_state)
|
||||
else
|
||||
tracking = FALSE
|
||||
A.name = "[initial(A.name)] ([gpstag])"
|
||||
@@ -93,6 +101,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
|
||||
|
||||
Reference in New Issue
Block a user