Skip to content

Commit e6ff3fd

Browse files
committed
🚚(core/scoreboard) 纠正命名
1 parent ccd0471 commit e6ff3fd

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

scripts/coreMindustry/contentsTweaker.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CTHello(val player: Player, val version: String) : Event {
2626
companion object : Event.Handler()
2727
}
2828

29-
registerVar("scoreBroad.ext.contentsVersion", "ContentsTweaker状态显示", DynamicVar {
29+
registerVar("scoreboard.ext.contentsVersion", "ContentsTweaker状态显示", DynamicVar {
3030
val patches = patches ?: return@DynamicVar null
3131
val player = VarToken("receiver").get() as? Player
3232
buildString {
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,27 @@ val msg = """
99
[magenta]欢迎[goldenrod]{player.name}[magenta]来到WZ服务器[red](请在语言文件中修改)
1010
[violet]当前地图为: [yellow][{map.id}][orange]{map.name}
1111
[violet]本局游戏时间: [orange]{state.gameTime 分钟}
12+
{listPrefix scoreboard.ext|joinLines}
1213
{listPrefix scoreBroad.ext|joinLines}
1314
[violet]本局游戏时间: [orange]{state.gameTime:分钟}
1415
[royal]输入/broad可以开关该显示
1516
""".trimIndent()
1617

1718
val disabled = mutableSetOf<String>()
1819

19-
command("broad", "开关积分板显示") {
20-
this.type = CommandType.Client
20+
command("board", "开关积分板显示") {
21+
aliases = listOf("broad", "scoreboard")
22+
attr(ClientOnly)
2123
body {
2224
if (!disabled.remove(player!!.uuid()))
2325
disabled.add(player!!.uuid())
2426
reply("[green]切换成功".with())
2527
}
2628
}
2729

28-
//避免找不到 scoreBroad.ext.* 变量
29-
registerVar("scoreBroad.ext.null", "空占位", null)
30+
//避免找不到 scoreboard.ext.* 变量
31+
registerVar("scoreboard.ext.null", "空占位", null)
32+
registerVar("scoreBroad.ext.null", "空占位(兼容)", null)
3033

3134
onEnable {
3235
loop(Dispatchers.game) {

scripts/metadata/coreMindustry.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ID coreMindustry/menu
3030
FQ_NAME coreMindustry.Menu
3131
+DEPENDS coreMindustry module
3232

33-
ID coreMindustry/scorebroad
34-
FQ_NAME coreMindustry.Scorebroad
33+
ID coreMindustry/scoreboard
34+
FQ_NAME coreMindustry.Scoreboard
3535
+DEPENDS coreMindustry module
3636

3737
ID coreMindustry/utilMapRule

scripts/wayzer/vote.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ listen<EventType.PlayerChatEvent> {
3333

3434
listen<EventType.ResetEvent> { VoteEvent.coolDowns.clear() }
3535

36-
registerVar("scoreBroad.ext.vote", "投票状态显示", DynamicVar {
36+
registerVar("scoreboard.ext.vote", "投票状态显示", DynamicVar {
3737
VoteEvent.active.get()?.run {
3838
"[violet]投票[orange]{desc}: {status} [violet]\uE867{left 秒}".with(
3939
"desc" to voteDesc,

0 commit comments

Comments
 (0)