mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +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:
@@ -164,6 +164,7 @@
|
||||
#define ui_pai_state_laws "SOUTH:6,WEST+8"
|
||||
#define ui_pai_pda_send "SOUTH:6,WEST+9"
|
||||
#define ui_pai_pda_log "SOUTH:6,WEST+10"
|
||||
#define ui_pai_internal_gps "SOUTH:6,WEST+11"
|
||||
#define ui_pai_take_picture "SOUTH:6,WEST+12"
|
||||
#define ui_pai_view_images "SOUTH:6,WEST+13"
|
||||
|
||||
|
||||
@@ -136,6 +136,20 @@
|
||||
var/mob/living/silicon/pai/pAI = usr
|
||||
pAI.cmd_show_message_log(usr)
|
||||
|
||||
/atom/movable/screen/pai/internal_gps
|
||||
name = "Internal GPS"
|
||||
icon_state = "internal_gps"
|
||||
required_software = "internal gps"
|
||||
|
||||
/atom/movable/screen/pai/internal_gps/Click()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/living/silicon/pai/pAI = usr
|
||||
if(!pAI.internal_gps)
|
||||
pAI.internal_gps = new(pAI)
|
||||
pAI.internal_gps.attack_self(pAI)
|
||||
|
||||
/atom/movable/screen/pai/image_take
|
||||
name = "Take Image"
|
||||
icon_state = "take_picture"
|
||||
@@ -233,6 +247,11 @@
|
||||
using.screen_loc = ui_pai_pda_log
|
||||
static_inventory += using
|
||||
|
||||
// Internal GPS
|
||||
using = new /atom/movable/screen/pai/internal_gps()
|
||||
using.screen_loc = ui_pai_internal_gps
|
||||
static_inventory += using
|
||||
|
||||
// Take image
|
||||
using = new /atom/movable/screen/pai/image_take()
|
||||
using.screen_loc = ui_pai_take_picture
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
|
||||
/obj/item/gps/Initialize()
|
||||
. = ..()
|
||||
add_gps_component()
|
||||
|
||||
/// Adds the GPS component to this item.
|
||||
/obj/item/gps/proc/add_gps_component()
|
||||
AddComponent(/datum/component/gps/item, gpstag)
|
||||
|
||||
/obj/item/gps/spaceruin
|
||||
@@ -45,6 +49,15 @@
|
||||
gpstag = "MINER"
|
||||
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life."
|
||||
|
||||
/*
|
||||
* GPS for pAIS, which only allows access if it's contained within the user.
|
||||
*/
|
||||
/obj/item/gps/pai
|
||||
gpstag = "PAI0"
|
||||
|
||||
/obj/item/gps/pai/add_gps_component()
|
||||
AddComponent(/datum/component/gps/item, gpstag, state = GLOB.inventory_state)
|
||||
|
||||
/obj/item/gps/visible_debug
|
||||
name = "visible GPS"
|
||||
gpstag = "ADMIN"
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
var/obj/machinery/newscaster //pAI Newscaster
|
||||
var/obj/item/healthanalyzer/hostscan //pAI healthanalyzer
|
||||
|
||||
/// Internal pAI GPS, enabled if pAI downloads GPS software, and then uses it.
|
||||
var/obj/item/gps/pai/internal_gps = null
|
||||
|
||||
var/encryptmod = FALSE
|
||||
var/holoform = FALSE
|
||||
var/canholo = TRUE
|
||||
@@ -103,6 +106,8 @@
|
||||
signaler = null
|
||||
if(A == hostscan)
|
||||
hostscan = null
|
||||
if(A == internal_gps)
|
||||
internal_gps = null
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/pai/Destroy()
|
||||
@@ -111,6 +116,7 @@
|
||||
QDEL_NULL(newscaster)
|
||||
QDEL_NULL(signaler)
|
||||
QDEL_NULL(hostscan)
|
||||
QDEL_NULL(internal_gps)
|
||||
if(!QDELETED(card) && loc != card)
|
||||
card.forceMove(drop_location())
|
||||
card.pai = null //these are otherwise handled by paicard/handle_atom_del()
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"security HUD" = 20,
|
||||
"loudness booster" = 20,
|
||||
"newscaster" = 20,
|
||||
"internal gps" = 35,
|
||||
"door jack" = 25,
|
||||
"encryption keys" = 25,
|
||||
"universal translator" = 35
|
||||
@@ -283,6 +284,11 @@
|
||||
if(subscreen == 1) // Open Instrument
|
||||
internal_instrument.interact(src)
|
||||
|
||||
if("internalgps")
|
||||
if(!internal_gps)
|
||||
internal_gps = new(src)
|
||||
internal_gps.attack_self(src)
|
||||
|
||||
paiInterface()
|
||||
|
||||
// MENUS
|
||||
@@ -315,6 +321,9 @@
|
||||
dat += "<a href='byond://?src=[REF(src)];software=signaller;sub=0'>Remote Signaller</a> <br>"
|
||||
if(s == "loudness booster")
|
||||
dat += "<a href='byond://?src=[REF(src)];software=loudness;sub=0'>Loudness Booster</a> <br>"
|
||||
if(s == "internal gps")
|
||||
dat += "<a href='byond://?src=[REF(src)];software=internalgps;sub=0'>Internal GPS</a> <br>"
|
||||
|
||||
dat += "<br>"
|
||||
|
||||
// Advanced
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user