bakery
One player's bakery, run on that player's own machine: goods on the shelves, customers who queue and pay, cashiers and bakers, rush hour, special orders, milestones and opening a new bakery. Money, upgrade levels, prestige, offline earnings and saving are incrementalKit's. The Fo…
fornada.bakery
One player's bakery, run on that player's own machine: goods on the shelves, customers who queue and pay, cashiers and bakers, rush hour, special orders, milestones and opening a new bakery. Money, upgrade levels, prestige, offline earnings and saving are incrementalKit's. The Fornada component ticks it and screens listen with Bakery.on(event, fn).
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
on(name: string, fn: (any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| fn | (any |
emit(name: string, payload: any?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| payload | any? |
rev( ) → number
Changes whenever anything a screen shows changes.
level(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
stat(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
lineName(line: R.Line) → string
| arg | type | description |
|---|---|---|
| line | R.Line |
kitData( ) → void
incrementalKit's data: the two currencies and every upgrade, in the player's language.
formula(earned: number) → void
| arg | type | description |
|---|---|---|
| earned | number |
rate(_: any, currency: string) → void
| arg | type | description |
|---|---|---|
| _ | any | |
| currency | string |
start( ) → void
Start the bakery for the local player (idempotent: a second call only re-reads the words, for a language change).
quiet( ) → void
the kit's own screens go off BEFORE setup: setup loads the save, and the kit opens its own welcome-back card on that load unless told not to
ready( ) → boolean
line(id: string) → any
| arg | type | description |
|---|---|---|
| id | string |
lines( ) → void
nextLine( ) → R
The next line that can be opened, or nil when all are open.
coins( ) → number
crumbs( ) → number
queue( ) → void
isRush( ) → boolean
rushName( ) → string
The name of the rush on now ("morning", "lunch", "evening"), or nil.
staffRate( ) → number
basket( ) → number
serveRate( ) → number
bulk( ) → any
setBulk(b: any) → void
| arg | type | description |
|---|---|---|
| b | any |
quote(id: string) → any
| arg | type | description |
|---|---|---|
| id | string |
neighbourhood( ) → string
bakeryNumber( ) → number
guideStep( ) → number
setGuideStep(n: number) → void
| arg | type | description |
|---|---|---|
| n | number |
stat(name: string) → number
| arg | type | description |
|---|---|---|
| name | string |
bake(id: string, byTap: boolean?) → boolean
One tap on an oven: bakes a batch of that line onto its tray.
| arg | type | description |
|---|---|---|
| id | string | |
| byTap | boolean? |
setLine(provider: any) → void
The kit (fornada.customers) owns arrivals, the line, day rushes, patience, cashiers and moods. The bakery answers what each customer wants, whether the shelves can serve it, and what they pay. `entry` is the bakery's own record of one customer: { id, want, wantCount, value, order?, need?, rush }. fornada.customers hands the bakery its view of the kit's line.
| arg | type | description |
|---|---|---|
| provider | any |
newCustomer(id: number) → Customer
What a customer who just walked in wants: a special order when one is due, otherwise a basket worth some coins, shown as a few of the newest line they can afford.
| arg | type | description |
|---|---|---|
| id | number |
arrived(c: Customer) → void
A customer has joined the line (the kit's arrive event).
| arg | type | description |
|---|---|---|
| c | Customer |
canServe(c: Customer) → boolean
Whether the shelves hold what this customer wants.
| arg | type | description |
|---|---|---|
| c | Customer |
served(c: Customer, m: string, byTap: boolean?) → number
Serve one customer: take the goods, pay, count. `mood` is the kit's, from the share of patience left. Answers the coins paid, or nil when the shelves hold nothing they want.
| arg | type | description |
|---|---|---|
| c | Customer | |
| m | string | |
| byTap | boolean? |
left(c: Customer) → void
A customer gave up waiting (the kit's leave event).
| arg | type | description |
|---|---|---|
| c | Customer |
balked( ) → void
A newcomer saw the line full and walked out (the kit's balk event).
setRush(on: boolean, name: string?) → void
A day rush starts or ends (the kit's rush event): baskets grow in a rush.
| arg | type | description |
|---|---|---|
| on | boolean | |
| name | string? |
serve(_c: Customer?, byTap: boolean?) → number
The Serve button: serve the customer at the front of the line.
| arg | type | description |
|---|---|---|
| _c | Customer? | |
| byTap | boolean? |
buy(id: string, amount: any?) → boolean
Buy an upgrade (oven_<line>, baker_<line>, unlock_<line>, counter, cashier) at the chosen bulk amount (or `amount`).
| arg | type | description |
|---|---|---|
| id | string | |
| amount | any? |
prestigePreview( ) → any
resetAll( ) → void
Start over as a brand new player (the tester's reset): progress, shelves, milestones and the line, exactly as a first launch.
prestige( ) → boolean
Open a new bakery in the next neighbourhood.
setSpeed(x: number) → void
| arg | type | description |
|---|---|---|
| x | number |
speed( ) → number
step(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
tick(dt: number) → void
Advance the bakery by dt seconds of game time (the component calls it every frame on the local player's machine).
| arg | type | description |
|---|---|---|
| dt | number |
grantMinutes(minutes: number) → void
Pay `seconds` of the staff's earnings straight away (tester tool).
| arg | type | description |
|---|---|---|
| minutes | number |
Customer = {Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.