diff --git a/code/modules/modular_computers/computers/item/role_tablet_presets.dm b/code/modules/modular_computers/computers/item/role_tablet_presets.dm index c70f18db874..43341cfbc16 100644 --- a/code/modules/modular_computers/computers/item/role_tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/role_tablet_presets.dm @@ -394,6 +394,7 @@ starting_programs = list( /datum/computer_file/program/emojipedia, /datum/computer_file/program/newscaster, + /datum/computer_file/program/portrait_printer, ) /obj/item/modular_computer/pda/curator/Initialize(mapload) diff --git a/code/modules/modular_computers/file_system/programs/portrait_printer.dm b/code/modules/modular_computers/file_system/programs/portrait_printer.dm index 5285bbc09bd..224e83bb8fd 100644 --- a/code/modules/modular_computers/file_system/programs/portrait_printer.dm +++ b/code/modules/modular_computers/file_system/programs/portrait_printer.dm @@ -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 diff --git a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx index 4e817f3bb53..101d77113e2 100644 --- a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx +++ b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx @@ -15,7 +15,7 @@ import { NtosWindow } from '../layouts'; export const NtosPortraitPrinter = (props) => { const { act, data } = useBackend(); const [listIndex, setListIndex] = useState(0); - const { paintings, search_string, search_mode } = data; + const { paintings, search_string, search_mode, is_console } = data; const got_paintings = !!paintings.length; const current_portrait_title = got_paintings && paintings[listIndex].title; const current_portrait_author = @@ -113,8 +113,8 @@ export const NtosPortraitPrinter = (props) => {