mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user