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:
scriptis
2022-10-04 11:09:50 +13:00
committed by GitHub
parent a0e03c56f8
commit 14c96d05b8
49 changed files with 6243 additions and 3435 deletions
+6 -6
View File
@@ -41,14 +41,14 @@
var/list/available_experiments = list()
/// Completed experiments
var/list/completed_experiments = list()
/**
* Assoc list of relationships with various partners
* scientific_cooperation[partner_typepath] = relationship
*/
var/list/scientific_cooperation
/**
* Assoc list of papers already published by the crew.
* Assoc list of papers already published by the crew.
* published_papers[experiment_typepath][tier] = paper
* Filled with nulls on init, populated only on publication.
*/
@@ -456,7 +456,7 @@
/datum/techweb/specialized/autounlocking
var/design_autounlock_buildtypes = NONE
var/design_autounlock_categories = list("initial") //if a design has a buildtype that matches the abovea and either has a category in this or this is null, unlock it.
var/design_autounlock_categories = list(RND_CATEGORY_INITIAL) //if a design has a buildtype that matches the abovea and either has a category in this or this is null, unlock it.
var/node_autounlock_ids = list() //autounlock nodes of this type.
/datum/techweb/specialized/autounlocking/New()
@@ -512,7 +512,7 @@
// If we haven't published a paper in the same topic ...
if(locate(paper_to_add.experiment_path) in published_papers[paper_to_add.experiment_path])
return TRUE
return TRUE
// Quickly add and complete it.
// PS: It's also possible to use add_experiment() together with a list/available_experiments check
// to determine if we need to run all this, but this pretty much does the same while only needing one evaluation.
@@ -527,6 +527,6 @@
complete_experiment(experiment)
if(length(GLOB.experiment_handlers))
var/datum/component/experiment_handler/handler = GLOB.experiment_handlers[1]
handler.announce_message_to_all("The [experiment.name] has been completed!")
handler.announce_message_to_all("The [experiment.name] has been completed!")
return TRUE