From 085e728d22a3369bd110b77409914cfbe9ebe611 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 16 Jun 2026 04:17:43 -0400 Subject: feat: recipe system, combining items, cooking skill --- internal/object/item.go | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'internal/object/item.go') 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) } -- cgit v1.2.3