Files
storybook/examples/baker-family/schedules/work_schedules.sb
Sienna Meridian Satterwhite 26bbef58d3 fix(lsp): correct line numbers in convert species/template tests
The tests were using line: 2 but the character declarations were on
line: 1 (due to the leading newline in the raw string literal). This
caused the cursor position to be outside the character span, making
the code actions fail to trigger.

Fixed by changing line: 2 to line: 1 in both test_convert_species_to_template
and test_convert_template_to_species.
2026-02-14 16:29:22 +00:00

56 lines
1.4 KiB
Plaintext

//! Work schedules for the Baker family
//!
//! Demonstrates schedule composition features:
//! - extends keyword for schedule inheritance
//! - override blocks to modify inherited schedules
//! - Named blocks for override system
//! - Action references to behavior trees
//! - Recurrence patterns for weekly variations
// Base work schedule (9-5 job)
schedule WorkWeek {
block morning_prep { 08:00 -> 09:00, action:MorningPrep }
block work { 09:00 -> 17:00, action:DailyWork }
block evening_rest { 18:00 -> 22:00, action:Resting }
}
// Baker's schedule extends WorkWeek
schedule BakerSchedule extends WorkWeek {
// Bakers start early - override the work block
override work {
05:00 -> 13:00
action:BakingWork
intensity:"high"
}
// Add pre-dawn prep
block pre_dawn_prep {
04:00 -> 05:00
action:PrepKitchen
}
// Market day on Saturdays
recurrence MarketDay on Saturday {
block market {
06:00 -> 14:00
action:SellAtMarket
place:"town_square"
}
}
}
// Assistant baker schedule (helps during busy times)
schedule AssistantSchedule extends BakerSchedule {
// Assistant comes in later
override work {
06:00 -> 14:00
action:AssistWithBaking
}
// Assistant does a quick prep before work
override pre_dawn_prep {
05:30 -> 06:00
action:QuickPrep
}
}