The art gallery app can now be downloaded on PDAs and laptops (no printing) (#92615)

This commit is contained in:
Ghom
2025-08-27 06:53:55 +02:00
committed by GitHub
parent 571e0f53db
commit c4f99f9370
3 changed files with 14 additions and 9 deletions
@@ -4,19 +4,17 @@
/**
* ## portrait printer!
* ## the art gallery viewer/printer!
*
* Program that lets the curator browse all of the portraits in the database
* They are free to print them out as they please.
* Program that lets the curator (or anyone really) browse all of the portraits in the database
* Stationary consoles can also print them out as they please as long as they've enough paper
*/
/datum/computer_file/program/portrait_printer
filename = "PortraitPrinter"
filedesc = "Marlowe Treeby's Art Galaxy"
downloader_category = PROGRAM_CATEGORY_EQUIPMENT
program_open_overlay = "dummy"
extended_desc = "This program connects to a Spinward Sector community art site for viewing and printing art."
download_access = list(ACCESS_LIBRARY)
can_run_on_flags = PROGRAM_CONSOLE
extended_desc = "This program connects to a Spinward Sector community art site for viewing and printing art, the latter only available on stationary consoles."
program_flags = PROGRAM_ON_NTNET_STORE | PROGRAM_REQUIRES_NTNET
size = 9
tgui_id = "NtosPortraitPrinter"
@@ -31,6 +29,10 @@
/// Stores the result of the search, for later access.
var/list/matching_paintings
/datum/computer_file/program/portrait_printer/ui_static_data(mob/user)
. = ..()
.["is_console"] = computer.hardware_flag & PROGRAM_CONSOLE
/datum/computer_file/program/portrait_printer/ui_data(mob/user)
var/list/data = list()
data["paintings"] = matching_paintings || SSpersistent_paintings.painting_ui_data()
@@ -65,6 +67,8 @@
matching_paintings = SSpersistent_paintings.painting_ui_data(filter = search_mode, search_text = search_string)
/datum/computer_file/program/portrait_printer/proc/print_painting(selected_painting)
if(!(computer.hardware_flag & PROGRAM_CONSOLE))
return
if(computer.stored_paper < CANVAS_PAPER_COST)
to_chat(usr, span_notice("Printing error: Your printer needs at least [CANVAS_PAPER_COST] paper to print a canvas."))
return