aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_get.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_get.go')
-rw-r--r--internal/game/cmd_get.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_get.go b/internal/game/cmd_get.go
index f2776a3..bc48394 100644
--- a/internal/game/cmd_get.go
+++ b/internal/game/cmd_get.go
@@ -276,7 +276,7 @@ func (g *Game) doGetAll(sess *net.Session) {
if taken <= 0 {
continue
}
- p.Credits += taken
+ g.grantCredits(p, taken)
if taken == 1 {
picked = append(picked, "1 credit")
} else {
@@ -378,7 +378,7 @@ func (g *Game) pickupCredits(sess *net.Session, p *player.Player, itemID string)
if qty <= 0 {
return
}
- p.Credits += qty
+ g.grantCredits(p, qty)
g.saveCharacter(p)
if qty == 1 {
sess.WriteLine(g.colorize(sess, "currency_pickup", "You pick up 1 credit."))