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

  1. package script
  2. import (
  3. "git.aiterp.net/lucifer3/server/effects"
  4. )
  5. type Script struct {
  6. Name string `json:"name,omitempty"`
  7. Lines []Line `json:"lines,omitempty"`
  8. }
  9. type Line struct {
  10. If *LineIf `json:"if,omitempty"`
  11. Assign *LineAssign `json:"assign,omitempty"`
  12. Set *LineSet `json:"set,omitempty"`
  13. }
  14. type LineSet struct {
  15. Scope string `json:"scope"`
  16. Key string `json:"key"`
  17. Value string `json:"value"`
  18. }
  19. type LineAssign struct {
  20. Match string `json:"match,omitempty"`
  21. Effect effects.Serializable `json:"effect"`
  22. }
  23. type LineIf struct {
  24. Condition *Condition `json:"condition,omitempty"`
  25. Then []Line `json:"then,omitempty"`
  26. Else []Line `json:"else,omitempty"`
  27. }