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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General maintenance for Lathes #81244

Merged
merged 19 commits into from
Feb 8, 2024
Merged

Conversation

SyncIt21
Copy link
Contributor

@SyncIt21 SyncIt21 commented Feb 2, 2024

About The Pull Request

  1. Qol Stuff

    • Screentips & examines for screwdriver, crowbar acts, multiool & wirecutter Also for Alt click
    • Techfabs can now also use the Mouse drag functionality to set drop target for items
    • Lathe printing animation now plays on loop instead of just flicking once till printing is finished for more visual feedback
  2. Code Improvements

    • Merged start_making() with do_make_item(). That proc was like only 3 lines long and used only in 1 place so let's just move that code to ui_act()
    • Merged user_print_item_id() with ui_act(). Again was used only in 1 place so let's just move that code in to save some proc overhead
    • Sets processing_flags for autolathe to NONE cause we don't use process()
    • Autodocs vars such as hacked , shocked etc & procs
    • maxmult is now computed client side saving backend bandwidth, construction_time is removed from lathes which did not use it
    • Removed all usages of lathe taxes and their related vars, removed engineering lathe no tax from ice moon, replaced with normal engineering lathe
  3. Fixes

    • Lathe sheet insertion animations are now linked & work again for all material types inserted via remote silo/local storage, silver/titanium/plastic all play the same animation(that is protolathe_shiny overlay). Other materials have their own respective overlays
    • Fixes Lathe's just reload their whole interface every second time I print an item #81243. Calling update_static_data_for_all_viewers() is too expensive for the UI. We should instead use SStgui.update_uis(src) which will report the busy status to the UI more immediatly
    • Fixes Lathes not printing multiple items correctly #81236. Some problems with the params passed to the timer callback. It should now print the correct number of requested items
    • Fixes Autolathe can't print items with custom materials #81192. design.materials would runtime for custom material items as they were list of texts not materials. We have to pass our manually parsed list of materials for an specific item to ensure they are set & used correctly. Same fixes apply for techfabs as well

Changelog

🆑
qol: adds screentips & examines for screwdriver & crowbar acts & alt click.
qol: techfabs can now use the mouse drop functionality to set drop target.
qol: lathe printing animation plays on loop while printing rather than flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report bugs on github
/:cl:

@tgstation-server tgstation-server added Fix Rewrites a bug so it appears in different circumstances Code Improvement Code is now easier to copy paste. Quality of Life Increasing esword damage is not a quality of life for traitors labels Feb 2, 2024
code/game/machinery/autolathe.dm Show resolved Hide resolved
code/game/machinery/autolathe.dm Outdated Show resolved Hide resolved
code/game/machinery/autolathe.dm Outdated Show resolved Hide resolved
code/game/machinery/autolathe.dm Outdated Show resolved Hide resolved
SyncIt21 and others added 3 commits February 3, 2024 00:43
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
@TJatPBnJ
Copy link
Contributor

TJatPBnJ commented Feb 2, 2024

This PR does not completely fix #81236 or #81243, as protolathes, circuit imprinters, and techfabs are unchanged.

@SyncIt21
Copy link
Contributor Author

SyncIt21 commented Feb 3, 2024

This PR does not completely fix #81236 or #81243, as protolathes, circuit imprinters, and techfabs are unchanged.

I see the problem is more extensive than I thought. Will draft and fix them

@SyncIt21 SyncIt21 marked this pull request as draft February 3, 2024 03:11
@SyncIt21 SyncIt21 changed the title General maintenance for Autolathe General maintenance for Lathes Feb 3, 2024
@tgstation-server tgstation-server added UI We make the game less playable, but with round edges Map Edit Thank you for your tile-placing service. It's always appreciated. labels Feb 3, 2024
@SyncIt21
Copy link
Contributor Author

SyncIt21 commented Feb 3, 2024

This PR does not completely fix #81236 or #81243, as protolathes, circuit imprinters, and techfabs are unchanged.

I see the problem is more extensive than I thought. Will draft and fix them

