mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Merge branch 'master' of https://github.com/tgstation/tgstation into pupstream-2025-09-07
# Conflicts: # README.md # code/__DEFINES/admin.dm # code/__DEFINES/melee.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/economy.dm # code/datums/components/crafting/crafting.dm # code/datums/elements/crusher_loot.dm # code/modules/antagonists/pirate/pirate_shuttle_equipment.dm # code/modules/clothing/suits/_suits.dm # code/modules/escape_menu/leave_body.dm # code/modules/jobs/job_types/_job.dm # code/modules/mining/equipment/mineral_scanner.dm # code/modules/mob/living/living.dm # code/modules/plumbing/plumbers/pill_press.dm # tgui/packages/tgui/interfaces/Vending.tsx
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user