// Generated by tools/gen_wasm_interact_data.py — do not edit.
// Data files are embedded verbatim so the wasm runtime (no filesystem)
// parses the same bytes the native build reads from assets/.
#pragma once

// assets/reactions.csv
static const char *FRACTORY_EMBEDDED_REACTIONS = R"CSV(
# Item reactions — right-click the GAP between cells (docs/reactions.md).
# Format: resultId,resultCount,itemId:count,itemId:count[,...]
#
# A rule carries 2..4 ingredients, each naming the item AND the EXACT stack count
# its cell must hold. The click picks the cells the gap touches: the two sharing
# an edge, or the four meeting at a corner. Those cells (same subgrid only, and
# ignoring EMPTY ones) are matched against the rules as a multiset — where an
# ingredient sits inside the gap does not matter, its identity and count do.
# On a match every one of those cells is emptied and the result goes into your
# hand, so you end the reaction holding it.
#
# Item ids come from assets/items.csv. Rules are tried in file order.
#
# Two wood -> the wand (item 3), the crafting tool, and its ONLY source: a
# crafting recipe for the tool would cost the tool it makes, so the wand can
# never be crafted — a reaction needs no tool, which bootstraps the whole tree.
3,1,0:1,0:1               # wood:1  + wood:1  -> wand
#
# Gathered tier: the basics turned into the resources the rest needs. The counts
# are exact, so charcoal wants a pile of TWO wood beside a stone, while panning
# wants a single stone in running water.
4,1,0:2,1:1               # wood:2  + stone:1 -> coal      (charcoal, burnt under a stone)
5,1,1:1,2:1               # stone:1 + water:1 -> ore       (panning a stream)
9,2,1:1,1:1               # stone:1 + stone:1 -> 2 sand    (two stones ground together)
#
# Crafted tier: what the basics and the gathered resources make between them.
10,2,9:1,2:1              # sand:1  + water:1 -> 2 brick   (mud, dried)
12,1,8:1,4:1              # stick:1 + coal:1  -> torch     (a brand worth carrying)
#
# Assembled tier: bigger sets, in a corner rather than across an edge.
14,1,8:2,7:1              # stick:2 + plank:1 -> ladder                (3 ingredients)
15,1,6:1,6:1,13:1,4:1     # metal:1 + metal:1 + screw:1 + coal:1 -> gear (4 ingredients)
)CSV";

// assets/crafting.csv
static const char *FRACTORY_EMBEDDED_CRAFTING = R"CSV(
# Crafting — shaped recipes matched against a pattern of ITEM cells on the board.
#
# Format: resultId,resultCount,dr:dc:itemId,dr:dc:itemId,...
#   Each entry after the first two columns is one (offset, item) pair.
#   Offsets are dr = rows down, dc = columns right, relative to the recipe's own
#   origin (so a recipe is authored as it reads on the board). Entries may be
#   non-contiguous (L, T, ring, …) and future fields can be appended inside an
#   entry after a second ':' without changing the format.
#
# How a craft happens in game: hold (drag) a stack of item 3 — the wand, the
# crafting element — and RIGHT-CLICK a cell that is part of the pattern. The
# recipe is slid around the clicked cell, so the click can be on any of its
# cells. Every pattern cell loses one unit, the result lands on the clicked
# cell, and one unit of the wand is spent. Nothing is ever silently destroyed:
# if the clicked cell still holds a different item after its unit is consumed,
# the craft is refused.
#
# The right button is a click/hold pair (Game::mouseDown/mouseUp): the CLICK
# (a tap: <=250 ms and <=8 px of travel) is the interact, and a craft is tried
# first while the wand is held. A click that matches no pattern is not a craft —
# it falls through to the plain interact (machine load, spawn on an empty cell).
# A right-HOLD
# past the tap window is the heat pump and never crafts.
#
# Item ids come from assets/items.csv. Rules are tried in file order — author
# specific shapes before general ones.
#
# NOTE: nothing here produces item 3 (the wand). The crafting element must never
# be a crafting result — a recipe for it would cost the very tool it makes, so
# the tool could never be obtained. The wand is made ONLY by the reaction
# wood + wood -> wand (assets/reactions.csv), which needs no tool at all.

# 1x2 — wood + wood -> 2 plank            (sawing a log lengthwise)
7,2,0:0:0,0:1:0

# 1x3 — three wood in a row -> 3 stick    (splitting a log)
8,3,0:0:0,0:1:0,0:2:0

# 1x2 — metal + metal -> 4 screw          (a bar cut down)
13,4,6:0:0,0:1:6
)CSV";

// assets/station_recipes.csv
static const char *FRACTORY_EMBEDDED_STATION_RECIPES = R"CSV(
# Station recipes — machine footprints that the random world generator scatters
# (Config::stationChance / --station-chance) and that StationCell uses for the
# footprint's role tiles.
#
# Columns: id,sizeR,sizeC,inputA,inputB,output,outputCount,duration,layout...
#   layout is row-major over sizeR*sizeC cells.
#   layout[0] is the anchor tile — the machine's own cell — and never gets a
#   role (the anchor cell is the STATION, roles only apply to its RESERVED
#   neighbours). Every non-negative inputA/inputB needs one INPUT tile in the
#   layout or the recipe can never start; the anchor must be the footprint's
#   top-left cell, so a sizeR x sizeC machine only fits a subgrid of at least
#   that dimension.
# Item ids come from assets/items.csv. Load an INPUT tile by right-clicking it
# while holding a stack; the machine works on its own once both inputs are in.
#
# 2x2 FURNACE — coal + ore -> metal (the smelting step of the progression)
0,2,2,4,5,6,1,10,BUFFER,INPUT,OUTPUT,INPUT
# 2x2 KILN — sand + coal -> glass (firing what the reactions gathered)
1,2,2,9,4,11,1,8,BUFFER,INPUT,OUTPUT,INPUT
)CSV";
