Skip to content

fix(survival): sandbox creative kit no longer fills the backpack — mining works again (#677) - #680

Merged
marceld23 merged 1 commit into
mainfrom
fix/677-sandbox-mining-inventory-full
Aug 3, 2026
Merged

fix(survival): sandbox creative kit no longer fills the backpack — mining works again (#677)#680
marceld23 merged 1 commit into
mainfrom
fix/677-sandbox-mining-inventory-full

Conversation

@marceld23

Copy link
Copy Markdown
Owner

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, BreakBlockAt refuses any break whose drops would not fit (@inventory_full), and on foot the MaterialPool counts the backpack only — so dirt/sand/stone/wood/flora all rejected on every swing. Mining was never gated on GameMode.Creative at 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-time CreativeKitGranted flag so the granted kit survives a reload.
  • CreativeModeTests: kit-materials-in-cargo + tools-in-backpack + "backpack keeps ≥5 free slots" asserts; new regression CreativeKit_LeavesRoomToMine_FreshPlayerMinesTerrainOnFoot (mines mud on foot right after the grant); persistence test moved to cargo counts.
  • TODO.md: Done entry.

Verification

  • Release build: 0 warnings.
  • Non-Slow tier: 1344 server + 147 client tests green (includes the new regression).
  • Server-only change — no client/Assets touched, no Unity build needed.

closes #677

🤖 Generated with Claude Code

…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]>
@marceld23
marceld23 merged commit 7603b3d into main Aug 3, 2026
12 checks passed
@marceld23
marceld23 deleted the fix/677-sandbox-mining-inventory-full branch August 3, 2026 12:49
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.

Sandbox mode: cannot mine blocks — forced creative starter kit fills the backpack, mining rejects with inventory-full

1 participant