aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act_effects.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-16 19:57:45 -0400
committerhistoria <[not public]>2026-09-16 19:57:45 -0400
commit6ef40a5739f1723ec26cc32dfc48fe764f776dca (patch)
treee215a4dc96ea639bcea07bb589aae3e31c3609bb /internal/game/act_effects.go
parent1dad15698845d370e998f7cc5feb8aece3fab58f (diff)
downloadthehouseoficarus-6ef40a5739f1723ec26cc32dfc48fe764f776dca.tar.gz
fix: durable payouts survive journal failure, cap bank withdrawals, hash passwords off the owner loop.
Diffstat (limited to 'internal/game/act_effects.go')
-rw-r--r--internal/game/act_effects.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/act_effects.go b/internal/game/act_effects.go
index 4438eb6..cae54a5 100644
--- a/internal/game/act_effects.go
+++ b/internal/game/act_effects.go
@@ -169,7 +169,7 @@ func (g *Game) applyStep(sess *net.Session, p *player.Player, step *behavior.Ste
sess.WriteLine(fmt.Sprintf("You don't have enough credits. (Need %d, have %d)", -step.Credits, p.Credits))
}
} else {
- p.Credits += step.Credits
+ g.grantCredits(p, step.Credits)
g.saveCharacter(p)
}
}
@@ -226,7 +226,7 @@ func (g *Game) giveTriggerDrop(sess *net.Session, p *player.Player, drop *behavi
}
if drop.ItemID == "credits" {
- p.Credits += qty
+ g.grantCredits(p, qty)
if sess != nil {
sess.WriteLine(fmt.Sprintf("You receive %d credits.", qty))
}