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

Follow up fixes for multiple muffler hatches. #3505

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

Conversation

AbdielKavash
Copy link
Member

@AbdielKavash AbdielKavash commented Nov 16, 2024

This is a follow up to #3489 fixing several problems with that PR.

  • Logic for pollution output no longer creates unnecessary copies of arrays, instead it picks a random index into the existing list of muffler hatches.
  • Said logic is also simplified in case the multi has 0 or 1 muffler hatches (as a large majority of multis in a typical base will) to avoid hatch selection completely.
  • Removed unnecessary array copy when generating info data.
  • Info data now mentions and correctly displays average pollution output also for all other machines that override getInfoData.
  • EBF and MEBF now calculate pollution gas output based on the average pollution output of all mufflers (this currently does not matter, as both require exactly 1 muffler, but it is calculated correctly just in case).

@AbdielKavash AbdielKavash added refactor For PRs rewritting a part of the code to have a nicer code overall. bug fix Fix a bug. Please link it in the PR. labels Nov 16, 2024
@AbdielKavash AbdielKavash requested a review from a team November 16, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fix a bug. Please link it in the PR. refactor For PRs rewritting a part of the code to have a nicer code overall.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant