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

Updates Structure checks to add error hinting #3254

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

kstvr32
Copy link
Contributor

@kstvr32 kstvr32 commented Sep 22, 2024

Changes

Implements Error Hinting on GT Multis

Implements the couldBeValid(...) function to most IStructureElement<T> instances in GT. This allows error hinting to show the player blocks that will fail the structure check. This is a new toggleable option on the hologram projector. See GTNewHorizons/StructureLib#31 for more information on error hinting.

Sample Usage

Highlights missing blocks

2024-09-22_00 56 17

Highlights hatches that are not allowed

2024-09-22_00 59 19

Fusion Reactor doesn't accept low tiered hatches

2024-09-21_17 44 23

Testing/Verification

Since this is separate from the structure check, it should not cause any problems with multiblocks forming. I have gone through the following multiblocks and verified expected behavior.

For the following I verified that with a lone controller, all of the blocks are invalid and that with a formed multiblock none of them are.

Multiblock Notes
Bricked Blast Furnace
Oil/Gas/Fluid Drilling Rig
Concrete Backfiller Some inconsistencies here, the tooltip says it can have an output bus, but it wasn't included on the allowed hatches. Additionally, all of the MTEDrillerBase had a more permissive structure check than required due to (I think) a bug in the structure code. Fixing this bug to prevent multiblocks with extra, unrequired hatches from forming.
Ore Drilling Plant Does not show error when energy hatch is too low tier. This check is done manually in checkMachine and isn't part of the StructureLib structure check.
PCB Factory Works with moving the sub-structures around.
Nano Forge
Magnetic Flux Exhibitor
TurboCan Pro
Hyper-Intensity Laser Engraver
Fusion Reactor Highlights if a hatch is too low tier. ME Output Hatch is incorrectly listed as tier too low (but still forms). Fixed
Compact Fusion Reactor
Eye Of Harmony
DTPF

Further testing in progress.

Improves some structure checks

Naquadah Fuel Refinery

Changed structure check to use the ofBlocksTiered primitive instead of implementing it again.

Breaking Changes (due to fixing structure code)

If these were intended, let me know and I will revert them.

  • Changed MTEDrillerBase multiblocks structure check to actually use the getAllowedHatches list instead of allowing all hatches. These could previously form with muffler hatches and data access hatches ...why?
    • This impacts, Concrete Backfillers, Oil/Gas/Fluid Drilling Rigs, Ore Drilling Plants, and Void Miners.

Requires

Version of StructureLib with GTNewHorizons/StructureLib#31 merged.

@serenibyss serenibyss added the new feature Add something new. Please explain in detail how it works. label Sep 22, 2024
@boubou19
Copy link
Member

could you take advantage of this PR to change hint blocks to have a number instead of dots? it would improve the readability a lot

@boubou19 boubou19 added the ongoing freeze - do not merge PR tagged with this do not meet the requirement to be merged during a freeze. label Sep 22, 2024
@Dream-Master Dream-Master requested a review from a team September 22, 2024 17:40
@kstvr32
Copy link
Contributor Author

kstvr32 commented Sep 23, 2024

could you take advantage of this PR to change hint blocks to have a number instead of dots? it would improve the readability a lot

I took some time and looked into this. I have a test branch where I rendered text on top of the blocks. It turned out okay, but I think the better way is to just replace the hint block textures here. Not sure if someone who is a better artist wants to take a crack at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Add something new. Please explain in detail how it works. ongoing freeze - do not merge PR tagged with this do not meet the requirement to be merged during a freeze.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants