chore(battle): snapshot the LocalMP rework baseline

Records the uncommitted battle-session work exactly as it was left
(local service matchmaking, settlement, chat, native LocalMP hooks,
battle gui/exe patches) so the following review and rework commits
show every correction as a diff against this state.

This commit is not reviewed and is known to be incomplete: in-game
testing reported wrong settlement rewards, single-country teams,
missing random/fixed supplement slots, misattributed hit messages and
other regressions. Do not merge this branch before the rework lands.
This commit is contained in:
N0VAN0M4LY committed 2026-11-28 03:15:47 +08:00
1 parent 5c9204c031
commit b260d2899e
97 files changed
+7676 -396

No files matched your search

@@ -0,0 +1,30 @@
{
"id": "battle/stabilize-respawn-countdown-button",
"title": "开局倒计时期间保持重生主按钮同步显示剩余秒数避免与「取消」来回闪烁",
"file": "scripts/respawn/respawn.nut",
"program_behaviour": {
"stock": "开局 15 秒准备倒计时内,玩家点击「加入战斗!」进入等待出击状态(isApplyPressed == true && readyForRespawn == true)后,onUpdate 每帧调用 updateCountdown(countdown) 将主按钮设为「取消 (15秒)」,而任务自定义状态事件 MissionCustomStateChanged 高频触发 checkUpdateCustomStateRespawns() -> updateApplyText() 又把同一按钮重置为不带秒数的「取消」,导致右下角按钮在「取消」与「取消 (15秒)」之间高频闪烁。",
"patched": "在 updateApplyText() 刷新底部主按钮(mainButtonsId)时,若处于等待倒计时出击状态且 get_mp_respawn_countdown() > 0,同样拼接「(N秒)」后缀(同时保持 this.applyText 与乘员槽小按钮文案不变),与 updateCountdown() 输出完全一致。"
},
"derivation": {
"requirement": "Keep the respawn screen bottom-right cancel button text stable during the match-start countdown without flickering between '取消' and '取消 (15秒)'.",
"cause": "respawn.nut 中 updateApplyText() 直接向 mainButtonsId 写入不带倒计时后缀的 this.applyText(\"取消\"),而 updateCountdown() 向同一组按钮写入拼接了倒计时秒数的 btnText(\"取消 (15秒)\");战局内 MissionCustomStateChanged 每秒触发十余次 updateApplyText(),与 onUpdate 交替覆盖按钮文本。",
"lighter_options_ruled_out": [
"仅靠本地服务:战局内 UI 刷新完全在客户端重生界面脚本内闭环运行,不经过本地服务。"
],
"conclusion": "在 respawn.nut 的 updateApplyText() 中对底部主按钮同步附带当前开局倒计时秒数。",
"if_not_applied": "开局 15 秒倒计时等待出击期间,右下角主按钮在「取消」与「取消 (15秒)」之间持续高频跳变。"
},
"features": ["K-战局任务加载"],
"evidence": [
"2.61.0.37 gui.vromfs.bin:scripts/respawn/respawn.nut 第 104、2366-2367、2457-2467、2639-2640、2972-2977、3439-3445 行。"
],
"edit": {
"find": " foreach (btnId in this.mainButtonsId) {\r\n let buttonSelectObj = setColoredDoubleTextToButton(this.scene.findObject(\"nav-help\"), btnId, this.applyText)",
"replace": " local mainBtnText = this.applyText\r\n if (!this.stayOnRespScreen && this.readyForRespawn && this.isApplyPressed) {\r\n let countdown = get_mp_respawn_countdown()\r\n if (countdown > 0)\r\n mainBtnText = \"\".concat(mainBtnText, loc(\"ui/parentheses/space\", { text = \"\".concat(countdown, loc(\"mainmenu/seconds\")) }))\r\n }\r\n\r\n foreach (btnId in this.mainButtonsId) {\r\n let buttonSelectObj = setColoredDoubleTextToButton(this.scene.findObject(\"nav-help\"), btnId, mainBtnText)"
}
}