diff options
| author | historia <[not public]> | 2026-07-18 04:44:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-18 04:44:50 -0400 |
| commit | 2b5d8f595f96a2864899f4c7e28bc06fa52d2603 (patch) | |
| tree | f1539db865d9968414e59d9b250861c1b356d627 /internal/game/look_entities.go | |
| parent | db8ca1fe26a36b78074a424ae657b2cbb9b3af19 (diff) | |
| download | thehouseoficarus-2b5d8f595f96a2864899f4c7e28bc06fa52d2603.tar.gz | |
feat: expose all colors in config.yaml for easier theming
Diffstat (limited to 'internal/game/look_entities.go')
| -rw-r--r-- | internal/game/look_entities.go | 11 |
1 files changed, 7 insertions, 4 deletions
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, " ") + " " } |
