aboutsummaryrefslogtreecommitdiff
path: root/internal/object/item.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/object/item.go')
-rw-r--r--internal/object/item.go24
1 files changed, 9 insertions, 15 deletions
diff --git a/internal/object/item.go b/internal/object/item.go
index ecdb1e9..7b2a107 100644
--- a/internal/object/item.go
+++ b/internal/object/item.go
@@ -34,7 +34,6 @@ type ItemDef struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Color string `yaml:"color"`
- Aliases []string `yaml:"aliases"`
Description string `yaml:"description"`
Value int `yaml:"value"`
Stackable bool `yaml:"stackable"`
@@ -53,6 +52,14 @@ type ItemDef struct {
SearchMiscTable string `yaml:"search_misc_table"`
SearchTicks float64 `yaml:"search_ticks"`
SearchMessage string `yaml:"search_message"`
+ HealValue int `yaml:"heal_value"`
+ EatMessage string `yaml:"eat_message"`
+ MadeFrom []MadeFromEntry `yaml:"made_from,omitempty"`
+}
+
+type MadeFromEntry struct {
+ Items []string `yaml:"items"`
+ Qty int `yaml:"qty"`
}
type ItemStats struct {
@@ -71,18 +78,5 @@ func (d *ItemDef) MatchesName(input string) bool {
if strings.ToLower(d.Name) == lower {
return true
}
- for _, alias := range d.Aliases {
- if strings.ToLower(alias) == lower {
- return true
- }
- }
- if world.WordPrefixMatch(lower, d.Name) {
- return true
- }
- for _, alias := range d.Aliases {
- if world.WordPrefixMatch(lower, alias) {
- return true
- }
- }
- return false
+ return world.WordPrefixMatch(lower, d.Name)
}