new and improved Resolver.
This commit is contained in:
+10
-20
@@ -2,32 +2,22 @@ package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/internal/formattools"
|
||||
)
|
||||
|
||||
type SetName struct {
|
||||
ID string
|
||||
Name string
|
||||
type AddAlias struct {
|
||||
Match string
|
||||
Alias string
|
||||
}
|
||||
|
||||
func (c SetName) CommandDescription() string {
|
||||
return fmt.Sprintf("SetName(%v, %s)", c.ID, c.Name)
|
||||
func (c AddAlias) CommandDescription() string {
|
||||
return fmt.Sprintf("AddAlias(%v, %v)", c.Match, c.Alias)
|
||||
}
|
||||
|
||||
type AddTag struct {
|
||||
IDs []string
|
||||
Tag string
|
||||
type RemoveAlias struct {
|
||||
Match string
|
||||
Alias string
|
||||
}
|
||||
|
||||
func (c AddTag) CommandDescription() string {
|
||||
return fmt.Sprintf("AddTag(%v, %s)", formattools.CompactIDList(c.IDs), c.Tag)
|
||||
}
|
||||
|
||||
type RemoveTag struct {
|
||||
IDs []string
|
||||
Tag string
|
||||
}
|
||||
|
||||
func (c RemoveTag) CommandDescription() string {
|
||||
return fmt.Sprintf("RemoveTag(%v, %s)", formattools.CompactIDList(c.IDs), c.Tag)
|
||||
func (c RemoveAlias) CommandDescription() string {
|
||||
return fmt.Sprintf("RemoveAlias(%v, %v)", c.Match, c.Alias)
|
||||
}
|
||||
|
||||
+5
-6
@@ -2,22 +2,21 @@ package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/internal/formattools"
|
||||
)
|
||||
|
||||
type ReplaceScene struct {
|
||||
IDs []string `json:"ids"`
|
||||
SceneID int64 `json:"sceneId"`
|
||||
Match string `json:"match"`
|
||||
SceneID int64 `json:"sceneId"`
|
||||
}
|
||||
|
||||
func (c ReplaceScene) CommandDescription() string {
|
||||
return fmt.Sprintf("ReplaceScene(%v, %d)", formattools.CompactIDList(c.IDs), c.SceneID)
|
||||
return fmt.Sprintf("ReplaceScene(%v, %d)", c.Match, c.SceneID)
|
||||
}
|
||||
|
||||
type ClearScene struct {
|
||||
IDs []string `json:"ids"`
|
||||
Match string `json:"match"`
|
||||
}
|
||||
|
||||
func (c ClearScene) CommandDescription() string {
|
||||
return fmt.Sprintf("ClearScene(%v)", formattools.CompactIDList(c.IDs))
|
||||
return fmt.Sprintf("ClearScene(%v)", c.Match)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user