aboutsummaryrefslogtreecommitdiff
path: root/internal/game/act_effects.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-08-03 17:15:50 -0400
committerhistoria <[not public]>2026-08-03 17:15:50 -0400
commita2cbc04f86508708daa09affa5e9d73cc689b2ba (patch)
tree0d0c6c7fbf4a775faaf5e9dd700157b883882638 /internal/game/act_effects.go
parentadda27dba5bf7bf1dee62159f0cbc0bd90734751 (diff)
downloadthehouseoficarus-a2cbc04f86508708daa09affa5e9d73cc689b2ba.tar.gz
feat: new color 'command', color tag system implemented
Diffstat (limited to 'internal/game/act_effects.go')
-rw-r--r--internal/game/act_effects.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/internal/game/act_effects.go b/internal/game/act_effects.go
index d1effac..a49bd84 100644
--- a/internal/game/act_effects.go
+++ b/internal/game/act_effects.go
@@ -5,7 +5,6 @@ import (
"strconv"
"thehouseoficarus/internal/behavior"
- "thehouseoficarus/internal/color"
"thehouseoficarus/internal/net"
"thehouseoficarus/internal/player"
)
@@ -75,8 +74,7 @@ func (g *Game) applyStep(sess *net.Session, p *player.Player, step *behavior.Ste
if step.Broadcast != "" {
raw := expandTemplate(step.Broadcast, playerName, flagValue)
for _, other := range g.Hub.PlayersInRoom(roomID) {
- otherMode := g.colorMode(other)
- rendered := color.ExpandTagsDefault(otherMode, broadcastSpec, raw)
+ rendered := g.expandTagsDefault(other, broadcastSpec, raw)
other.WriteLine(g.colorize(other, "broadcast", rendered))
}
}
@@ -86,8 +84,7 @@ func (g *Game) applyStep(sess *net.Session, p *player.Player, step *behavior.Ste
if other.Player == nil {
continue
}
- otherMode := g.colorMode(other)
- rendered := color.ExpandTagsDefault(otherMode, broadcastSpec, raw)
+ rendered := g.expandTagsDefault(other, broadcastSpec, raw)
other.WriteLine(g.colorize(other, "broadcast", rendered))
}
}
@@ -212,8 +209,7 @@ func (g *Game) writePlayerMessage(sess *net.Session, msg string, playerName stri
}
rendered := expandTemplate(msg, playerName, flagValue)
seqSpec := g.resolveColor(sess, "sequence")
- mode := g.colorMode(sess)
- rendered = color.ExpandTagsDefault(mode, seqSpec, rendered)
+ rendered = g.expandTagsDefault(sess, seqSpec, rendered)
sess.WriteLine(rendered)
}