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
41 lines
938 B
Plaintext
41 lines
938 B
Plaintext
//! Template definitions for the Baker family
|
|
//!
|
|
//! This example demonstrates v0.2.0 features:
|
|
//! - Resource linking (uses_behaviors, uses_schedule)
|
|
//! - Template inheritance
|
|
//! - Multi-level template hierarchies
|
|
|
|
// Base template for all persons
|
|
template Person {
|
|
uses behaviors: BasicNeeds, SocialInteraction
|
|
age: 0..100
|
|
energy: 0.0..1.0
|
|
mood: 0.0..1.0
|
|
}
|
|
|
|
// Worker template extends Person
|
|
template Worker {
|
|
include Person
|
|
uses schedule: WorkWeek
|
|
occupation: "laborer"
|
|
work_ethic: 0.5..1.0
|
|
}
|
|
|
|
// Specialized baker template
|
|
template Baker {
|
|
include Worker
|
|
uses behaviors: BakingSkills, CustomerService
|
|
uses schedule: BakerSchedule
|
|
specialty: "bread"
|
|
baking_skill: 0.0..1.0
|
|
customer_relations: 0.5..1.0
|
|
}
|
|
|
|
// Child template (no work schedule)
|
|
template Child {
|
|
include Person
|
|
uses behaviors: PlayBehavior, LearnBehavior
|
|
school_grade: 1..12
|
|
curiosity: 0.0..1.0
|
|
}
|