mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 04:48:18 +01:00
Modular PDAs: The End of an Era (#10319)
PDAs are dead, long live PDAs. All trace of old PDAs has been scoured from the codebase, and in its place are modular computer PDAs that are feature-equivalent. Essentially every PDA function except the Syndicate detonation feature and Notepad has been ported over, and battery life for handheld computers has been boosted alongside the addition of charging cables to make things easier.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
if(computer.personal_ai)
|
||||
to_chat(computer.personal_ai.pai, SPAN_WARNING("pAI Access Lock systems engaged."))
|
||||
computer.pAI_lock = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/pai_access_lock/service_deactivate()
|
||||
. = ..()
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/datum/computer_file/program/pai_atmos
|
||||
filename = "pai_atmos"
|
||||
filedesc = "Atmosphere Sensor"
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program is for viewing local atmospheric data."
|
||||
size = 2
|
||||
|
||||
available_on_ntnet = TRUE
|
||||
usage_flags = PROGRAM_SILICON_PAI
|
||||
|
||||
/datum/computer_file/program/pai_atmos/ui_interact(mob/user)
|
||||
var/datum/vueui/ui = SSvueui.get_open_ui(user, src)
|
||||
if (!ui)
|
||||
ui = new /datum/vueui/modularcomputer(user, src, "mcomputer-pai-atmosphere", 400, 200, "pAI Atmosphere Sensor")
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/pai_atmos/vueui_transfer(oldobj)
|
||||
SSvueui.transfer_uis(oldobj, src, "mcomputer-pai-atmosphere", 400, 200, "pAI Atmosphere Sensor")
|
||||
return TRUE
|
||||
|
||||
// Gaters data for ui
|
||||
/datum/computer_file/program/pai_atmos/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui)
|
||||
. = ..()
|
||||
data = . || data || list()
|
||||
// Gather data for computer header
|
||||
var/headerdata = get_header_data(data["_PC"])
|
||||
if(headerdata)
|
||||
data["_PC"] = headerdata
|
||||
. = data
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
|
||||
var/turf/T = get_turf_or_move(host.loc)
|
||||
|
||||
|
||||
if(T)
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
VUEUI_SET_CHECK(data["read"], TRUE, ., data)
|
||||
VUEUI_SET_CHECK(data["press"], env.return_pressure(), ., data)
|
||||
VUEUI_SET_CHECK(data["temp"], env.temperature, ., data)
|
||||
VUEUI_SET_CHECK(data["tempC"], env.temperature-T0C, ., data)
|
||||
VUEUI_SET_CHECK_IFNOTSET(data["gas"], list("_" = "_"), ., data)
|
||||
for(var/g in gas_data.gases)
|
||||
if(!(g in env.gas))
|
||||
VUEUI_SET_CHECK(data["gas"][g], null, ., data)
|
||||
else
|
||||
VUEUI_SET_CHECK(data["gas"][g], env.gas[g], ., data)
|
||||
else
|
||||
VUEUI_SET_CHECK(data["read"], FALSE, ., data)
|
||||
VUEUI_SET_CHECK(data["press"], 0, ., data)
|
||||
VUEUI_SET_CHECK(data["temp"], T0C, ., data)
|
||||
VUEUI_SET_CHECK(data["tempC"], 0, ., data)
|
||||
VUEUI_SET_CHECK_IFNOTSET(data["gas"], list("_" = "_"), ., data)
|
||||
for(var/g in gas_data.gases)
|
||||
VUEUI_SET_CHECK(data["gas"][g], null, ., data)
|
||||
@@ -11,14 +11,15 @@
|
||||
. = ..()
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
host.toggle_flashlight()
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/pai_flashlight/service_deactivate()
|
||||
. = ..()
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
/datum/computer_file/program/pai_sechud/service_activate()
|
||||
. = ..()
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
return FALSE
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
return FALSE
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
host.secHUD = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/pai_sechud/service_deactivate()
|
||||
. = ..()
|
||||
@@ -39,12 +40,13 @@
|
||||
/datum/computer_file/program/pai_medhud/service_activate()
|
||||
. = ..()
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
return FALSE
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
return FALSE
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
host.medHUD = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/pai_medhud/service_deactivate()
|
||||
. = ..()
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/datum/computer_file/program/pai_signaler
|
||||
filename = "signaler"
|
||||
filedesc = "Remote Signaller"
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program can be used to send wide-range signals of various frequencies."
|
||||
size = 3
|
||||
available_on_ntnet = 1
|
||||
usage_flags = PROGRAM_SILICON_PAI
|
||||
|
||||
/datum/computer_file/program/pai_signaler/ui_interact(mob/user)
|
||||
var/datum/vueui/ui = SSvueui.get_open_ui(user, src)
|
||||
if (!ui)
|
||||
ui = new /datum/vueui/modularcomputer(user, src, "mcomputer-pai-signaler", 400, 150, "pAI Signaller")
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/pai_signaler/vueui_transfer(oldobj)
|
||||
SSvueui.transfer_uis(oldobj, src, "mcomputer-pai-signaler", 400, 150, "pAI Signaller")
|
||||
return TRUE
|
||||
|
||||
// Gaters data for ui
|
||||
/datum/computer_file/program/pai_signaler/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui)
|
||||
. = ..()
|
||||
data = . || data || list()
|
||||
// Gather data for computer header
|
||||
var/headerdata = get_header_data(data["_PC"])
|
||||
if(headerdata)
|
||||
data["_PC"] = headerdata
|
||||
. = data
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
|
||||
VUEUI_SET_CHECK(data["code"], host.sradio.code, ., data)
|
||||
VUEUI_SET_CHECK(data["frequency"], format_frequency(host.sradio.frequency), ., data)
|
||||
|
||||
|
||||
/datum/computer_file/program/pai_signaler/Topic(href, href_list)
|
||||
. = ..()
|
||||
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
|
||||
if(href_list["send"])
|
||||
host.sradio.send_signal("ACTIVATE")
|
||||
for(var/mob/O in hearers(1, host.loc))
|
||||
O.show_message(text("[icon2html(host, viewers(get_turf(src)))] *beep* *beep*"), 3, "*beep* *beep*", 2)
|
||||
return 1
|
||||
|
||||
else if(href_list["freq"])
|
||||
var/new_frequency = (host.sradio.frequency + href_list["freq"])
|
||||
if(new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ)
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
host.sradio.set_frequency(new_frequency)
|
||||
return 1
|
||||
|
||||
else if(href_list["code"])
|
||||
host.sradio.code += href_list["code"]
|
||||
host.sradio.code = round(host.sradio.code)
|
||||
host.sradio.code = min(100, host.sradio.code)
|
||||
host.sradio.code = max(1, host.sradio.code)
|
||||
return 1
|
||||
@@ -10,10 +10,10 @@
|
||||
/datum/computer_file/program/pai_translator/service_activate()
|
||||
. = ..()
|
||||
if(!istype(computer, /obj/item/modular_computer/silicon))
|
||||
return
|
||||
return FALSE
|
||||
var/obj/item/modular_computer/silicon/true_computer = computer
|
||||
if(!istype(true_computer.computer_host, /mob/living/silicon/pai))
|
||||
return
|
||||
return FALSE
|
||||
var/mob/living/silicon/pai/host = true_computer.computer_host
|
||||
|
||||
if(!host.translator_on)
|
||||
@@ -22,6 +22,7 @@
|
||||
host.add_language(LANGUAGE_SKRELLIAN)
|
||||
host.add_language(LANGUAGE_ROOTSONG)
|
||||
host.translator_on = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/pai_translator/service_deactivate()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user