aboutsummaryrefslogtreecommitdiff
path: root/internal/game/color.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/color.go')
-rw-r--r--internal/game/color.go24
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")
}
}