diff options
Diffstat (limited to 'internal/behavior/behavior.go')
| -rw-r--r-- | internal/behavior/behavior.go | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/internal/behavior/behavior.go b/internal/behavior/behavior.go index 69b91cd..58b5e6b 100644 --- a/internal/behavior/behavior.go +++ b/internal/behavior/behavior.go @@ -1,7 +1,5 @@ package behavior -import "gopkg.in/yaml.v3" - type GatherConfig struct { Skill string `yaml:"skill"` Tools []string `yaml:"tools"` @@ -106,8 +104,7 @@ func (s StepAction) IsTimed() bool { } // SpawnMobConfig configures a transient mob spawned by a trigger or on_enter -// step. It accepts either a bare string (the mob id) or a full map at -// unmarshal time. +// step. The mob id is required; other fields are optional. type SpawnMobConfig struct { ID string `yaml:"id"` OwnerOnly bool `yaml:"owner_only"` @@ -116,19 +113,6 @@ type SpawnMobConfig struct { DespawnTicks float64 `yaml:"despawn_ticks"` } -func (s *SpawnMobConfig) UnmarshalYAML(value *yaml.Node) error { - if value.Kind == yaml.ScalarNode { - var id string - if err := value.Decode(&id); err != nil { - return err - } - s.ID = id - return nil - } - type raw SpawnMobConfig - return value.Decode((*raw)(s)) -} - // ShopConfig is a root-level mob property (mob YAML `shop:`). Buy prices are // always 100% of the item's value; sell prices follow the OSRS store formula: // |
