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-03 17:09:50 -05: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
+66 -7
View File
@@ -15,31 +15,67 @@
"basic_micro_laser",
"basic_scanning",
"bepis",
"blast",
"bounced_radio",
"bowl",
"bucket",
"c38_rubber",
"c-reader",
"circuit_imprinter",
"c38_rubber",
"camera_assembly",
"camera_film",
"camera",
"capbox",
"chisel",
"circuit_imprinter_offstation",
"circuit_imprinter",
"circuit",
"circuitgreen",
"circuitred",
"coffee_cartridge",
"coffeemaker",
"coffeepot",
"coffee_cartridge",
"condenser",
"conveyor_belt",
"conveyor_switch",
"custom_vendor_refill",
"design_disk",
"destructive_analyzer",
"destructive_scanner",
"desttagger",
"doppler_array",
"drinking_glass",
"earmuffs",
"electropack",
"experi_scanner",
"experimentor",
"extinguisher",
"fax",
"fishing_rod",
"flashlight",
"fluid_ducts",
"foam_dart",
"fork",
"gas_filter",
"handcuffs_s",
"handlabel",
"health_sensor",
"holodisk",
"igniter",
"infrared_emitter",
"intercom_frame",
"kitchen_knife",
"laptop",
"light_bulb",
"light_tube",
"mechfab",
"micro_mani",
"miniature_power_cell",
"newscaster_frame",
"oven_tray",
"packagewrap",
"pet_carrier",
"plasmaglass",
"plasmaman_gas_filter",
"plasmareinforcedglass",
"plasteel",
"plastic_fork",
@@ -47,28 +83,49 @@
"plastic_spoon",
"plastitanium",
"plastitaniumglass",
"plasmaman_gas_filter",
"plate",
"prox_sensor",
"radio_headset",
"rdconsole",
"rdserver",
"rdservercontrol",
"restaurant_portal",
"receiver",
"recorder",
"rglass",
"roll",
"salestagger",
"sec_38",
"sec_Islug",
"sec_beanbag_slug",
"sec_dart",
"sec_Islug",
"sec_rshot",
"servingtray",
"shaker",
"shot_glass",
"signaler",
"slime_scanner",
"solar_panel",
"solar_tracker",
"space_heater",
"spoon",
"status_display_frame",
"sticky_tape",
"tablet",
"tape",
"tech_disk",
"timer",
"titaniumglass",
"toner",
"toner_large",
"toner",
"toy_armblade",
"toy_balloon",
"toygun",
"trapdoor_electronics",
"turbine_part_compressor",
"turbine_part_rotor",
"turbine_part_stator",
"turret_control",
"voice_analyzer",
"watering_can",
)
@@ -216,6 +273,7 @@
"dropper",
"hemostat",
"large_beaker",
"mmi_m",
"operating",
"petri_dish",
"pillbottle",
@@ -551,6 +609,7 @@
"forcefield_projector",
"magboots",
"rcd_loaded",
"rcd_ammo",
"rpd_loaded",
"sheetifier",
"weldingmask",