Add trigger linking, block weight computation via DFS

This commit is contained in:
Ian Gulliver
2026-02-23 22:54:48 -08:00
parent 7c1b2a8e7e
commit 165b9d1c6c
2 changed files with 63 additions and 3 deletions

View File

@@ -20,7 +20,8 @@ type Block struct {
Name string `json:"name"`
Loop bool `json:"loop,omitempty"`
weight int
weight int
triggers []*Trigger
}
type Trigger struct {
@@ -39,11 +40,15 @@ func (t *Trigger) String() string {
type TriggerSource struct {
Block string `json:"block"`
Signal string `json:"signal"`
block *Block
}
type TriggerTarget struct {
Block string `json:"block"`
Hook string `json:"hook"`
block *Block
}
func (block *Block) hasDefinedTiming() bool {