Misc PDA code improvements (#70555)

* How to conflict with PRs: A guide

* Removes unnecessary support for the now-removed job disks from Tablet's TGUI menu, and tablet's ui_act.
* Adds autodoc comments to computer files
* Removes the unused 'unsendable' var on computer files
* Generally improves code on tablets, now process isn't looping through every idle thread twice!
* Moves the check for program in idle_threads above checking if supported by hardware, because it's already running, so there's no need to check.

* eh

* revert a scipaper change
This commit is contained in:
John Willard
2022-10-19 22:16:57 -04:00
committed by GitHub
parent c70d47787f
commit 9bf96c7763
10 changed files with 58 additions and 129 deletions

View File

@@ -64,14 +64,10 @@
data["device_theme"] = device_theme
data["login"] = list()
data["disk"] = null
var/obj/item/computer_hardware/card_slot/cardholder = all_components[MC_CARD]
data["cardholder"] = FALSE
data["cardholder"] = !!cardholder
if(cardholder)
data["cardholder"] = TRUE
var/stored_name = saved_identification
var/stored_title = saved_job
if(!stored_name)
@@ -105,7 +101,13 @@
if(P in idle_threads)
running = TRUE
data["programs"] += list(list("name" = P.filename, "desc" = P.filedesc, "running" = running, "icon" = P.program_icon, "alert" = P.alert_pending))
data["programs"] += list(list(
"name" = P.filename,
"desc" = P.filedesc,
"running" = running,
"icon" = P.program_icon,
"alert" = P.alert_pending,
))
data["has_light"] = has_light
data["light_on"] = light_on
@@ -155,10 +157,6 @@
to_chat(user, span_notice("Program [P.filename].[P.filetype] with PID [rand(100,999)] has been killed."))
if("PC_runprogram")
// only function of the last implementation (?)
if(params["is_disk"])
return
open_program(usr, hard_drive.find_file_by_name(params["name"]))
if("PC_toggle_light")