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

fix: Construction Recipe check for components same as tool fixed. #4514

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Apr 22, 2024

Purpose of change

Check was bugged, if an item requires charges for tool use but is not count_by_charges() only unloaded tools are considered valid components, but the game looks for the extra item that is used in the tools because it cannot discern that it doesn't need to.

Describe the solution

An extra check was added so that if the tool uses charges but is not count_by_charges() it goes to standard checks. It would technically also work vice-versa but I don't think that use case can even happen under normal circumstances.

Describe alternatives you've considered

  • A healthy, happy life spent not staring at archaic code.

Testing

  • Spawn 2 soldering irons and all the other requirements for installing a soldering iron.
    • Check that construction for soldering iron appliance doesn't allow it because both soldering irons are loaded so neither counts as a component.
    • Unload both and check that it still doesn't allow it because now there's no tool.
    • Unload only 1, check that the recipe is now green across the board and construction can occur.
  • Give a plank hammering 2.
    • Check that construction recipes requiring hammering 2 and planks don't work unless you have 1 more plank than the component requirement.
    • Scream cause the display looks weird regardless.

Additional context

I don't really think I can fix the display without a lot of code diving into parts I'd rather not.

Checklist

@github-actions github-actions bot added the src changes related to source code. label Apr 22, 2024
@KheirFerrum KheirFerrum changed the title Fix: Construction Recipe check for components same as tool fixed. fix: Construction Recipe check for components same as tool fixed. Apr 22, 2024
@chaosvolt chaosvolt merged commit a87e89a into cataclysmbnteam:main Apr 22, 2024
13 checks passed
@KheirFerrum KheirFerrum deleted the Construction-recipe-fix branch April 27, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Electric grid soldering iron recepie bug Grid soldering iron unbuildable with handheld soldering iron
2 participants