diff options
| author | historia <[not public]> | 2026-07-01 02:21:42 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-01 02:21:42 -0400 |
| commit | 5f37dc9b6f6b79da04da70ae0c33ec8d02998587 (patch) | |
| tree | f7c309e36267a4c456fcf5bca800e614507a80af /internal/game/cmd_verbs.go | |
| parent | fee376102192dc6f24297a7b11324636ace3a07d (diff) | |
| download | thehouseoficarus-5f37dc9b6f6b79da04da70ae0c33ec8d02998587.tar.gz | |
feat: qol improvements to items crud in admin gui
Diffstat (limited to 'internal/game/cmd_verbs.go')
| -rw-r--r-- | internal/game/cmd_verbs.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/game/cmd_verbs.go b/internal/game/cmd_verbs.go index 70b2fb2..cad90c5 100644 --- a/internal/game/cmd_verbs.go +++ b/internal/game/cmd_verbs.go @@ -90,12 +90,17 @@ func (g *Game) executeVerbs(sess *net.Session, args []string, rawInput string) { if len(recipes) > 0 { addUnique(§ionObjs, &seen, "use "+name) for _, r := range recipes { - if info, ok := productionTypes[r.FirstCraft().Type]; ok { + c := r.FirstCraft() + key := c.Subtype + if key == "" { + key = c.Type + } + if info, ok := productionTypes[key]; ok { if info.ActionType != behavior.TypeCombine && info.ActionType != behavior.TypeFletch && info.ActionType != behavior.TypeMix { addUnique(§ionObjs, &seen, string(info.ActionType)) } } - for _, c := range r.FirstCraft().Consume { + for _, c := range r.FirstCraft().Ingredients { for _, itemID := range c.Items { if itemDef, err := g.ItemStore.Load(itemID); err == nil { addUnique(§ionObjs, &seen, "use "+itemDef.Name+" on "+name) |
