完善计分板、开发文档
This commit is contained in:
parent
460b39698a
commit
88445a4e8c
15
DEVDOC.md
15
DEVDOC.md
@ -18,7 +18,7 @@
|
||||
|
||||
### 事件模块
|
||||
- 通常由**进度**触发,触发后调用同名的事件标签
|
||||
- 将需要调用的函数填入`tags/functions/event/<事件名称>`标签即可
|
||||
- 在`tags/functions/event/<事件名称>`标签中注册触发时需要调用的函数即可
|
||||
|
||||
### 日志模块
|
||||
- 仓库中提供了日志相关的代码片段,位于`.vscode/settings.json`
|
||||
@ -64,9 +64,18 @@
|
||||
|
||||
#### 自定义计分板颜色
|
||||
- 数据包提供了所有计分板的全部16色命名函数
|
||||
- 使用方法:***覆盖***`tags/functions/module/scoreboard/`
|
||||
- 使用方法:**覆盖**`tags/functions/module/scoreboard/display/set_text/<计分板名称>`标签,填入`functions/module/scoreboard/display/set_text/<计分板名称>/<颜色名称>`函数
|
||||
|
||||
#### 自定义计分板名称
|
||||
|
||||
1. 定义一个设置计分板颜色、文本的函数,格式可以参考`functions/module/scoreboard/display/set_text/general/aqua`函数
|
||||
2. **覆盖**`tags/functions/module/scoreboard/display/set_text/<计分板名称>`标签,填入上述函数
|
||||
|
||||
#### 扩展自己的计分板
|
||||
1. 定义一个创建计分板的函数,参考`functions/module/scoreboard/display/create`函数
|
||||
2. 在`tags/functions/module/scoreboard/display/create`标签中注册该函数
|
||||
3. 按照“自定义计分板颜色”和“自定义计分板名称”中的操作,定义你的计分板颜色和名称
|
||||
4. 定义一个生成计分板运行时id的函数,参考`functions/module/scoreboard/display/register_id`
|
||||
5. 在`tags/functions/module/scoreboard/display/register_id`标签中注册该函数
|
||||
6. 定义一个用来在轮播时显示你的计分板的函数,参考`functions/module/scoreboard/display/carousel/set_display/*`
|
||||
7. 定义一个用来判断在轮播时是否轮到你的计分板的函数,在判断后调用上一条中的函数,参考`functions/module/scoreboard/display/carousel/try_display/*`
|
||||
8. 将该函数注册到`tags/functions/module/scoreboard/display/try_display`标签中
|
||||
|
@ -0,0 +1,45 @@
|
||||
## 创建显示计分板
|
||||
### 轮播
|
||||
team add fz.module.scoreboard.display.carousel
|
||||
|
||||
## 主计分板
|
||||
###### 判据均为dummy,便于升级维护!
|
||||
|
||||
### 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.general dummy
|
||||
team add fz.module.scoreboard.display.general
|
||||
|
||||
### 活跃度
|
||||
scoreboard objectives add fz.module.scoreboard.display.activation dummy
|
||||
team add fz.module.scoreboard.display.activation
|
||||
|
||||
### 飞行距离
|
||||
scoreboard objectives add fz.module.scoreboard.display.aviating_distance dummy
|
||||
team add fz.module.scoreboard.display.aviating_distance
|
||||
|
||||
### 抖M榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.damage_taken dummy
|
||||
team add fz.module.scoreboard.display.damage_taken
|
||||
|
||||
### 死亡榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.death_count dummy
|
||||
team add fz.module.scoreboard.display.death_count
|
||||
|
||||
### 挖掘榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.dig_count dummy
|
||||
team add fz.module.scoreboard.display.dig_count
|
||||
|
||||
### 钓鱼榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.fishing_count dummy
|
||||
team add fz.module.scoreboard.display.fishing_count
|
||||
|
||||
### 击杀榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.kill_count dummy
|
||||
team add fz.module.scoreboard.display.kill_count
|
||||
|
||||
### 交易榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
|
||||
team add fz.module.scoreboard.display.trade_count
|
||||
|
||||
### 放置榜
|
||||
##### scoreboard objectives add fz.module.scoreboard.placement_count 需要穷举,暂不考虑
|
@ -0,0 +1,35 @@
|
||||
#### 注册活跃度计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.activation fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册飞行距离计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.aviating_distance fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册抖M榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.damage_taken fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册死亡榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.death_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册挖掘榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.dig_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册钓鱼榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.fishing_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册总榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.general fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册击杀榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.kill_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
||||
|
||||
#### 注册交易榜计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.trade_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.activation fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.aviating_distance fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.damage_taken fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.death_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.dig_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.fishing_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.general fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.kill_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,3 +0,0 @@
|
||||
#### 注册计分板id
|
||||
function #fz:calculation/highest_id_add_1
|
||||
scoreboard players operation fz.module.scoreboard.display.id.trade_count fz.variable.integer = fz.module.scoreboard.display.highest_id fz.variable.integer
|
@ -1,50 +1,6 @@
|
||||
# 调用者:#fz:module/scoreboard/install
|
||||
|
||||
|
||||
## 主计分板
|
||||
###### 判据均为dummy,便于升级维护!
|
||||
|
||||
### 轮播
|
||||
team add fz.module.scoreboard.display.carousel
|
||||
|
||||
### 总榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.general dummy
|
||||
team add fz.module.scoreboard.display.general
|
||||
|
||||
### 活跃度
|
||||
scoreboard objectives add fz.module.scoreboard.display.activation dummy
|
||||
team add fz.module.scoreboard.display.activation
|
||||
|
||||
### 飞行距离
|
||||
scoreboard objectives add fz.module.scoreboard.display.aviating_distance dummy
|
||||
team add fz.module.scoreboard.display.aviating_distance
|
||||
|
||||
### 抖M榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.damage_taken dummy
|
||||
team add fz.module.scoreboard.display.damage_taken
|
||||
|
||||
### 死亡榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.death_count dummy
|
||||
team add fz.module.scoreboard.display.death_count
|
||||
|
||||
### 挖掘榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.dig_count dummy
|
||||
team add fz.module.scoreboard.display.dig_count
|
||||
|
||||
### 钓鱼榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.fishing_count dummy
|
||||
team add fz.module.scoreboard.display.fishing_count
|
||||
|
||||
### 击杀榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.kill_count dummy
|
||||
team add fz.module.scoreboard.display.kill_count
|
||||
|
||||
### 交易榜
|
||||
scoreboard objectives add fz.module.scoreboard.display.trade_count dummy
|
||||
team add fz.module.scoreboard.display.trade_count
|
||||
|
||||
### 放置榜
|
||||
##### scoreboard objectives add fz.module.scoreboard.placement_count 需要穷举,暂不考虑
|
||||
function #fz:module/scoreboard/display/create
|
||||
|
||||
## 标记为已安装
|
||||
data modify storage fz:install_manager fz.module.scoreboard set value 1b
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/create"
|
||||
]
|
||||
}
|
@ -5,14 +5,6 @@
|
||||
],
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#fz:module/scoreboard/display/register_id/activation",
|
||||
"#fz:module/scoreboard/display/register_id/aviating_distance",
|
||||
"#fz:module/scoreboard/display/register_id/damage_taken",
|
||||
"#fz:module/scoreboard/display/register_id/death_count",
|
||||
"#fz:module/scoreboard/display/register_id/dig_count",
|
||||
"#fz:module/scoreboard/display/register_id/fishing_count",
|
||||
"#fz:module/scoreboard/display/register_id/general",
|
||||
"#fz:module/scoreboard/display/register_id/kill_count",
|
||||
"#fz:module/scoreboard/display/register_id/trade_count"
|
||||
"fz:module/scoreboard/display/register_id"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/activation"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/aviating_distance"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/damage_taken"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/death_count"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/dig_count"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/fishing_count"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/general"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/kill_count"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fz:module/scoreboard/display/register_id/trade_count"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user