diff options
| author | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-16 23:37:50 -0400 |
| commit | 389e307f205f9b7edf604fb9f86e1038ead736ef (patch) | |
| tree | 595095b5877cc2b0513d31fb126303d8796cc311 /internal/game/color.go | |
| parent | 085e728d22a3369bd110b77409914cfbe9ebe611 (diff) | |
| download | thehouseoficarus-389e307f205f9b7edf604fb9f86e1038ead736ef.tar.gz | |
feat: major xterm256 color overhaul, see worldbuilding docs.
Diffstat (limited to 'internal/game/color.go')
| -rw-r--r-- | internal/game/color.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/internal/game/color.go b/internal/game/color.go index f93f097..4fd8000 100644 --- a/internal/game/color.go +++ b/internal/game/color.go @@ -1,11 +1,11 @@ package game import ( - "thirdcollapse/internal/color" - "thirdcollapse/internal/config" - "thirdcollapse/internal/net" - "thirdcollapse/internal/object" - "thirdcollapse/internal/player" + "thehouseoficarus/internal/color" + "thehouseoficarus/internal/config" + "thehouseoficarus/internal/net" + "thehouseoficarus/internal/object" + "thehouseoficarus/internal/player" ) func (g *Game) colorMode(sess *net.Session) string { @@ -19,7 +19,7 @@ func (g *Game) resolveColor(sess *net.Session, category string) color.ColorSpec if sess.Account != nil && sess.Account.Colors != nil { if val, ok := sess.Account.Colors[category]; ok { if val == "off" { - return color.ColorSpec{} + return color.NoColor() } if val != "" { return color.Parse(val) @@ -34,7 +34,7 @@ func (g *Game) resolveColor(sess *net.Session, category string) color.ColorSpec if val, ok := config.DefaultColors()[category]; ok && val != "" { return color.Parse(val) } - return color.ColorSpec{} + return color.NoColor() } func (g *Game) colorize(sess *net.Session, category, text string) string { @@ -46,15 +46,15 @@ func levelColorSpec(myLevel, theirLevel int) color.ColorSpec { diff := theirLevel - myLevel switch { case diff == 0: - return color.Parse("fg=white") + return color.Parse("7") case diff > 0 && diff < 5: - return color.Parse("fg=bright_yellow") + return color.Parse("11") case diff >= 5: - return color.Parse("fg=bright_red") + return color.Parse("9") case diff < 0 && diff > -5: - return color.Parse("fg=yellow") + return color.Parse("3") default: - return color.Parse("fg=green") + return color.Parse("2") } } |
