mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
TGUI for Techfabs II: The Great Recategorizing (AND ICONS) (AND MECHFABS) (AND AUTOLATHES) (#69990)
I recategorized EVERY /datum/design/ IN THE GAME to be more UX friendly and I HATE MYSELF FOR IT
I refactored techfab UI to WORK ANYWHERE for ANY MACHINE THAT USES /datum/design as a SET OF MODULAR COMPONENTS
I moved a lot of DESIGNS EXCLUSIVE TO THE AUTOLATHE to also work IN PROTOLATHES
I made MATERIAL ICONS animate between ICON STATES for STACKS
I PUT ICONS IN ALL OF YOUR FABRICATORS
I SOMEHOW DID ALL OF THIS WITHOUT LOSING ANY PERFORMANCE
ALSO SUPPORTS COMPONENT PRINTERS AND MODULE DUPLICATORS
Other garbage:
Fixed numerous spelling and consistency issues in designs
Removed Machine Design (<x>) and Computer Design (<x>) from all relevant designs
All designs are now in title case
Numerous designs that were formerly autolathe exclusives can now also be printed at a protolathe (but not all); this is mostly just service equipment like drinking glasses and plates and silverware
Circuits components can no longer be printed at a circuit imprinter (fixes
Integrated circuit components printed in the component printer/module printer cost twice as much than from an un upgraded circuit printer #67758)
Designs that are not sensible for a department to have are no longer accessible to that department (read: medbay printing turbine parts)
Why It's Good For The Game
Improved UX for techfabs, but also for mechfabs and autolathes, and oh look it's pretty!
also I spent like eight hours doing nothing but categorizing /datum/designs and I'll cry if some version of this doesn't get merged eventually
Changelog
cl
refactor: mechfabs, autolathes, component printers, and module duplicators now use techfab tgui components
refactor: every single design is now categorized and subcategorized
refactor: mechfabs and autolathes are now in typescript
qol: techfabs now have icons for what you're about to print
qol: techfab material icons are now animated
qol: techfab material icons now fade when no materials are available
qol: techfab searching no longer lags like hell
qol: techfab searching now searches all recipes instead of just the current category
qol: techfabs now have subcategorization (stock part users rejoice)
qol: techfabs now announce when new recipes are available
qol: numerous other techfab ui tweaks
balance: some designs that were formerly autolathe exclusive can now be printed at some departmental techfabs
This commit is contained in:
@@ -128,20 +128,27 @@
|
||||
|
||||
/obj/machinery/component_printer/ui_static_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
var/list/designs = list()
|
||||
|
||||
var/datum/asset/spritesheet/research_designs/spritesheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
var/size32x32 = "[spritesheet.name]32x32"
|
||||
|
||||
// for (var/datum/design/component/component_design_type as anything in subtypesof(/datum/design/component))
|
||||
for (var/researched_design_id in techweb.researched_designs)
|
||||
var/datum/design/design = SSresearch.techweb_design_by_id(researched_design_id)
|
||||
if (!(design.build_type & COMPONENT_PRINTER))
|
||||
continue
|
||||
|
||||
var/icon_size = spritesheet.icon_size_id(design.id)
|
||||
|
||||
designs[researched_design_id] = list(
|
||||
"name" = design.name,
|
||||
"description" = design.desc,
|
||||
"materials" = get_material_cost_data(design.materials),
|
||||
"desc" = design.desc,
|
||||
"cost" = get_material_cost_data(design.materials),
|
||||
"id" = researched_design_id,
|
||||
"categories" = design.category,
|
||||
"icon" = "[icon_size == size32x32 ? "" : "[icon_size] "][design.id]",
|
||||
"constructionTime" = -1
|
||||
)
|
||||
|
||||
data["designs"] = designs
|
||||
@@ -228,7 +235,8 @@
|
||||
|
||||
/obj/machinery/debug_component_printer/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/sheetmaterials)
|
||||
get_asset_datum(/datum/asset/spritesheet/sheetmaterials),
|
||||
get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
)
|
||||
|
||||
/obj/machinery/debug_component_printer/ui_act(action, list/params)
|
||||
@@ -296,7 +304,8 @@
|
||||
|
||||
/obj/machinery/module_duplicator/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/sheetmaterials)
|
||||
get_asset_datum(/datum/asset/spritesheet/sheetmaterials),
|
||||
get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
)
|
||||
|
||||
/obj/machinery/module_duplicator/ui_act(action, list/params)
|
||||
@@ -411,6 +420,8 @@
|
||||
balloon_alert(user, "module has been saved.")
|
||||
playsound(src, 'sound/machines/ping.ogg', 50)
|
||||
|
||||
update_static_data_for_all_viewers()
|
||||
|
||||
/obj/machinery/module_duplicator/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["materials"] = materials.mat_container.ui_data()
|
||||
@@ -422,12 +433,15 @@
|
||||
var/list/designs = list()
|
||||
|
||||
var/index = 1
|
||||
|
||||
for (var/list/design as anything in scanned_designs)
|
||||
designs["[index]"] = list(
|
||||
"name" = design["name"],
|
||||
"description" = design["desc"],
|
||||
"materials" = get_material_cost_data(design["materials"]),
|
||||
"categories" = list("Circuitry"),
|
||||
"desc" = design["desc"],
|
||||
"cost" = get_material_cost_data(design["materials"]),
|
||||
"id" = "[index]",
|
||||
"icon" = "integrated_circuit",
|
||||
"categories" = list("/Saved Circuits"),
|
||||
)
|
||||
index++
|
||||
|
||||
|
||||
Reference in New Issue
Block a user