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.

39 lines
858 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. Select *LineSelect `json:"select,omitempty"`
  14. }
  15. type LineSet struct {
  16. Scope string `json:"scope"`
  17. Key string `json:"key"`
  18. Value string `json:"value"`
  19. }
  20. type LineAssign struct {
  21. Match string `json:"match,omitempty"`
  22. Effect effects.Serializable `json:"effect"`
  23. }
  24. type LineIf struct {
  25. Condition *Condition `json:"condition,omitempty"`
  26. Then []Line `json:"then,omitempty"`
  27. Else []Line `json:"else,omitempty"`
  28. }
  29. type LineSelect struct {
  30. Match string `json:"match"`
  31. Then []Line `json:"then"`
  32. }