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

[MIRROR] General maintenance for reagent grinder #2625

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#1642
Original PR: tgstation/tgstation#82161

About The Pull Request

1. Qol

  • Adds examines & screentips for screwdriver, crowbar & wrench acts.
  • Adds examines & screentips for inserting, replacing & removing beaker, Also for inserting items from bags or directly
  • Adds an off icon overlay for when the reagent grinder is either screwed open or loses power,

2. Code Improvements

  • Replaced attackby() with item_interaction() so we can end the attack chain early for non combat operations like inserting beakers/ ingredients for grinding etc.
  • Removed custom shake animations & replaced it with the global Shake() proc cause it did the same thing
  • Removed constructed version of reagent grinder. We instead just check mapload to see if we need the beaker to be created or not for round start reagent grinders
  • Grinding & Juicing use the same operate_for() rather than having seperate procs for each operation
  • Removed trait TRAIT_MAY_CONTAIN_BLENDED_DUST. Why do we have this? Its just used to change the grinder description to warn it may contain dust. It's a waste.

3. Fixes

  • You cannot insert hologram items into the grinder. Rather than destroying that item & making it vanish you simply won't be allowed to put it inside the grinder so you can save that item
  • You can hit the grinder with items like screwdriver, wrench, crowbar, beaker & even with stuff you would normally put in the grinder when in combat mode
  • Adds can_interact() checks for using the UI & other stuff
  • Fixes #46356. All items of type obj/item/grown can be put from any bag into the grinder
  • The item "and its contents" are now grinded/juiced recursively to get all the reagents it has to offer just like a real grinder would
  • An AI/Human with AI access examining the reagent grinder now actually works.

4. Refactors

  • The grinder now measures its available capacity based on the "total weight" of all items present & not its number. This is more realistic because the grinder has limited space inside & so inserting huge items should have greater impact rather than deciding on an arbitrary number like 10(The grinder having the capacity for 10 items of any size inside its small compartment makes no sense). Examines are displayed to show how much capacity of the grinder has been filled. Upgrading the grinder with better matter bins will allow for higher storage capacities.
  • Total power consumed is measured based on the duration & weight of all items grinded cause you know its realistic.

🆑 SyncIt21
qol: adds examines & screentips for tool acts & other operations for reagent grinder
qol: adds an off icon for when the grinder panel is open/not powered
code: auto docs vars & procs. Shared common proc for grinding or juicing
code: removed trait for blended dust, changed some item interactions to end the attack chain early & save time
fix: no inserting hologram items into the reagent grinder
fix: you can hit the reagent grinder tools like screwdriver, wrench, crowbar & even beakers/ingredients etc when in combat mode
fix; adds sanity checks for when & how mobs interact with the reagent grinder
fix: examining a reagent grinder by an AI/Human with AI access now actually works.
fix: you can insert Nova flowers & other food items from any bag type
fix: reagent grinder now grinds all the contents of an item recursively to produce maximum reagents like a real grinder would
refactor: reagent grinder now measures available capacity to store items as total weight of stored items & not number. Capacity can be increased with upgraded matter bin
refactor: reagent grinder power usage is now a function of duration & total weight of items blended, meaining blending more number of items/larger items will consume more power
refactor: reagent grinder code has been optimized overall. Report bugs on github
/:cl:

General maintenance for reagent grinder

Co-authored-by: SyncIt21 <[email protected]>
@Steals-The-PRs Steals-The-PRs added Mirroring conflict git cherry-pick во что-то уткнулся. Не ставить вручную, только для бота TG Mirror labels Mar 28, 2024
@Iajret Iajret merged commit 72ef07c into master Mar 28, 2024
23 checks passed
@Iajret Iajret deleted the upstream-mirror-1642 branch March 28, 2024 13:47
AnywayFarus added a commit that referenced this pull request Mar 28, 2024
Iajret pushed a commit that referenced this pull request May 23, 2024
* Fixes a minor plurality typo with latejoin AIs (#83386)

## About The Pull Request

Removes an S from the message `Due to a research mishaps, [station AI]
has been sent to be your replacement AI at [location]. Please treat them
with respect.`
## Why It's Good For The Game

Latejoin AIs don't have a goofy typo in them now. whoag.
## Changelog
:cl:
spellcheck: Fixes a typo with latejoin AIs
/:cl:

* Fixes a minor plurality typo with latejoin AIs

---------

Co-authored-by: Rhials <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Map Modification Mirroring conflict git cherry-pick во что-то уткнулся. Не ставить вручную, только для бота Sprites TG Mirror
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants