Files
storybook/examples/baker-family/behaviors/baker_behaviors.sb

121 lines
2.1 KiB
Plaintext
Raw Normal View History

//! Behavior trees for the Baker family
//!
//! These are referenced by schedule blocks via the action: field
// Main baking work routine
behavior BakingWork {
then {
check_orders
prepare_ingredients
choose {
make_bread
make_pastries
make_cakes
}
bake
cool_products
package_goods
}
}
// Kitchen prep routine
behavior PrepKitchen {
then {
clean_surfaces
check_supplies
preheat_ovens
organize_workspace
}
}
// Market day selling behavior
behavior SellAtMarket {
repeat {
then {
greet_customer
show_products
if(self.customer_interested) {
make_sale
}
thank_customer
}
}
}
// Assistant work (subset of main baking)
behavior AssistWithBaking {
then {
check_orders
prepare_ingredients
choose {
assist_with_bread
assist_with_pastries
}
clean_workspace
}
}
// Quick morning prep
behavior QuickPrep {
then {
check_supplies
organize_workspace
}
}
// Basic needs (from Person template)
behavior BasicNeeds {
repeat {
choose {
if(self.hunger is hungry) { eat }
if(self.hunger is satisfied) { rest }
if(self.thirst is thirsty) { drink }
}
}
}
// Social interaction
behavior SocialInteraction {
choose {
greet_neighbors
chat_with_customers
family_time
}
}
// Baking skills
behavior BakingSkills {
then {
assess_dough
adjust_recipe
monitor_temperature
}
}
// Customer service
behavior CustomerService {
then {
greet_warmly
listen_to_needs
recommend_products
handle_payment
}
}
// Child behaviors
behavior PlayBehavior {
choose {
play_outside
play_with_toys
draw_pictures
}
}
behavior LearnBehavior {
then {
attend_school
do_homework
read_books
}
}