diff options
| author | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-19 18:20:26 -0400 |
| commit | 0ea4eec5dd2122c6704216971eb1249276297867 (patch) | |
| tree | 430fbbef04e837820f1d031c190f52ecd6112e25 /internal/game/cmd_bank.go | |
| parent | 3a58125d14bb307f861b38c6c5b0a63babde7e08 (diff) | |
| download | thehouseoficarus-0ea4eec5dd2122c6704216971eb1249276297867.tar.gz | |
shop fixes, 'toggle' completely removed, movement speed increased
Diffstat (limited to 'internal/game/cmd_bank.go')
| -rw-r--r-- | internal/game/cmd_bank.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go index ff3a3ac..0785b81 100644 --- a/internal/game/cmd_bank.go +++ b/internal/game/cmd_bank.go @@ -5,9 +5,9 @@ import ( "sort" "strings" + "thehouseoficarus/internal/action" "thehouseoficarus/internal/net" "thehouseoficarus/internal/player" - "thehouseoficarus/internal/world" ) func (g *Game) handleBankInput(sess *net.Session, input string) { @@ -57,7 +57,7 @@ func (g *Game) writeBankPrompt(sess *net.Session) { } func (g *Game) showBankBrowse(sess *net.Session) { - p, _ := sess.Player.(*player.Player) + p := sess.Player unicode := p.OptionBool("unicode") @@ -110,7 +110,7 @@ func (g *Game) showBankBrowse(sess *net.Session) { } func (g *Game) doBankDeposit(sess *net.Session, input string) { - p, _ := sess.Player.(*player.Player) + p := sess.Player matches := g.findInventoryMatches(input, p) if len(matches) == 0 { @@ -158,7 +158,7 @@ func (g *Game) doBankDeposit(sess *net.Session, input string) { } func (g *Game) doBankDepositAll(sess *net.Session) { - p, _ := sess.Player.(*player.Player) + p := sess.Player var deposited int for i := 0; i < 28; i++ { @@ -187,7 +187,7 @@ func (g *Game) doBankDepositAll(sess *net.Session) { } func (g *Game) doBankWithdraw(sess *net.Session, input string) { - p, _ := sess.Player.(*player.Player) + p := sess.Player freeSlot := p.FirstFreeSlot() if freeSlot == -1 { @@ -235,7 +235,7 @@ func (g *Game) doBankWithdraw(sess *net.Session, input string) { } lower := strings.ToLower(input) for _, e := range entries { - if world.WordPrefixMatch(e.name, lower) { + if action.WordPrefixMatch(e.name, lower) { matches = append(matches, e) } } @@ -326,7 +326,7 @@ func (g *Game) canUseBank(p *player.Player) bool { } func (g *Game) doBank(sess *net.Session) { - p, _ := sess.Player.(*player.Player) + p := sess.Player if !g.canUseBank(p) { sess.WriteLine("There is no bank here.") |
