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.

21 lines
494 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. package commands
  2. import (
  3. "fmt"
  4. lucifer3 "git.aiterp.net/lucifer3/server"
  5. "github.com/google/uuid"
  6. )
  7. type Assign struct {
  8. ID *uuid.UUID `json:"id"`
  9. Match string `json:"match"`
  10. Effect lucifer3.Effect `json:"effect"`
  11. }
  12. func (c Assign) CommandDescription() string {
  13. if c.ID != nil {
  14. return fmt.Sprintf("Assign(%s, %s, id=%s)", c.Match, c.Effect.EffectDescription(), *c.ID)
  15. } else {
  16. return fmt.Sprintf("Assign(%s, %s)", c.Match, c.Effect.EffectDescription())
  17. }
  18. }