All issues addressed for techfabs & autolathe. Would be nice if i got the refactor label as this PR became larger than initially intended

@SyncIt21 SyncIt21 marked this pull request as ready for review February 3, 2024 18:53
@Iajret
Copy link
Contributor

Iajret commented Feb 7, 2024

Cant test this on TG codebase at the moment, but it seems, department stripes does not appear on protolathes. They all are plain gray.

@Iajret
Copy link
Contributor

Iajret commented Feb 7, 2024

Also, protolathes seem to eat all available power from APCs and doesn't even update their status afterward so you are left with something like this
image

@SyncIt21
Copy link
Contributor Author

SyncIt21 commented Feb 7, 2024

Cant test this on TG codebase at the moment, but it seems, department stripes does not appear on protolathes. They all are plain gray.

Thanks i'm looking into it

Also, protolathes seem to eat all available power from APCs and doesn't even update their status afterward so you are left with something like this

Power changes for all lathes were made in #80839 and to better understand the issue refer #81167. It's not a bug apparently

@SyncIt21
Copy link
Contributor Author

SyncIt21 commented Feb 7, 2024

Stripes appear again

Copy link
Member

@Ghommie Ghommie left a comment

Choose a reason for hiding this comment

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

So called nits.

code/game/machinery/autolathe.dm Outdated Show resolved Hide resolved
code/modules/research/destructive_analyzer.dm Outdated Show resolved Hide resolved
code/modules/research/machinery/_production.dm Outdated Show resolved Hide resolved
code/modules/research/machinery/_production.dm Outdated Show resolved Hide resolved
code/modules/research/rdmachines.dm Outdated Show resolved Hide resolved
SyncIt21 and others added 2 commits February 8, 2024 09:01
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
@SyncIt21
Copy link
Contributor Author

SyncIt21 commented Feb 8, 2024

@Ghommie would be nice if I got the refactor label please?

@Ghommie Ghommie added the Refactor Makes the code harder to read label Feb 8, 2024
@Ghommie Ghommie merged commit e4b23f2 into tgstation:master Feb 8, 2024
20 checks passed
comfyorange added a commit that referenced this pull request Feb 8, 2024
github-actions bot added a commit that referenced this pull request Feb 8, 2024
@SyncIt21 SyncIt21 deleted the AutoMaintain branch February 8, 2024 12:50
Jolly-66 added a commit to TaleStation/TaleStation that referenced this pull request Feb 9, 2024
Original PR: tgstation/tgstation#81244
-----
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes #81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes #81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes #81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
:cl:
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/:cl:

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
larentoun pushed a commit to larentoun/tgstation that referenced this pull request Mar 1, 2024
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes tgstation#81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes tgstation#81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes tgstation#81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
:cl:
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/:cl:

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
larentoun pushed a commit to larentoun/tgstation that referenced this pull request Mar 1, 2024
larentoun pushed a commit to larentoun/tgstation that referenced this pull request Mar 1, 2024
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes tgstation#81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes tgstation#81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes tgstation#81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
:cl:
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/:cl:

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
larentoun pushed a commit to larentoun/tgstation that referenced this pull request Mar 1, 2024
larentoun pushed a commit to ss220club/Bandastation that referenced this pull request Mar 1, 2024
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes tgstation#81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes tgstation#81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes tgstation#81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
:cl:
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/:cl:

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
larentoun pushed a commit to ss220club/Bandastation that referenced this pull request Mar 1, 2024
larentoun pushed a commit to ss220club/Bandastation that referenced this pull request Mar 1, 2024
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes tgstation#81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes tgstation#81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes tgstation#81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
:cl:
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/:cl:

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
larentoun pushed a commit to ss220club/Bandastation that referenced this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Code is now easier to copy paste. Fix Rewrites a bug so it appears in different circumstances Map Edit Thank you for your tile-placing service. It's always appreciated. Quality of Life Increasing esword damage is not a quality of life for traitors Refactor Makes the code harder to read Sprites A bikeshed full of soulless bikes. UI We make the game less playable, but with round edges
Projects
None yet
8 participants