[READY] [TGUI] Uplinks, PDAs and Power Consoles (Dont question it) (#14403)

* Uplinks

* Main menu + Status display control

* Signaler + Homescreen Fixes

* TGUI Power Monitors

* PDA Power Monitor

* PDA Medical Records

* PDA Security Records

* PDA Secbot Control (Pain)

* PDA Mule Control (I hate this system)

* PDA Supply Records

* PDA Janitor Locator

* PDA Notekeeper

* PDA Manifest

* PDA Atmos Scanner

* Steel pass 1

* PDA Messenger

* Removes browserPDA-era icons

* PDA Nanomob (Why do we still support this thing)

* Fixes random power monitor quirk

* More steel tweaks

* Even more steel tweaks

* TM Tweaks Round 1

* \ref --> UID()

* Styling
This commit is contained in:
AffectedArc07
2020-09-30 21:53:45 +01:00
committed by GitHub
parent 2a5352120d
commit f9dd2de5f1
92 changed files with 2817 additions and 1880 deletions

View File

@@ -6,19 +6,24 @@
/datum/data/pda/app/main_menu/update_ui(mob/user as mob, list/data)
title = pda.name
data["app"]["is_home"] = 1
data["app"]["is_home"] = TRUE
data["apps"] = pda.shortcut_cache
data["categories"] = pda.shortcut_cat_order
data["pai"] = !isnull(pda.pai) // pAI inserted?
var/list/notifying[0]
for(var/P in pda.notifying_programs)
notifying["\ref[P]"] = 1
var/list/notifying = list()
for(var/datum/data/pda/P in pda.notifying_programs)
notifying["[P.UID()]"] = TRUE
data["notifying"] = notifying
/datum/data/pda/app/main_menu/Topic(href, list/href_list)
switch(href_list["choice"])
/datum/data/pda/app/main_menu/tgui_act(action, list/params)
if(..())
return
. = TRUE
switch(action)
if("UpdateInfo")
pda.ownjob = pda.id.assignment
pda.ownrank = pda.id.rank
@@ -28,10 +33,10 @@
if(pda.pai.loc != pda)
pda.pai = null
else
switch(href_list["option"])
if("1") // Configure pAI device
switch(text2num(params["option"]))
if(1) // Configure pAI device
pda.pai.attack_self(usr)
if("2") // Eject pAI device
if(2) // Eject pAI device
var/turf/T = get_turf_or_move(pda.loc)
if(T)
pda.pai.loc = T
@@ -40,10 +45,9 @@
/datum/data/pda/app/notekeeper
name = "Notekeeper"
icon = "sticky-note-o"
template = "pda_notekeeper"
template = "pda_notes"
var/note = null
var/notehtml = ""
var/note
/datum/data/pda/app/notekeeper/start()
. = ..()
@@ -51,16 +55,22 @@
note = "Congratulations, your station has chosen the [pda.model_name]!"
/datum/data/pda/app/notekeeper/update_ui(mob/user as mob, list/data)
data["note"] = note // current pda notes
data["note"] = note // current pda notes
/datum/data/pda/app/notekeeper/Topic(href, list/href_list)
switch(href_list["choice"])
/datum/data/pda/app/notekeeper/tgui_act(action, params)
if(..())
return
. = TRUE
switch(action)
if("Edit")
var/n = input("Please enter message", name, notehtml) as message
var/n = input("Please enter message", name, note) as message
if(pda.loc == usr)
// TGUI will auto-reject supplied HTML
// However, the admin var-edit window will not
// SANITISATION IS IMPORTANT. DO NOT NEGLECT.
note = adminscrub(n)
notehtml = html_decode(note)
note = replacetext(note, "\n", "<br>")
else
pda.close(usr)
@@ -74,8 +84,6 @@
GLOB.data_core.get_manifest_json()
data["manifest"] = GLOB.PDA_Manifest
/datum/data/pda/app/manifest/Topic(href, list/href_list)
/datum/data/pda/app/atmos_scanner
name = "Atmospheric Scan"
icon = "fire"
@@ -84,6 +92,7 @@
update = PDA_APP_UPDATE_SLOW
/datum/data/pda/app/atmos_scanner/update_ui(mob/user as mob, list/data)
var/list/results = list()
var/turf/T = get_turf(user.loc)
if(!isnull(T))
var/datum/gas_mixture/environment = T.return_air()
@@ -97,15 +106,17 @@
var/co2_level = environment.carbon_dioxide/total_moles
var/plasma_level = environment.toxins/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level)
data["aircontents"] = list(
"pressure" = pressure,
"nitrogen" = n2_level*100,
"oxygen" = o2_level*100,
"carbon_dioxide" = co2_level*100,
"plasma" = plasma_level*100,
"other" = unknown_level,
"temp" = environment.temperature-T0C,
"reading" = 1
)
if(isnull(data["aircontents"]))
data["aircontents"] = list("reading" = 0)
results = list(
list("entry" = "Pressure", "units" = "kPa", "val" = "[round(pressure,0.1)]", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80),
list("entry" = "Temperature", "units" = "C", "val" = "[round(environment.temperature-T0C,0.1)]", "bad_high" = 35, "poor_high" = 25, "poor_low" = 15, "bad_low" = 5),
list("entry" = "Oxygen", "units" = "%", "val" = "[round(o2_level*100,0.1)]", "bad_high" = 140, "poor_high" = 135, "poor_low" = 19, "bad_low" = 17),
list("entry" = "Nitrogen", "units" = "%", "val" = "[round(n2_level*100,0.1)]", "bad_high" = 105, "poor_high" = 85, "poor_low" = 50, "bad_low" = 40),
list("entry" = "Carbon Dioxide", "units" = "%", "val" = "[round(co2_level*100,0.1)]", "bad_high" = 10, "poor_high" = 5, "poor_low" = 0, "bad_low" = 0),
list("entry" = "Plasma", "units" = "%", "val" = "[round(plasma_level*100,0.01)]", "bad_high" = 0.5, "poor_high" = 0, "poor_low" = 0, "bad_low" = 0),
list("entry" = "Other", "units" = "%", "val" = "[round(unknown_level, 0.01)]", "bad_high" = 1, "poor_high" = 0.5, "poor_low" = 0, "bad_low" = 0)
)
if(isnull(results))
results = list(list("entry" = "pressure", "units" = "%", "val" = "0", "bad_high" = 120, "poor_high" = 110, "poor_low" = 95, "bad_low" = 80))
data["aircontents"] = results