diff options
| author | historia <[not public]> | 2026-09-24 18:46:18 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-24 18:46:18 -0400 |
| commit | f606db40c3290fd9ce40b53ef9bbe135b1e6f6e2 (patch) | |
| tree | c2d70d17d748ecb9da1123d229006498ae050dae /internal/game/cmd_look.go | |
| parent | 91b466b6923d3eb1df1658199960fe7aa6db36dc (diff) | |
| download | thehouseoficarus-f606db40c3290fd9ce40b53ef9bbe135b1e6f6e2.tar.gz | |
fix: tiny map alignment broke with certain characters
Diffstat (limited to 'internal/game/cmd_look.go')
| -rw-r--r-- | internal/game/cmd_look.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_look.go b/internal/game/cmd_look.go index 3e0bbc4..f01b83c 100644 --- a/internal/game/cmd_look.go +++ b/internal/game/cmd_look.go @@ -152,11 +152,11 @@ func (g *Game) writeLookSideBySide(sess *net.Session, p *player.Player, contentL if leftMap { sess.WriteLine(fmt.Sprintf("%s %s", mapLine, content)) } else { - pad := mapWidth + (len(content) - visibleLen(content)) + pad := mapWidth - visibleLen(content) if pad < 0 { pad = 0 } - sess.WriteLine(fmt.Sprintf("%-*s %s", pad, content, mapLine)) + sess.WriteLine(content + strings.Repeat(" ", pad) + " " + mapLine) } } else { sess.WriteLine(content) |
