ChefDash’s shop system is built around two tightly coupled types: theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ImLukzy/ChefDash/llms.txt
Use this file to discover all available pages before exploring further.
UpgradeType enum, which names each possible power-up effect, and the ShopItem struct, which pairs that effect with a price, an icon, and a quantity counter. Items are consumables — buying one increments quantityOwned, and each use during a round decrements it back. The three items in the shop ("oven", "knife", "sauce") map directly to gameplay mechanics in GameState.
Type Definitions
UpgradeType Enum
ShopItem Struct
UpgradeType Cases
| Case | Item Name | Effect |
|---|---|---|
.extraTime | Horno Industrial 🌋 | Grants +15 s to the round timer via the onRecipeSuccessBonusTime callback, which fires in triggerSuccess() each time a recipe is completed successfully |
.comboBooster | Cuchillo Afilado 🔪 | Sets comboMultiplier = 2 at round start inside startNewRound(), giving the player a head-start on the combo chain instead of beginning at ×1 |
.instantServe | Salsa Secreta 🥫 | Adds +10 bonus coins per perfect order; triggerSuccess() checks whether a "sauce" item with quantityOwned > 0 exists in shopInventory and includes the bonus in the coin calculation |
The
.instantServe name is slightly misleading from the source enum comment — in practice the "sauce" item does not auto-complete orders. It awards extra coins per perfect serve. The in-game description ("Añade +10 monedas extra por cada hamburguesa perfecta servida.") is the authoritative description of its effect.ShopItem Fields
Unique string identifier used for inventory lookup and membership checks in
selectedUpgradesForRound: Set<String>. The three valid values are "oven" (Horno Industrial), "knife" (Cuchillo Afilado), and "sauce" (Salsa Secreta).Display name rendered in
ShopView and in the pre-game upgrade selection modal. Examples: "Horno Industrial", "Cuchillo Afilado", "Salsa Secreta".One-line effect description shown beneath the title in the shop UI. Written to inform the player of the mechanical effect before purchase.
Single emoji icon displayed alongside the item title. The three values are
"🌋" (oven), "🔪" (knife), and "🥫" (sauce).Coin cost to purchase one unit of the item. Deducted from
GameState.coins at purchase time. Current prices: Horno Industrial — 50 coins, Cuchillo Afilado — 30 coins, Salsa Secreta — 40 coins.Determines which branch of game logic is activated when this item is consumed. See the UpgradeType cases table above for how each value maps to a concrete in-game effect.
Number of units currently in the player’s inventory. Defaults to
0. Incremented when purchased in ShopView; decremented inside GameState.startNewRound() for every item whose id appears in selectedUpgradesForRound. A value of 0 means the item cannot be selected for the next round.Shop Inventory Initialisation
GameState initialises the full shop inventory as a @Published array of ShopItem values:
Consume Flow
Power-ups move through a three-step lifecycle before their effect is applied:-
Purchase — The player buys one or more units in
ShopView.quantityOwnedis incremented andGameState.coinsis decremented byprice. -
Selection — Before starting a round, the player chooses which owned items to activate. Each selected item’s
idis inserted intoGameState.selectedUpgradesForRound: Set<String>. -
Activation & Decrement — When
GameState.startNewRound()is called:- If
"knife"is inselectedUpgradesForRound,comboMultiplieris set to2immediately. - For every
idinselectedUpgradesForRound, the matchingShopIteminshopInventoryhas itsquantityOwneddecremented by 1 (only if it was> 0). selectedUpgradesForRoundis then cleared.- The
"oven"effect (+15 s) is delivered later, each timeonRecipeSuccessBonusTimefires during the round. - The
"sauce"bonus coins are checked insidetriggerSuccess()for each completed order.
- If