From 4cc1ddcd185509080b4b3e15d1646567edd51c9d Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 15 Jun 2026 02:57:35 -0400 Subject: removed game speed for being broken and an antifeature anyway. added color support. --- internal/game/color.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 internal/game/color.go (limited to 'internal/game/color.go') diff --git a/internal/game/color.go b/internal/game/color.go new file mode 100644 index 0000000..45df212 --- /dev/null +++ b/internal/game/color.go @@ -0,0 +1,22 @@ +package game + +import ( + "thirdcollapse/internal/color" + "thirdcollapse/internal/net" + "thirdcollapse/internal/player" +) + +func (g *Game) colorMode(sess *net.Session) string { + if p, ok := sess.Player.(*player.Player); ok && p != nil { + return p.OptionString("color") + } + return "none" +} + +func (g *Game) colorize(sess *net.Session, name, text string) string { + return color.Wrap(g.colorMode(sess), name, text) +} + +func (g *Game) colorTag(sess *net.Session, text string) string { + return color.Tag(g.colorMode(sess), text) +} -- cgit v1.2.3