aboutsummaryrefslogtreecommitdiff
path: root/internal/game/render_combat.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/render_combat.go')
-rw-r--r--internal/game/render_combat.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/game/render_combat.go b/internal/game/render_combat.go
index 4055b4d..24e5d01 100644
--- a/internal/game/render_combat.go
+++ b/internal/game/render_combat.go
@@ -33,13 +33,13 @@ func (g *Game) renderBarGeneric(sess *net.Session, current, max int, prefix stri
var spec color.ColorSpec
switch {
case pct >= 0.7:
- spec = g.resolveConstant(sess, prefix+"_high")
+ spec = g.resolveConstant(prefix + "_high")
case pct >= 0.4:
- spec = g.resolveConstant(sess, prefix+"_med")
+ spec = g.resolveConstant(prefix + "_med")
default:
- spec = g.resolveConstant(sess, prefix+"_low")
+ spec = g.resolveConstant(prefix + "_low")
}
- empty := g.resolveConstant(sess, "hp_bar_empty")
+ empty := g.resolveConstant("hp_bar_empty")
unicode := sess.Player != nil && sess.Player.OptionBool("unicode")
style := &ui.BarStyle{FilledColor: spec.Fg, EmptyColor: empty.Fg, EmptyDim: empty.Dim}
@@ -50,19 +50,19 @@ func (g *Game) renderBarGeneric(sess *net.Session, current, max int, prefix stri
// hpBarStyle returns the per-tier fill/empty color spec for an HP bar at the
// given ratio (high>=70%, med>=40%, low<40%). Colors come from the
// constant_colors map (hp_bar_high/med/low/empty).
-func (g *Game) hpBarStyle(sess *net.Session, current, max int) *ui.BarStyle {
+func (g *Game) hpBarStyle(current, max int) *ui.BarStyle {
if max <= 0 {
max = 1
}
pct := float64(current) / float64(max)
- spec := g.resolveConstant(sess, "hp_bar_low")
+ spec := g.resolveConstant("hp_bar_low")
switch {
case pct >= 0.7:
- spec = g.resolveConstant(sess, "hp_bar_high")
+ spec = g.resolveConstant("hp_bar_high")
case pct >= 0.4:
- spec = g.resolveConstant(sess, "hp_bar_med")
+ spec = g.resolveConstant("hp_bar_med")
}
- empty := g.resolveConstant(sess, "hp_bar_empty")
+ empty := g.resolveConstant("hp_bar_empty")
return &ui.BarStyle{FilledColor: spec.Fg, EmptyColor: empty.Fg, EmptyDim: empty.Dim}
}