mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
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>   </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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user