Compare commits
15 Commits
v3.1.1.rc.1
...
v3.1.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 14f7fdc70c | |||
| 664735720f | |||
| 697957300b | |||
| 1c9f10261a | |||
| a3642694e8 | |||
| f2226d6c0e | |||
| 0c09cd467f | |||
| 4cd45d6ab1 | |||
| 3499fb0be3 | |||
| 0c93ee830c | |||
| 09fcbb7891 | |||
| e13ab7619c | |||
| cfbd6da92a | |||
| b3582c3bab | |||
| 2a96a9ee3a |
@@ -6,8 +6,6 @@
|
||||
|
||||
#### Copyright (C) 2019-2023 Harvey_Husky
|
||||
|
||||
[Bilibili专栏](https://www.bilibili.com/read/cv4267319)(年久失修)
|
||||
|
||||
## 安装教程
|
||||
|
||||
1. 兼容性
|
||||
@@ -17,16 +15,14 @@
|
||||
- `数据包 v2.1.x` 支持 `Minecraft 1.17.x-1.18.x`
|
||||
- `数据包 v2.0.x` 支持 `Minecraft 1.16.3-1.16.5`
|
||||
2. 前往[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)下载对应MC版本的数据包
|
||||
3. 从zip文件的 `scripts` 目录中挑选你需要的 `.sc` 文件
|
||||
4. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
5. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本
|
||||
6. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
7. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||
|
||||
3. 将数据包 `zip` 文件放入 `world/datapacks` 中(在客户端位于 `.minecraft/saves/<存档名>/datapacks`)
|
||||
4. (可选)下载并安装 [Carpet Mod **1.4.24**](https://github.com/gnembon/fabric-carpet/releases) 或以上版本
|
||||
5. (可选)从数据包 `zip` 文件的 `scripts` 目录中解压 `.sc` 文件,将其放入 `world/scripts` 中(在客户端位于 `.minecraft/saves/<存档名>/scripts` )
|
||||
6. 执行 `reload` 指令(或重新打开存档;在一些第三方服务端中可能需要改为`/minecraft:reload`)
|
||||
|
||||
# FZ生存数据包 3.1
|
||||
|
||||
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
||||
[](https://gitee.com/harvey-husky/FZ-sDatapack/releases) [](https://minecraft.net/)
|
||||
|
||||
> 其他版本见[发行页面](https://gitee.com/harvey-husky/FZ-sDatapack/releases)
|
||||
|
||||
@@ -40,18 +36,18 @@
|
||||
|
||||
- 提供下列计分板:
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 总榜 | fzsd.module.scoreboard.display.general |
|
||||
| 活跃度 | fzsd.module.scoreboard.display.activation |
|
||||
| 飞行距离 | fzsd.module.scoreboard.display.aviating_distance |
|
||||
| 抖M榜 | fzsd.module.scoreboard.display.damage_taken |
|
||||
| 死亡榜 | fzsd.module.scoreboard.display.death_count |
|
||||
| 挖掘榜 | fzsd.module.scoreboard.display.dig_count |
|
||||
| 钓鱼榜 | fzsd.module.scoreboard.display.fishing_count |
|
||||
| 击杀榜 | fzsd.module.scoreboard.display.kill_count |
|
||||
| 放置榜 | fzsd.module.scoreboard.display.placement_count |
|
||||
| 交易榜 | fzsd.module.scoreboard.display.trade_count |
|
||||
| 默认名称 | 计分板ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 总榜 | fzsd.module.scoreboard.display.general |
|
||||
| 活跃度 | fzsd.module.scoreboard.display.activation |
|
||||
| 飞行距离 | fzsd.module.scoreboard.display.aviating_distance |
|
||||
| 抖M榜 | fzsd.module.scoreboard.display.damage_taken |
|
||||
| 死亡榜 | fzsd.module.scoreboard.display.death_count |
|
||||
| 挖掘榜 | fzsd.module.scoreboard.display.dig_count |
|
||||
| 钓鱼榜 | fzsd.module.scoreboard.display.fishing_count |
|
||||
| 击杀榜 | fzsd.module.scoreboard.display.kill_count |
|
||||
| 放置榜 | fzsd.module.scoreboard.display.placement_count |
|
||||
| 交易榜 | fzsd.module.scoreboard.display.trade_count |
|
||||
|
||||
- 兼容[破基岩榜Mod](https://gitee.com/harvey-husky/yh-bbl)
|
||||
- 安装该Mod后,使用连点器破基岩,破基岩榜将自动显示在交互器页面
|
||||
@@ -60,6 +56,21 @@
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 破基岩榜 |fzsd.module.scoreboard.display.bedrock_broken_count|
|
||||
|
||||
- 系统总榜计分板:`fzsd.module.scoreboard.assign.general`
|
||||
- 可以在在此记分板修改总分数据,下次加分时会刷新显示分数
|
||||
- 总计分项名称对照表:
|
||||
|
||||
| 默认名称 | 计分板ID |
|
||||
| :------: | :----------------------------------------------: |
|
||||
| 总活跃时间 | fzsd.module.scoreboard.total.activation |
|
||||
| 总飞行距离 | fzsd.module.scoreboard.total.aviating_distance |
|
||||
| 总受伤害量 | fzsd.module.scoreboard.total.damage_taken |
|
||||
| 总死亡数 | fzsd.module.scoreboard.total.death_count |
|
||||
| 总挖掘量 | fzsd.module.scoreboard.total.dig_count |
|
||||
| 总钓鱼数 | fzsd.module.scoreboard.total.fishing_count |
|
||||
| 总击杀数 | fzsd.module.scoreboard.total.kill_count |
|
||||
| 总放置方块数 | fzsd.module.scoreboard.total.placement_count |
|
||||
| 总交易量 | fzsd.module.scoreboard.total.trade_count |
|
||||
|
||||
### 地毯脚本
|
||||
|
||||
@@ -70,7 +81,6 @@
|
||||
- `fzsd_score.sc`:
|
||||
- 可避免Carpet假人污染计分板
|
||||
- 可以标记哪些玩家是假人
|
||||
- *注:请不要使用为假人名添加“bot”前缀的carpet扩展,本插件不支持此类假人!*
|
||||
- 子命令( `/fzsd_score <子命令>` ):
|
||||
- `updateFrom <version>`:用于从给定的数据包版本恢复计分板数据(需要测试!)
|
||||
- `recalculate`:重新计算所有计分板总分
|
||||
@@ -85,13 +95,22 @@
|
||||
- *副作用:恢复完成后玩家会被放置在出生点,请确保出生点完全安全*
|
||||
- `commandPlayer <permissionType>`:设置player命令权限类型
|
||||
|
||||
### 幻翼预警
|
||||
- 首次使用需要先睡一觉
|
||||
|
||||
### 管理员
|
||||
|
||||
- 使用`/function admin.fzsd:admin`命令管理(安装、卸载等)各模块
|
||||
|
||||
### 其他
|
||||
|
||||
- 见游戏内交互器按钮
|
||||
- 扫地机
|
||||
- 获取当前维度和坐标(以及对应的主世界、下界坐标)(私信/广播)
|
||||
- 获取上次死亡维度和坐标(私信/广播)
|
||||
- 获取上次穿出的下界传送门坐标(私信/广播)
|
||||
- 获取出生点维度和坐标(私信/广播)
|
||||
- 获取当前坐标(私信/广播)
|
||||
|
||||
## 开发者相关
|
||||
- 参见[开发文档](/DEVDOC.md)
|
||||
|
||||
- 见[开发文档](/DEVDOC.md)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd.extra.bbl:display/set_text/black"
|
||||
"fzsd.extra.bbl:display/set_text/dark_gray"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.1.rc.1'}}
|
||||
execute store success storage fzsd:version fzsd.need_update byte 1 run data merge storage fzsd:version {fzsd: {version: '3.1.3'}}
|
||||
execute if data storage fzsd:version fzsd{need_update: 1b} run function fzsd:system/update
|
||||
function fzsd:system/carpet/try_load_fzsd_score
|
||||
function #fzsd:load
|
||||
|
||||
@@ -1 +1 @@
|
||||
tellraw @a [{"text": ""}, [{"selector": "@s"}, {"text": "说:我在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]]
|
||||
tellraw @a [{"text": ""}, [{"selector": "@s"}, {"text": "说:我在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]]
|
||||
@@ -1 +1 @@
|
||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": " [", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]
|
||||
tellraw @s [{"text": "你在", "color": "white"}, {"nbt": "fzsd.dimension.name", "interpret": true, "storage": "fzsd:here"}, [{"text": "[", "color": "green"}, {"nbt": "fzsd.x", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.y", "storage": "fzsd:here"}, {"text": ", "}, {"nbt": "fzsd.z", "storage": "fzsd:here"}, {"text": "]"}], {"nbt": "fzsd.message.append", "interpret": true, "storage": "fzsd:here"}]
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.activation 1
|
||||
execute if score @s fzsd.module.scoreboard.display.activation matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.activation 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.activation fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players operation @s fzsd.module.scoreboard.display.aviating_distance += fzsd.var.score fzsd.variable.integer
|
||||
execute if score @s fzsd.module.scoreboard.display.aviating_distance matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.aviating_distance 2147483647
|
||||
scoreboard players operation fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
|
||||
execute if score fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.aviating_distance fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players operation @s fzsd.module.scoreboard.display.damage_taken += fzsd.var.score fzsd.variable.integer
|
||||
execute if score @s fzsd.module.scoreboard.display.damage_taken matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.damage_taken 2147483647
|
||||
scoreboard players operation fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
|
||||
execute if score fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.damage_taken fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.death_count 1
|
||||
execute if score @s fzsd.module.scoreboard.display.death_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.death_count 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.death_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players operation @s fzsd.module.scoreboard.display.dig_count += fzsd.var.score fzsd.variable.integer
|
||||
execute if score @s fzsd.module.scoreboard.display.dig_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.dig_count 2147483647
|
||||
scoreboard players operation fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general += fzsd.var.score fzsd.variable.integer
|
||||
execute if score fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.dig_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.fishing_count 1
|
||||
execute if score @s fzsd.module.scoreboard.display.fishing_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.fishing_count 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.fishing_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.kill_count 1
|
||||
execute if score @s fzsd.module.scoreboard.display.kill_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.kill_count 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.kill_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.placement_count 1
|
||||
execute if score @s fzsd.module.scoreboard.display.placement_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.placement_count 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.placement_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,2 +1,4 @@
|
||||
scoreboard players add @s fzsd.module.scoreboard.display.trade_count 1
|
||||
execute if score @s fzsd.module.scoreboard.display.trade_count matches ..-1 run scoreboard players set @s fzsd.module.scoreboard.display.trade_count 2147483647
|
||||
scoreboard players add fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general 1
|
||||
execute if score fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general matches ..-1 run scoreboard players set fzsd.module.scoreboard.total.trade_count fzsd.module.scoreboard.assign.general 2147483647
|
||||
@@ -1,7 +1,96 @@
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:minecart\"}}"
|
||||
}
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:minecart\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:hopper_minecart\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:chest_minecart\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:furnace_minecart\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:oak_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:birch_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:acacia_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:cherry_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:jungle_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:spruce_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:dark_oak_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:mangrove_boat\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:entity_properties",
|
||||
"entity": "this",
|
||||
"predicate": {
|
||||
"nbt": "{Item:{id:\"minecraft:bamboo_raft\"}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"fzsd:module/join_message/default_message"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#fzsd:module/join_message/default_message"
|
||||
"fzsd:module/join_message/default_message"
|
||||
]
|
||||
}
|
||||
+18
-27
@@ -43,7 +43,6 @@ global_current_scoreboard_list = [
|
||||
'fzsd.module.scoreboard.display.aviating_distance',
|
||||
'fzsd.module.scoreboard.display.placement_count'
|
||||
];
|
||||
global_server_whitelist_cache = null;
|
||||
|
||||
__config() -> {
|
||||
'scope' -> 'global',
|
||||
@@ -184,10 +183,7 @@ __on_player_disconnects(player, reason) -> (
|
||||
|
||||
// 获取服务器白名单
|
||||
get_server_whitelist() -> (
|
||||
if(global_server_whitelist_cache == null,
|
||||
global_server_whitelist_cache = keys(system_info('server_whitelist'));
|
||||
);
|
||||
return(global_server_whitelist_cache);
|
||||
return(keys(system_info('server_whitelist')));
|
||||
);
|
||||
|
||||
// 重载配置文件
|
||||
@@ -387,20 +383,14 @@ merge_score(from, to, fzsd_version) -> (
|
||||
// 获取承载总榜数据的玩家名
|
||||
// 因为新计分板允许玩家自定义显示的总榜名称,故做复杂判断才能使脚本确定用来承载总榜数据的玩家名
|
||||
get_total_score_name_new(scoreboard) -> (
|
||||
INT_MIN = -2147483648;
|
||||
// 获取系统总榜id
|
||||
system_total_name = replace(scoreboard, 'display', 'total');
|
||||
// 系统总榜id
|
||||
sys_total_name = replace(scoreboard, 'display', 'total');
|
||||
|
||||
// 当前总分
|
||||
current_score = scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name);
|
||||
|
||||
// 将系统总榜分数加上最小int值,使其成为最低分
|
||||
scoreboard(
|
||||
'fzsd.module.scoreboard.assign.general',
|
||||
system_total_name,
|
||||
scoreboard(
|
||||
'fzsd.module.scoreboard.assign.general',
|
||||
system_total_name
|
||||
) + INT_MIN
|
||||
);
|
||||
// 将系统总榜分数设为INT_MIN,使其成为最低分
|
||||
scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name, -2147483648);
|
||||
|
||||
// 将总分赋值到显示计分板上
|
||||
display_total_score(scoreboard);
|
||||
@@ -419,14 +409,7 @@ get_total_score_name_new(scoreboard) -> (
|
||||
);
|
||||
|
||||
// 恢复总榜分数
|
||||
scoreboard(
|
||||
'fzsd.module.scoreboard.assign.general',
|
||||
system_total_name,
|
||||
scoreboard(
|
||||
'fzsd.module.scoreboard.assign.general',
|
||||
system_total_name
|
||||
) - INT_MIN
|
||||
);
|
||||
scoreboard('fzsd.module.scoreboard.assign.general', sys_total_name, current_score);
|
||||
display_total_score(scoreboard);
|
||||
|
||||
// 返回榜内最低分的玩家名(承载总榜数据的玩家名)
|
||||
@@ -444,7 +427,15 @@ command_recalculate_total_score(scoreboard) -> (
|
||||
total_score = 0;
|
||||
for(scoreboard(scoreboard),
|
||||
if(_ != total_score_name_new,
|
||||
total_score += scoreboard(scoreboard, _);
|
||||
current_player_score = scoreboard(scoreboard, _);
|
||||
if(current_player_score < 0, // 避免溢出
|
||||
current_player_score = 2147483647;
|
||||
scoreboard(scoreboard, _, 2147483647);
|
||||
);
|
||||
total_score += current_player_score;
|
||||
);
|
||||
if(total_score < 0, // 避免溢出
|
||||
total_score = 2147483647;
|
||||
);
|
||||
);
|
||||
// 赋值总分到系统总分计分板
|
||||
@@ -521,7 +512,7 @@ restore_score(player_name, scoreboard) -> (
|
||||
require_not_null(player_name);
|
||||
if(scoreboard == null,
|
||||
for(global_current_scoreboard_list, restore_score(player_name, _));
|
||||
return();
|
||||
return(true);
|
||||
);
|
||||
player = player(player_name);
|
||||
player_is_offline = false;
|
||||
|
||||
Reference in New Issue
Block a user