From 6c3fca353035427e56afc31f84d37f9a0219d154 Mon Sep 17 00:00:00 2001 From: wsy182 <2392948297@qq.com> Date: Wed, 1 Apr 2026 17:27:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(game):=20=E6=B7=BB=E5=8A=A0=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E5=9B=9E=E5=90=88=E5=8A=A8=E4=BD=9C=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在actions.ts中增加available_actions相关字段支持 - 移除未使用的watch导入和相关逻辑 - 新增selfTurnAllowActions响应式变量存储当前回合可执行动作 - 实现settlementOverlayDismissed控制结算弹窗显示状态 - 修改showSettlementOverlay计算属性加入弹窗已关闭条件判断 - 使用canSelfGang计算属性替代原有的concealedGangCandidates逻辑 - 新增readPlayerTurnAllowActions函数解析玩家回合允许的动作列表 - 实现readMissingSuitWithPresence函数增强缺门花色字段检测逻辑 - 更新玩家数据处理逻辑以兼容新的字段结构变化 - 调整游戏阶段映射增加ding_que到playing的转换支持 - 实现resetRoundStateForNextTurn函数重置回合状态 - 更新handlePlayerTurn消息处理逻辑 - 优化nextRound函数逻辑并设置结算弹窗为已关闭状态 - 简化submitSelfGang函数移除传入参数依赖 - 调整UI渲染逻辑适配新的动作权限控制模式 --- src/game/actions.ts | 3 + src/views/ChengduGamePage.vue | 320 ++++++++++++++-------------------- 2 files changed, 137 insertions(+), 186 deletions(-) diff --git a/src/game/actions.ts b/src/game/actions.ts index 0ce3677..39b7f46 100644 --- a/src/game/actions.ts +++ b/src/game/actions.ts @@ -41,6 +41,9 @@ export interface PlayerTurnPayload { allow_actions?: string[] allowActions?: string[] AllowActions?: string[] + available_actions?: string[] + availableActions?: string[] + AvailableActions?: string[] } diff --git a/src/views/ChengduGamePage.vue b/src/views/ChengduGamePage.vue index 429edc3..f20eb19 100644 --- a/src/views/ChengduGamePage.vue +++ b/src/views/ChengduGamePage.vue @@ -1,5 +1,5 @@