From 2b5d8f595f96a2864899f4c7e28bc06fa52d2603 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 18 Jul 2026 04:44:50 -0400 Subject: feat: expose all colors in config.yaml for easier theming --- internal/game/look_entities.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'internal/game/look_entities.go') diff --git a/internal/game/look_entities.go b/internal/game/look_entities.go index c1befe3..dd2cdf0 100644 --- a/internal/game/look_entities.go +++ b/internal/game/look_entities.go @@ -37,7 +37,7 @@ func (g *Game) showRoomMobs(sess *net.Session, p *player.Player, room *world.Roo } hp = fmt.Sprintf(" [%d%% complete]", pct) } else { - hp = fmt.Sprintf(" [%s/%dhp]", color.Render(g.colorMode(sess), color.Parse("A7"), fmt.Sprint(m.HP)), m.MaxHP) + hp = fmt.Sprintf(" [%s/%dhp]", g.colorizeConstant(sess, "mob_hp_inline", fmt.Sprint(m.HP)), m.MaxHP) } } var desc string @@ -103,13 +103,16 @@ func (g *Game) showRoomObjects(sess *net.Session, p *player.Player, room *world. var godPrefix string if p.GodMode { var tags []string + tagLabel := func(t string) string { + return color.Render(g.colorMode(sess), g.resolveConstant(sess, "god_tag_label"), t) + } if isLocal { - tags = append(tags, color.Render(g.colorMode(sess), color.ColorSpec{Fg: -1, Bold: true}, "[LOCAL]")) + tags = append(tags, tagLabel("[LOCAL]")) } else { - tags = append(tags, color.Render(g.colorMode(sess), color.ColorSpec{Fg: -1, Bold: true}, "[GLOBAL]")) + tags = append(tags, tagLabel("[GLOBAL]")) } if def.Hidden { - tags = append(tags, color.Render(g.colorMode(sess), color.ColorSpec{Fg: -1, Bold: true}, "(HIDDEN)")) + tags = append(tags, tagLabel("(HIDDEN)")) } godPrefix = strings.Join(tags, " ") + " " } -- cgit v1.2.3