Fixes debug component printer (#92025)

## About The Pull Request
Seems this went under my radar. The backend was sending the wrong data.
I also tuned up the UI a little bit to signify that it's the debug
component printer.

It will print anything listed, free.

<details>
<summary>Screenshots</summary>

![Screenshot 2025-07-07
162543](https://github.com/user-attachments/assets/de9b490d-66ee-4c67-8453-485769fd2ebd)

![Screenshot 2025-07-07
162550](https://github.com/user-attachments/assets/2a5a7cfd-3cd3-42af-aeea-3d83bb51ce9c)

</details>

## Why It's Good For The Game
Fixes #71511
## Changelog
🆑
admin: The admin spawned component printer UI functions again
/🆑
This commit is contained in:
Jeremiah
2025-07-08 17:16:54 -07:00
committed by Roxy
parent 3ef6f22f39
commit 24a515ab85
2 changed files with 45 additions and 35 deletions
+12 -8
View File
@@ -260,10 +260,11 @@
var/datum/design/design = SSresearch.techweb_design_by_id(id)
if((design.build_type & COMPONENT_PRINTER) && design.build_path)
all_circuit_designs[design.build_path] = list(
"id" = design.build_path,
"categories" = design.category,
"cost" = design.materials,
"desc" = design.desc,
"name" = design.name,
"description" = design.desc,
"materials" = design.materials,
"categories" = design.category
)
for(var/obj/item/circuit_component/component as anything in subtypesof(/obj/item/circuit_component))
@@ -272,10 +273,11 @@
categories = list("Admin")
if(!(component in all_circuit_designs))
all_circuit_designs[component] = list(
"name" = initial(component.display_name),
"description" = initial(component.desc),
"materials" = list(),
"id" = component.type,
"categories" = categories,
"cost" = list(),
"desc" = initial(component.desc),
"name" = initial(component.display_name),
)
/obj/machinery/debug_component_printer/ui_interact(mob/user, datum/tgui/ui)
@@ -302,7 +304,7 @@
return TRUE
var/list/design = all_circuit_designs[build_path]
if(!design)
if (!design)
return TRUE
balloon_alert_to_viewers("printed [design["name"]]")
@@ -315,8 +317,10 @@
/obj/machinery/debug_component_printer/ui_static_data(mob/user)
var/list/data = list()
data["materials"] = list()
data["debug"] = TRUE
data["designs"] = all_circuit_designs
data["materials"] = list()
data["SHEET_MATERIAL_AMOUNT"] = SHEET_MATERIAL_AMOUNT
return data