release: Storybook v0.2.0 - Major syntax and features update
BREAKING CHANGES: - Relationship syntax now requires blocks for all participants - Removed self/other perspective blocks from relationships - Replaced 'guard' keyword with 'if' for behavior tree decorators Language Features: - Add tree-sitter grammar with improved if/condition disambiguation - Add comprehensive tutorial and reference documentation - Add SBIR v0.2.0 binary format specification - Add resource linking system for behaviors and schedules - Add year-long schedule patterns (day, season, recurrence) - Add behavior tree enhancements (named nodes, decorators) Documentation: - Complete tutorial series (9 chapters) with baker family examples - Complete reference documentation for all language features - SBIR v0.2.0 specification with binary format details - Added locations and institutions documentation Examples: - Convert all examples to baker family scenario - Add comprehensive working examples Tooling: - Zed extension with LSP integration - Tree-sitter grammar for syntax highlighting - Build scripts and development tools Version Updates: - Main package: 0.1.0 → 0.2.0 - Tree-sitter grammar: 0.1.0 → 0.2.0 - Zed extension: 0.1.0 → 0.2.0 - Storybook editor: 0.1.0 → 0.2.0
This commit is contained in:
43
examples/baker-family/characters/martha.sb
Normal file
43
examples/baker-family/characters/martha.sb
Normal file
@@ -0,0 +1,43 @@
|
||||
//! Martha - Master baker and family matriarch
|
||||
//!
|
||||
//! Demonstrates:
|
||||
//! - Character inheriting from template with resources
|
||||
//! - Template provides both behaviors and schedule
|
||||
//! - Field overrides from template
|
||||
|
||||
use schema::templates::Baker;
|
||||
|
||||
character Martha from Baker {
|
||||
// Personal details
|
||||
age: 34
|
||||
|
||||
// Baker-specific traits
|
||||
specialty: "sourdough"
|
||||
baking_skill: 0.9
|
||||
customer_relations: 0.95
|
||||
|
||||
// General traits (inherited from Person template)
|
||||
energy: 0.7
|
||||
mood: 0.8
|
||||
|
||||
// Work ethic (from Worker template)
|
||||
work_ethic: 0.95
|
||||
occupation: "master baker"
|
||||
|
||||
---backstory
|
||||
Martha learned to bake from her grandmother and has perfected
|
||||
the art of sourdough over fifteen years. She wakes at 4 AM every
|
||||
day to prepare the morning bread, and her bakery is known throughout
|
||||
the region for its exceptional quality.
|
||||
|
||||
She manages the business side as well, keeping meticulous records
|
||||
and maintaining warm relationships with all her customers. The bakery
|
||||
is not just a shop - it's the heart of the community.
|
||||
---
|
||||
}
|
||||
|
||||
// Note: Martha inherits from Baker template which:
|
||||
// - uses behaviors: BakingSkills, CustomerService (from Baker)
|
||||
// - uses behaviors: BasicNeeds, SocialInteraction (from Person via Worker)
|
||||
// - uses schedule: BakerSchedule (from Baker)
|
||||
// - uses schedule: WorkWeek (base for BakerSchedule)
|
||||
Reference in New Issue
Block a user