Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

TGUI for Techfabs II: The Great Recategorizing (AND ICONS) (AND MECHFABS) (AND AUTOLATHES) #69990

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

scriptis
Copy link
Contributor

@scriptis scriptis commented Sep 18, 2022

About The Pull Request

HEY KID YOU WANT SOME ICONS? HOW ABOUT SOME CATEGORIES? IVE GOT ICONS AND NEW CATEGORIES

2022-09-18.03-52-06.mp4

I ALSO HAVE ICONS IN MECHFABS AND NEW CATEGORIES

2022-09-18.03-55-28.mp4

DO YOU OR A LOVED ONE SUFFER FROM AUTOLATHE CATEGORIES NOT EVEN LISTING EVERY ITEM YOU CAN PRINT IN AN AUTOLATHE? WELL DON'T WORRY I DID THAT TOO

2022-09-18.03-57-36.mp4

SERIOUS TALK

  • 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

馃啈
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

/馃啈

@tgstation-server tgstation-server added Balance Changes to functionality that modifies how effective certain methods are at powergaming Fix Rewrites a bug so it appears in different circumstances labels Sep 18, 2022
@calliophis-maculiceps
Copy link

calliophis-maculiceps commented Sep 18, 2022

is there any way you can make their background colour go with departments, like how the R&D console has a purple background?

@scriptis
Copy link
Contributor Author

scriptis commented Sep 18, 2022

is there any way you can make their background colour go with departments, like how the R&D console has a purple background?

The R&D console doesn't have a purple background, and there's a lot of refactoring that'd have to happen to make this work. If we had CSS variables it'd be easy, but we probably don't for like 50% of users.

@scriptis scriptis marked this pull request as ready for review Sep 19, 2022
@Colovorat
Copy link
Contributor

Colovorat commented Sep 19, 2022

holy based

@zxaber
Copy link
Contributor

zxaber commented Sep 19, 2022

The exofab feels kinda, I dunno, cluttered? I think some row bars between items in a section would help.

Also, the buttons for print and add to queue could use some color to let them stand out a bit.

@Agux909
Copy link

Agux909 commented Sep 20, 2022

Btw positronic brains are missing from the interface, they can't be printed from the lathe after tech's unlocked.

@scriptis
Copy link
Contributor Author

scriptis commented Sep 20, 2022

Btw positronic brains are missing from the interface, they can't be printed from the lathe after tech's unlocked.

I moved them to be exclusive to the mechfab

@jaydeegonz
Copy link

jaydeegonz commented Sep 20, 2022

I moved them to be exclusive to the mechfab

Did you also do the same for MMIs? I needed to print one from the medbay lathe and they weren't there.
It would make sense that only the mechfab would have positronics, but I would argue MMIs have their uses in medbay, too.

@scriptis
Copy link
Contributor Author

scriptis commented Sep 20, 2022

I moved them to be exclusive to the mechfab

Did you also do the same for MMIs? I needed to print one from the medbay lathe and they weren't there. It would make sense that only the mechfab would have positronics, but I would argue MMIs have their uses in medbay, too.

I did, but this is a good point. I'll put MMIs back in the medbay lathe; but for positronic brains, the only reasonable place for them to be, in my opinion, is a mechfab--they only exist to be put into borgs or exosuits.

@jaydeegonz
Copy link

jaydeegonz commented Sep 20, 2022

Yeah I agree.

@github-actions github-actions bot added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 23, 2022
@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 23, 2022
import { Material } from './Fabrication/Types';

type AutolatheDesign = Design & {
buildable: boolean;
Copy link
Member

@stylemistake stylemistake Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Byond is unable to send booleans so technically this type is wrong, you can use a BooleanLike alias or number.

@@ -43,15 +44,15 @@ const LABEL_FORMAT = (value: number) => formatSiUnit(value, 0);
* the ore silo. Has pop-out docks for each material type for ejecting up to
* fifty sheets.
*/
export const MineralAccessBar = (props: MineralAccessBarProps, context) => {
export const MaterialAccessBar = (props: MaterialAccessBarProps, context) => {
Copy link
Member

@stylemistake stylemistake Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the file renamed to match? Can't tell from the phone UI.

props: MaterialCostSequenceProps,
context
) => {
let { design, amount, costMap, available, align, justify } = props;
Copy link
Member

@stylemistake stylemistake Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use const here, extract costMap into its own let.

@@ -26,6 +27,9 @@ export type SearchBarProps = {
export const SearchBar = (props: SearchBarProps, context) => {
const { searchText, onSearchTextChanged, hint } = props;

// Only actually update the search query every 200 milliseconds at most.
const db = debounce(onSearchTextChanged, 200);
Copy link
Member

@stylemistake stylemistake Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that even works, you create a new debounced version of this function on every render.

@use '../functions.scss' as *;
@use '../components/Button.scss' as button;
@use '../components/Tabs.scss' as tabs;
@use 'sass:math';
Copy link
Member

@stylemistake stylemistake Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put global imports at the top.

Copy link
Member

@stylemistake stylemistake left a comment

Very big PR, nitpicked a little, but looks good in general.

@github-actions github-actions bot added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Balance Changes to functionality that modifies how effective certain methods are at powergaming Fix Rewrites a bug so it appears in different circumstances Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts Quality of Life Increasing esword damage is not a quality of life for traitors Refactor Makes the code harder to read UI We make the game less playable, but with round edges
Projects
None yet