Files
Bubberstation/code/modules/modular_computers/file_system/programs/crewmanifest.dm
John Willard ddd3f53943 PDA general maintenance (NTNet downloader rework) (#79741)
## About The Pull Request

I deleted the documentation file of ModPCs because it was barebones and
had no new information to give that autodoc couldn't. Just to make sure
this isn't a net-negative, I improved on much of the autodoc and
comments in general around ModPC code to help people understand easier
what's going on around it.
I also renamed vars that were too easily confused with other var names,
and reworked the ntnet downloader a little;
- it now has a search bar
- it now has more sections to scroll through, hopefully making it more
accurate and easy to find what you need.
- also organized the apps that were previously shoved in 'other'.
- i also upgraded it to a .tsx because why not

video demonstration


https://github.com/tgstation/tgstation/assets/53777086/cbba4c1c-b8a8-4ba4-8628-aea8389999fc

## Why It's Good For The Game

Adds in a lot of comments that were previously missing, clears up some
sources of confusion within ModPC code, and improves NTNet Downloader,
something I've procrastinated on doing for a very long time now.

## Changelog

🆑
qol: NTNet Downloader now has a search bar, and programs are now better
sorted.
/🆑
2023-11-19 19:00:18 -05:00

32 lines
1.2 KiB
Plaintext

/datum/computer_file/program/crew_manifest
filename = "plexagoncrew"
filedesc = "Plexagon Crew List"
downloader_category = PROGRAM_CATEGORY_SECURITY
program_open_overlay = "id"
extended_desc = "Program for viewing and printing the current crew manifest"
download_access = list(ACCESS_SECURITY, ACCESS_COMMAND)
requires_ntnet = TRUE
size = 4
tgui_id = "NtosCrewManifest"
program_icon = "clipboard-list"
detomatix_resistance = DETOMATIX_RESIST_MAJOR
/datum/computer_file/program/crew_manifest/ui_static_data(mob/user)
var/list/data = list()
data["manifest"] = GLOB.manifest.get_manifest()
return data
/datum/computer_file/program/crew_manifest/ui_act(action, params, datum/tgui/ui)
switch(action)
if("PRG_print")
if(computer) //This option should never be called if there is no printer
var/contents = {"<h4>Crew Manifest</h4>
<br>
[GLOB.manifest ? GLOB.manifest.get_html(0) : ""]
"}
if(!computer.print_text(contents, "crew manifest ([station_time_timestamp()])"))
to_chat(usr, span_notice("Printer is out of paper."))
return
else
computer.visible_message(span_notice("\The [computer] prints out a paper."))