From 1dad15698845d370e998f7cc5feb8aece3fab58f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 17:05:17 -0400 Subject: refactor: remove dead code, consolidate save/error handling, add lint gate --- internal/game/render_combat.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'internal/game/render_combat.go') 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} } -- cgit v1.2.3