aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_bank.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:31:50 -0400
committerhistoria <[not public]>2026-10-05 17:31:50 -0400
commit516fd29da423432ef6dfded21a984f1d15dcab1a (patch)
treeeb2dabe325a1335dedac28a93453df643ef986f2 /internal/game/cmd_bank.go
parente42952469dadfb3535633c66c881050ac128703c (diff)
downloadthehouseoficarus-516fd29da423432ef6dfded21a984f1d15dcab1a.tar.gz
fix: slop casino and economy fixes
Diffstat (limited to 'internal/game/cmd_bank.go')
-rw-r--r--internal/game/cmd_bank.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go
index bb03869..76fefb7 100644
--- a/internal/game/cmd_bank.go
+++ b/internal/game/cmd_bank.go
@@ -265,10 +265,15 @@ func (g *Game) doBankWithdraw(sess *net.Session, input string) {
return
}
- for _, e := range entries {
- def, _ := g.ItemStore.Load(e.id)
- if def != nil && def.MatchesName(input) {
- matches = append(matches, e)
+ // Only fall back to fuzzy MatchesName when the prefix pass found nothing;
+ // running it unconditionally appended the same entries twice and printed a
+ // duplicated ambiguity list.
+ if len(matches) == 0 {
+ for _, e := range entries {
+ def, _ := g.ItemStore.Load(e.id)
+ if def != nil && def.MatchesName(input) {
+ matches = append(matches, e)
+ }
}
}