Skip to content

Commit 196829c

Browse files
committed
✨(core/scoreboard)增加特殊前缀,供客户端识别
1 parent bbcba21 commit 196829c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

scripts/coreMindustry/scoreboard.kts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import arc.util.Align
44
import java.time.Duration
55

66
val defaultTemplate = """
7-
[sky]欢迎 {cV}{player.name} [sky]
7+
{magic}[sky]欢迎 {cV}{player.name} [sky]
88
{cK}当前地图: {cV}[{map.id}]{map.name}
99
{cK}游戏时间: {cV}{state.gameTime 分钟}
1010
{listPrefix scoreboard.ext|joinLines}
@@ -14,10 +14,15 @@ val defaultTemplate = """
1414

1515
val template by config.key(
1616
defaultTemplate, "积分榜模板",
17-
"其中{cK}{cV}{cA}为颜色变量,{listPrefix xx}行供其他插件动态扩展"
17+
"其中{cK}{cV}{cA}为颜色变量,{listPrefix xx}行供其他插件动态扩展。",
18+
"开头{magic}会被替换特殊颜色,供MDTX客户端识别",
1819
)
1920
//Color变量 cK - KEY, cV - VALUE, cA - ACTION
20-
val msg get() = template.with("cK" to "[gray]", "cV" to "[lightgray]", "cA" to "[slate]")
21+
val msg
22+
get() = template.with(
23+
"magic" to "[#FEBBEF][]",//供MDTX识别
24+
"cK" to "[gray]", "cV" to "[lightgray]", "cA" to "[slate]",
25+
)
2126

2227
val disabled = mutableSetOf<String>()
2328

0 commit comments

Comments
 (0)