Add locate button in player list

Signed-off-by: szdytom <szdytom@qq.com>
This commit is contained in:
方而静 2023-10-07 11:13:26 +08:00
parent b210ac6cc0
commit 291a3e420e
Signed by: szTom
GPG Key ID: 072D999D60C6473C
7 changed files with 32 additions and 14 deletions

View File

@ -17,7 +17,7 @@ ICollect-Alpha 是一个使用 [Carpet 脚本](https://github.com/gnembon/fabric
3. 每10分钟会有一个投票环节投票为一人一票不记名投票后不可撤销。所有玩家都可以把票投给一个自己怀疑是狼人的玩家票数最高者出局。可以投弃权票如果票数最高者有多人得票数相同或票数最高者得票数不严格多于弃权票数量则该轮投票无人出局。 3. 每10分钟会有一个投票环节投票为一人一票不记名投票后不可撤销。所有玩家都可以把票投给一个自己怀疑是狼人的玩家票数最高者出局。可以投弃权票如果票数最高者有多人得票数相同或票数最高者得票数不严格多于弃权票数量则该轮投票无人出局。
4. 如果好人阵营没能在规定时间内完成收集任务则坏人阵营获胜。反之如果好人阵营成功完成6个物品的收集则好人阵营获胜。 4. 如果好人阵营没能在规定时间内完成收集任务则坏人阵营获胜。反之如果好人阵营成功完成6个物品的收集则好人阵营获胜。
5. 每个玩家只有一条生命,被杀死、票死或者因为环境而死的玩家将变成旁观者模式。在准备阶段内死亡不会变成旁观者,而是会正常复活。 5. 每个玩家只有一条生命,被杀死、票死或者因为环境而死的玩家将变成旁观者模式。在准备阶段内死亡不会变成旁观者,而是会正常复活。
6. 游戏过程中玩家获得持续的生命回复II和伤害吸收III20秒更新一次状态效果为30秒 6. 游戏过程中玩家获得持续的生命回复II和伤害吸收III10秒更新一次状态效果为20秒
【望远镜的特殊能力】 【望远镜的特殊能力】
@ -26,7 +26,7 @@ ICollect-Alpha 是一个使用 [Carpet 脚本](https://github.com/gnembon/fabric
3. 建筑烟花:发射在其下方生成道路的烟花火箭(道路建筑材料为 _石化橡木台阶_)。 3. 建筑烟花:发射在其下方生成道路的烟花火箭(道路建筑材料为 _石化橡木台阶_)。
【指令使用】 【指令使用】
1. `/ica`:列出物品收集目标和时限信息 1. `/ica`:列出物品收集目标、时限和玩家信息
2. `/ica submit <slot>`:递交一个目标要求的物品 2. `/ica submit <slot>`:递交一个目标要求的物品
3. `/ica me`:查看自己的身份 3. `/ica me`:查看自己的身份
4. `/ica seed`:查看地图种子 4. `/ica seed`:查看地图种子

View File

@ -2,6 +2,7 @@ __config() -> {
'scope' -> 'global', 'scope' -> 'global',
'command_permission' -> 'ops', 'command_permission' -> 'ops',
'commands' -> { 'commands' -> {
'' -> 'cmdList',
'list' -> 'cmdList', 'list' -> 'cmdList',
'confirm' -> 'cmdStart', 'confirm' -> 'cmdStart',
'reset' -> 'cmdResetClear' 'reset' -> 'cmdResetClear'
@ -9,9 +10,8 @@ __config() -> {
}; };
import('ica-libs', 'shuffleList', 'countCareer', 'playerListNbt' import('ica-libs', 'shuffleList', 'countCareer', 'playerListNbt'
, 'findVoteMax', 'resetVotes', 'getFirstUnsetGoal', 'useIcaInstead' , 'findVoteMax', 'resetVotes', 'getFirstUnsetGoal');
, 'startedReject'); import('ica-i18n', 'getLocaleKey', 'useIcaInstead', 'startedReject');
import('ica-i18n', 'getLocaleKey');
__on_start() -> ( __on_start() -> (
if(nbt_storage('ica:data'):'Goals' == null, ( if(nbt_storage('ica:data'):'Goals' == null, (
@ -303,5 +303,5 @@ cmdStart() -> (
cmdList() -> ( cmdList() -> (
useIcaInstead(); useIcaInstead();
run('/ica'); run('/ica list');
); );

View File

@ -10,11 +10,13 @@ __config() -> {
}, },
}; };
import('ica-i18n', 'getLocaleKey');
getStatus() -> ( getStatus() -> (
if(global_enabled, ( if(global_enabled, (
print('effect-applier: on') print(getLocaleKey('effect-applier.on'));
), ( ), (
print('effect-applier: off') print(getLocaleKey('effect-applier.off'));
)) ))
); );

View File

@ -137,6 +137,9 @@ global_TranslateKeysEnUS = {
'misc.clipboard' -> 'Click To Copy', 'misc.clipboard' -> 'Click To Copy',
'effect-applier.on' -> 'effect-applier status: enabled.',
'effect-applier.off' -> 'effect-applier status: disabled.',
'license.header' -> 'ICollect-Alpha, Copyright (C) 2023 方而静\nICollect-Alpha comes with ABSOLUTELY NO WARRANTY;\nfor details type \'/ica-loader show w\'.\nThis is free software, and you are welcome to redistribute it\nunder certain conditions; type \'/ica-loader show c\' for details.' 'license.header' -> 'ICollect-Alpha, Copyright (C) 2023 方而静\nICollect-Alpha comes with ABSOLUTELY NO WARRANTY;\nfor details type \'/ica-loader show w\'.\nThis is free software, and you are welcome to redistribute it\nunder certain conditions; type \'/ica-loader show c\' for details.'
}; };
@ -146,7 +149,7 @@ getLocaleKey(keyid) -> (
useIcaInstead() -> ( useIcaInstead() -> (
print(format('d ' + getLocaleKey('hint.instead.before') print(format('d ' + getLocaleKey('hint.instead.before')
, 'mb /ica', '?/ica' , 'mb /ica list', '?/ica list'
, 'd ' + getLocaleKey('hint.instead.after'))); , 'd ' + getLocaleKey('hint.instead.after')));
); );

View File

@ -2,6 +2,7 @@ __config() -> {
'scope' -> 'global', 'scope' -> 'global',
'command_permission' -> 'ops', 'command_permission' -> 'ops',
'commands' -> { 'commands' -> {
'' -> 'cmdList',
'list' -> 'cmdList', 'list' -> 'cmdList',
'set <slot> <item>' -> 'cmdSet', 'set <slot> <item>' -> 'cmdSet',
'add <item>' -> 'cmdSetAppend', 'add <item>' -> 'cmdSetAppend',
@ -23,7 +24,7 @@ import('ica-libs', 'countCareer', 'getFirstUnsetGoal');
cmdList() -> ( cmdList() -> (
useIcaInstead(); useIcaInstead();
run('/ica'); run('/ica list');
); );
cmdSet(slot_id, goal_item_tuple) -> ( cmdSet(slot_id, goal_item_tuple) -> (

View File

@ -17,11 +17,11 @@ __config() -> {
}; };
import('ica-libs', 'listContain', 'countVotes', 'findVoteMax', 'countAbstainVotes'); import('ica-libs', 'listContain', 'countVotes', 'findVoteMax', 'countAbstainVotes');
import('ica-i18n', 'getLocaleKey'); import('ica-i18n', 'getLocaleKey', 'pendingReject');
cmdInfo() -> ( cmdInfo() -> (
if(!nbt_storage('ica:data'):'Started', ( if(!nbt_storage('ica:data'):'Started', (
print(format(getLocaleKey('reject.pending'))); pendingReject();
return(false) return(false)
)); ));
cand_names = parse_nbt(nbt_storage('ica:voting'):'Candidates'); cand_names = parse_nbt(nbt_storage('ica:voting'):'Candidates');
@ -57,7 +57,7 @@ cmdInfo() -> (
beforeVoteChecks() -> ( beforeVoteChecks() -> (
if(!nbt_storage('ica:data'):'Started', ( if(!nbt_storage('ica:data'):'Started', (
print(format(getLocaleKey('reject.pending'))); pendingReject();
return(false) return(false)
)); ));
myself = player(); myself = player();

View File

@ -1,6 +1,6 @@
__config() -> { __config() -> {
'commands' -> { 'commands' -> {
'' -> 'cmdList', '' -> 'cmdAllInfo',
'list' -> 'cmdList', 'list' -> 'cmdList',
'submit <slot>' -> 'cmdSubmit', 'submit <slot>' -> 'cmdSubmit',
'refill' -> 'cmdRefill', 'refill' -> 'cmdRefill',
@ -273,7 +273,19 @@ cmdListPalyer() -> (
&& query(p, 'has_scoreboard_tag', 'ica.wolf'), ( && query(p, 'has_scoreboard_tag', 'ica.wolf'), (
put(fcomp, null, ' ' + getLocaleKey('ps.wolf')); put(fcomp, null, ' ' + getLocaleKey('ps.wolf'));
)); ));
if(me != p && query(me, 'has_scoreboard_tag', 'ica.coordinator')
&& !query(p, 'has_scoreboard_tag', 'ica.deceased'), (
put(fcomp, null, 'mb ' + getLocaleKey('ps.button.locate'));
put(fcomp, null, '!/ica locate ' + _);
));
)); ));
print(format(fcomp)); print(format(fcomp));
)); ));
); );
cmdAllInfo() -> (
if(nbt_storage('ica:data'):'Started', (
cmdListPalyer();
));
cmdList();
);