mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 04:29:30 -04:00
44f680a0b9
The Save Editor's Inventory tab writes gSaveContext.inventory.items[] directly, but a C/D-pad item button mirrors the slot it points at (buttonItems[i] == items[cButtonSlots[i-1]]). That derived value was never refreshed, so e.g. emptying a bottle assigned to a button left the button showing its old contents -- a desync the game's equip/inventory consistency then trips on at the next age swap or bottle update. Re-sync any button pointing at an edited slot after the write. Equipment assigned to a button stores an equipment-page index in cButtonSlots (>= inventory size), so it never matches an inventory slot and is left untouched. Includes a default-on "Keep C/D-pad buttons in sync" checkbox (mirroring "Restrict to valid items") so inventory edits can intentionally leave a slot desynced from its button for RBA practice/debugging. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>