Closed AbdielKavash closed 1 year ago
I personally feel like this is the sort of effort that only has merit when we get a proper pollution rework, which seems like it will never happen.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 3 days
Made a fix for this issue. https://github.com/GTNewHorizons/GTplusplus/pull/699
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 3 days
Your GTNH Discord Username
Abdiel Kavash#2431
Your Pack Version
2.3.0
Your Proposal
TL;DR of the issue, details below:
Pre-2.3.0, advanced muffler hatches were bugged in that they never consumed durability from an air filter inside (see #12577 ). This meant that they could be run either with a filter or without (and in fact only worked identically to normal muffler hatches in either case, due to the bug).
In 2.3.0, the advanced muffler hatch requires an air filter to run. If it attempts to vent pollution without a filter, it will fail, and its multiblock will stop.
I suggest to change the functionality so that the advanced muffler can run without an air filter, although at a reduced efficiency. The code to do so already exists, it is just not called during normal operation. See below for details, further below for justification.
Details:
Please refer to https://github.com/GTNewHorizons/GTplusplus/blob/540f2a3bf057ebb80a9e46b5a3037ead415ffbc6/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
The method calculatePollutionReduction has two cases: reduction to 0.64^(tier - 1) if the hatch has an air filter, and to 0.7^(tier - 1) if it does not.
However, in polluteEnvironment, if there is no filter, the first check
damageAirFilter
fails (see that method), and the venting of pollution is immediately aborted (which leads to multiblock shutdown), beforecalculatePollutionReduction
is even called.The calculation for pollution reduction without a muffler has been added here: https://github.com/GTNewHorizons/GTplusplus/commit/540f2a3bf057ebb80a9e46b5a3037ead415ffbc6 with the comment "Made Advanced Mufflers work as efficiently as their standard tier counterparts while there is no air filter. (Currently bugged)." (Note that the calculation for standard mufflers has since been changed.) However, this comment suggests that the advanced mufflers were supposed to do something even without a filter. This has however never worked, even that version has the same issue where
polluteEnvironment
/damageAirFilter
fails without a filter before any pollution is vented.My proposal is to fix the logic in
polluteEnvironment
so that the "no filter" case is actually used.There is a relevant balance question: should we keep the old calculation of 0.7^(tier - 1), or adjust it to be equivalent to current standard mufflers: 1 - tier * 0.125. With the old calculation, advanced mufflers are more powerful than regular mufflers even without a filter (see table on the wiki). However it could be argued that this is balanced by the greater resource cost. Making the reduction without a filter equal to current standard mufflers would make it so that advanced mufflers are only better with a filter, although it would simplify replacing the filters (see justification below).
Your Goal
Consumable air filters are a balancing mechanic of advanced mufflers. These filters can be replaced by automation, however, many multiblocks (EBF, pyrolyse oven, generators, ...) require a muffler in places where the only accessible side is the front (which has to be air for the muffler to work at all). Therefore automation in these cases requires some indirect access, e.g. a transvector interface.
Without automation, replacing the filters manually is problematic. The hatch can only hold one filter at a time. Due to the current behavior, if the filter breaks while the multiblock is running, the next time the multi would vent pollution, it will stall (and void the currently processed materials). This means that the player has to be proactive in replacing the filters before they break, and the near-broken filters have to be simply thrown away. There is, to my knowledge, no simple way to automatically signal (redstone or otherwise) on a near-broken filter, so this requires frequent manual inspection.
If this suggestion is implemented, the multiblock will continue running even after the air filter is depleted, even though it will be producing more pollution. This means that being late in replacing the filter does not completely stop the multiblock, and that the broken filter can be signaled using an item detector cover. (No items = no filter.)
This makes the advanced mufflers much more useable even with manual/semi-manual replacement of filters, without requiring awkward automation setups.
Your Vision
Make pollution great again.
Final Checklist