Skip to content

Rework FuelRecipeLogic#166

Merged
TechLord22 merged 5 commits intomasterfrom
FuelLogic
Oct 25, 2021
Merged

Rework FuelRecipeLogic#166
TechLord22 merged 5 commits intomasterfrom
FuelLogic

Conversation

@ALongStringOfNumbers
Copy link
Copy Markdown
Contributor

What:
An attempt to rework some of FuelRecipeLogic, moving the obstructed information away from structure formation, and into the update check. Also attempts to implement Trouser's notifiable system for FuelRecipeLogic (only the fluids, not items).

Adds an isObstructed method to FuelRecipeLogic for multiblocks to override if needed. This method will be checked every tick, and when attempting to start a new recipe.

Moves the maintenance check up to isReadyForRecipes

In the Large Combustion Engine workable, adds a method to check if the engine intakes are free, modeled after the Large Turbine one. Both of these methods will need to be updated for the Freedom wrench to account for facing upwards.

Adds a line to the TOP pane that shows if the structure is obstructed.

Feedback:
I desire some feedback on some parts of this PR, most of which I have left as TODO's in the code. The main thing is if the isObstructed() check should be run every tick, or on some sort of timer, to prevent scanning the space in front of the multiblock every tick.

Outcome:
Slight FuelRecipeLogic rework

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be set after here, unless we refactor this to look more like the logic in AbstractRecipeLogic, where the result of findRecipe is already looped through the tank list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can clear after the loop end, so we call clear only once

Comment thread src/main/java/gregtech/api/capability/impl/FuelRecipeLogic.java Outdated
Comment thread src/main/java/gregtech/api/capability/impl/FuelRecipeLogic.java Outdated
Comment thread src/main/java/gregtech/api/capability/impl/FuelRecipeLogic.java Outdated
@TechLord22 TechLord22 merged commit d2db225 into master Oct 25, 2021
@TechLord22 TechLord22 deleted the FuelLogic branch October 25, 2021 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants