diff options
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, " ") + " " } |
