fix(survival): sandbox creative kit no longer fills the backpack — mining works again (#677) - #680
Merged
Merged
Conversation
…ning works again (#677) The forced creative starter kit (23 stacks) plus the protected starter gear filled all 24 backpack slots on a fresh Sandbox/Creative world. Since #600 BreakBlockAt refuses any break whose drops would not fit, and on foot the MaterialPool counts the backpack only — so every terrain block rejected with "inventory full" and mining read as broken. Kit tools now go to the backpack; every material stack goes straight to the active ship's cargo hold (starter hold: 48 slots). Leftovers are logged, never spilled back into the backpack. The ship is saved alongside the one-time flag so the granted kit survives a reload. Tests: kit-in-cargo + free-backpack-slots asserts, on-foot mining regression for a fresh creative player, persistence moved to cargo. closes #677 Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Summary
Fixes the Sandbox-mode "cannot mine blocks" playtest bug. The forced creative starter kit (23 stacks) plus the five protected starter items filled all 24 backpack slots on a fresh Sandbox/Creative world. Since #600,
BreakBlockAtrefuses any break whose drops would not fit (@inventory_full), and on foot theMaterialPoolcounts the backpack only — so dirt/sand/stone/wood/flora all rejected on every swing. Mining was never gated onGameMode.Creativeat all; it was pure inventory pressure.Changes
GameServer.ApplyCreativeGrants: the kit's tools (titanium_drill, advanced_scanner) go to the backpack; every material stack goes straight to the active ship's cargo hold (starter hold: 48 slots — the whole kit fits). Leftovers are logged and dropped, never spilled back into the backpack, because free backpack slots are the point of the fix. The ship is persisted together with the one-timeCreativeKitGrantedflag so the granted kit survives a reload.CreativeModeTests: kit-materials-in-cargo + tools-in-backpack + "backpack keeps ≥5 free slots" asserts; new regressionCreativeKit_LeavesRoomToMine_FreshPlayerMinesTerrainOnFoot(mines mud on foot right after the grant); persistence test moved to cargo counts.Verification
closes #677
🤖 Generated with Claude Code