Repository navigation
Validate mineshafts and drop the "possible" state - #23
Merged
Merged
Conversation
Mineshafts were the last structure not checked like the game. Their generation point depends on their pieces: MineshaftStructure grows a room, corridors, crossings and stairs from the chunk, then moves the whole mineshaft below sea level (or, in badlands, towards the surface) and checks the biome at that height. structure::mineshaft ports MineshaftPieces far enough for that: every piece's bounding box, in the game's order, with the same random numbers. New game fixtures: 800 whole piece lists (101,148 pieces) with the random number that follows them, and 2,160 generation points of both mineshaft types. The 117 mineshaft attempts already in structures.txt now match too. With every structure ported, the unknown state goes away everywhere: Outcome::Unknown, StructureKind::NotImplemented, the nested Option of try_structure, Found.exact, Marker.exact and the app's "possible" labels. Only the spawn block stays an estimate. The oracle now fails on a structure type it does not know instead of exporting it as not implemented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SenGxDDRwLejx8nir8GXKG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first two items of 0.6: mineshafts are now checked the same way the game checks them, so nothing on the map or in the finder is marked as "possible" any more. This also does proposal #3 of the architecture review: the unknown state is removed from every layer.
Mineshafts
A mineshaft's generation point depends on its pieces. The game grows a room, corridors, crossings and stairs from the chunk, then moves the whole mineshaft:
The biome is checked at the height that results from that move.
New
structure::mineshaftportsMineshaftPiecesfar enough for that: every piece's bounding box, in the game's order, drawing the same random numbers. That includes the corridor's rail and spider-web rolls, which only decorate.New kind
StructureKind::Mineshaft(MineshaftType), exported by the oracle.No more "possible"
Outcome::Unknown,StructureKind::NotImplemented,Found.exactandMarker.exact, plus the app's "possible" labels, inspector status and help text.try_structurenow returnsOption<pos>instead of a nestedOption.Hitalways has a structure that generates.structuresexample now lists mineshafts and buried treasure too.Verification
mineshaft_pieces.txt: 800 whole piece lists (101,148 pieces), each with the random number that comes after it.mineshaft_points.txt: 2,160 generation points of both types, on clusters centred on their biomes. 840 of them are badlands mineshafts that generate.structures.txtnow match the game as well.docs/PARITY.md.No version bump: 0.6 still needs saved settings.
Generated by Claude Code