You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
727 B
33 lines
727 B
package script
|
|
|
|
import (
|
|
"git.aiterp.net/lucifer3/server/effects"
|
|
)
|
|
|
|
type Script struct {
|
|
Name string `json:"name,omitempty"`
|
|
Lines []Line `json:"lines,omitempty"`
|
|
}
|
|
|
|
type Line struct {
|
|
If *LineIf `json:"if,omitempty"`
|
|
Assign *LineAssign `json:"assign,omitempty"`
|
|
Set *LineSet `json:"set,omitempty"`
|
|
}
|
|
|
|
type LineSet struct {
|
|
Scope string `json:"scope"`
|
|
Key string `json:"key"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
type LineAssign struct {
|
|
Match string `json:"match,omitempty"`
|
|
Effect effects.Serializable `json:"effect"`
|
|
}
|
|
|
|
type LineIf struct {
|
|
Condition *Condition `json:"condition,omitempty"`
|
|
Then []Line `json:"then,omitempty"`
|
|
Else []Line `json:"else,omitempty"`
|
|
}
|