Repository navigation
fix: keep saucepan sauce scoopable after a chunk reload - #69
Conversation
A chunk unload or restart rebuilds the saucepan from its furniture, but the rebuild only kept raw food. The liquid was dropped, so the saucepan still showed sauce that the ladle could no longer scoop, and seasonings and other additions were forgotten. Restore the liquid and the added ingredients on rebuild, and save the sauce colours and the poured liquid in the furniture's variables so a milk sauce stays creamy. Saucepans filled before this fall back to their ingredients' colours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to Saucepan liquid, ingredients and colours are now saved and restored after a chunk reload, and tests cover the edge cases. No outstanding risk blocks merging. A saucepan filled before this change with only liquid will still scoop after reload, using a default colour.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Problem
A player left sauce in a saucepan, came back later, and could no longer pick it up with a ladle.
When a chunk unloads (everyone walks away) or the server restarts,
CookingManagerdrops the station reference and rebuilds it from the furniture on the next load.SauceReferenceused the baserebuildFromFurniture, which only keeps raw cookable food. The saucepan's liquid was not restored, soscoop()returned atif (!secondaries.containsKey("liquid")) return;with no message while the sauce was still shown. Seasonings and other additions were forgotten too. Pots already got this fix inPotReference.rebuildFromFurniture; saucepans did not.Changes
SauceReference.rebuildFromFurniturerestores the liquid, the added ingredients (any food in aninputslot) and the colours.sauce.colours) and the poured liquid (sauce.liquid) in the furniture's variables;clear()removes them. A milk-bucket sauce (the only liquid coloured white) therefore stays creamy, and the liquid still counts toward the scoop's quality after a reload.Testing
mvn clean verifypasses (100% line coverage gate). NewSauceReferenceReloadTestcovers the rebuild with saved state, legacy saucepans, ingredients without liquid, non-food liquid and missing furniture.~/sauce-test/reload-test.json the host) against TFMCDev01: all checks pass. A milk + basil sauce and a water + basil sauce are each scooped after their chunk unloads and loads again, and the reloaded sauce matches the same batch scooped without a reload. On 0.3.21 the same test returned an empty ladle after the reload. (Cups of milk give colour000000, not white, with or without a reload. That is existing behaviour, not part of this fix.)🤖 Generated with Claude Code