aboutsummaryrefslogtreecommitdiff
path: root/internal/item/item.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-09 05:27:10 -0400
committerhistoria <[not public]>2026-07-09 05:27:10 -0400
commitc705ae942573984784ef501bf8198f61f5206ddd (patch)
treec964066f3a244002bf75cb50a877630f46496f81 /internal/item/item.go
parent74153c7814fc4cef988066ef04e38731a943bc12 (diff)
downloadthehouseoficarus-c705ae942573984784ef501bf8198f61f5206ddd.tar.gz
refactor: simplify yaml, remove support for old scalar fields
Diffstat (limited to 'internal/item/item.go')
-rw-r--r--internal/item/item.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/internal/item/item.go b/internal/item/item.go
index 93f736b..1536006 100644
--- a/internal/item/item.go
+++ b/internal/item/item.go
@@ -1,10 +1,8 @@
package item
import (
- "fmt"
"strings"
- "gopkg.in/yaml.v3"
"thehouseoficarus/internal/behavior"
)
@@ -216,21 +214,6 @@ func (d *ItemDef) Stats() ItemStats {
type CraftList []CraftDef
-func (cl *CraftList) UnmarshalYAML(value *yaml.Node) error {
- switch value.Kind {
- case yaml.SequenceNode:
- return value.Decode((*[]CraftDef)(cl))
- case yaml.MappingNode:
- var single CraftDef
- if err := value.Decode(&single); err != nil {
- return err
- }
- *cl = []CraftDef{single}
- return nil
- }
- return fmt.Errorf("craft: expected mapping or sequence")
-}
-
func (d *ItemDef) FirstCraft() *CraftDef {
if len(d.Craft) == 0 {
return nil