fix(themess): rewrite script for batch correctness and burn recovery#431
Merged
chsami merged 2 commits intochsami:developmentfrom May 10, 2026
Merged
fix(themess): rewrite script for batch correctness and burn recovery#431chsami merged 2 commits intochsami:developmentfrom
chsami merged 2 commits intochsami:developmentfrom
Conversation
…s, and burn recovery The Mess plugin was running 1-2 actions per dispatcher tick and re-issuing combine/cook calls between Make-X items, capping every batch at a few products and stalling repeatedly. This rewrite consolidates the per-dish flow around a single principle: each phase blocks until its consumed ingredient hits 0, so the dispatcher cannot pick a competing guard mid-chain. - cookOnOven and combineAll/combineDoughDialog now block on inventory delta (not animation, which combines don't have) until the consumed item is depleted, with stall guards. - Per-dish guards reordered so cooking-to-zero precedes any combine that uses its output (no more "started combining the moment 2 cooked meats appeared"). - Withdrawal targets size to predecessor counts so burn-induced leftover shells/water/etc. carry into the next batch and the chain tops up rather than over-fetching. - Cupboard withdraws use VarClientStr.INPUT_TEXT instead of typeString for the Enter Amount prompt, fixing digits leaking into game chat when the chatbox input hadn't taken focus. - Cupboard interactions use exact-tile lookup (findObjectByLocation) to avoid mis-targeting the food cupboard when querying near the utensil cupboard one tile away. - Burnt food dropped between phases (gated on !isAnimating and !isProductionWidgetOpen so the cook chain isn't interrupted). - Hard-fail invariant: if any chain item exceeds BATCH_SIZE the script shuts down loudly rather than over-fetching. - Bowl-return guard gated on count(PIE_SHELL) >= BATCH_SIZE so freshly withdrawn bowls aren't immediately returned during top-up. Version bump 1.0.3 → 1.1.0.
- Stew gates takeRawMeat on count(BOWL_WATER) >= BATCH_SIZE so leftover bowls from prior burns drive the top-up formula instead of looping a tiny 2-stew batch. - Reorder stew guards: fillBowls before BOWL_WATER consumers so a partial fill cannot under-fetch downstream raw meat. - Mirror Rs2GrandExchange.setQuantity timing (sleep 600 + 400 around setChatboxAmount) in withdrawFromCupboard and takeRawMeat. Without these, the chatbox silently drops small-qty values, hanging withdrawals. - fillBowls timeout 8s -> 15s; 14 bowls at game-tick speed is ~8.4s with no headroom. - waitForCombineChain stall guard from min(c1,c2) to c1+c2: knife persists at 2 during pizza pineapple-cutting, pinning min and tripping the stall guard after ~3 cuts. Sum decreases on every action.
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
Rewrite of The Mess plugin (Hosidius Servery cooking minigame) for batch-atomic execution and graceful recovery from burns.
Test plan