diff --git a/3DTank/docs/KtRebuild_Plan.md b/3DTank/docs/KtRebuild_Plan.md index f846bc2..4ae5ddf 100644 --- a/3DTank/docs/KtRebuild_Plan.md +++ b/3DTank/docs/KtRebuild_Plan.md @@ -221,7 +221,8 @@ 缺省 `currentSection=SPECIAL`、`currentCategory=null`、`isNotCompletedQuests=false`。 `GoTo` 到 `tX`(`QuestCategoryScreen(section, categoryId)`)时切到目标分区,到 `nX`(`ChallengeScreen`)时切 `CHALLENGE`; 原包那条分支还会发 `Wrt(QuestsChangeCategory)` 命令,属于副作用,留给中间件层。 - `Hrt` 类体为空、reducer 读的 `t.iu5_1` 是 `undefined`,Kotlin 侧按 `SetNotCompletedQuests` 收口为 false。 + `Hrt` 类体为空、reducer 读的 `t.iu5_1` 是 `undefined`(`cd` 也是 `undefined`),三个 copy 参数全走默认值, + 这一支实际是 no-op;Kotlin 侧保留 `SetNotCompletedQuests` 动作但归约时原样返回。 `tX` / `nX` 是屏幕标识类,已从动作表剔除并记入 `Markers`(`screen-id-class`)。 - `launchParams` → `(pass-through)`:原根 reducer 对 `hpx_1` 没有调用,缺省是 `ag()` 空 Map; `RootState.LaunchParams` 收口为 `LaunchParamsStateSlice = Map`,不新增 reducer/动作。 diff --git a/3DTank/names/root_wiring.json b/3DTank/names/root_wiring.json index 06f0cd0..d0ebca4 100644 --- a/3DTank/names/root_wiring.json +++ b/3DTank/names/root_wiring.json @@ -1,5 +1,5 @@ { - "generatedAt": "2026-10-24T04:49:01.300Z", + "generatedAt": "2026-10-24T05:13:42.080Z", "module": "module_10032.js", "RootState": { "Class": "z6", @@ -659,7 +659,7 @@ "Local": "Hrt", "Name": "SetNotCompletedQuests", "DispatchedAt": "未在 action_trace_merged.json 中出现;按 reducer 分支效果定名", - "Effect": "isNotCompletedQuests = action.isNotCompletedQuests(`n.au5(cd, cd, t.iu5_1)`;动作类无字段,原包写入 undefined,Kotlin 侧收口为 false)" + "Effect": "状态不变(`n.au5(cd, cd, t.iu5_1)`;动作类无字段,`t.iu5_1` 与 `cd` 都是 undefined,三个参数全走默认值 → no-op)" } ], "Markers": [ diff --git a/3DTank/tools/gen_root_wiring.js b/3DTank/tools/gen_root_wiring.js index c36b66f..1c077c0 100644 --- a/3DTank/tools/gen_root_wiring.js +++ b/3DTank/tools/gen_root_wiring.js @@ -756,7 +756,7 @@ const NotificationsAnonymousEffects = { // quests 切片(Frt / Yrt.otg):没有 toString / 不在 action_inventory 的类,按 reducer 分支效果定名。 const QuestsAnonymousEffects = { - Hrt: 'isNotCompletedQuests = action.isNotCompletedQuests(`n.au5(cd, cd, t.iu5_1)`;动作类无字段,原包写入 undefined,Kotlin 侧收口为 false)', + Hrt: '状态不变(`n.au5(cd, cd, t.iu5_1)`;动作类无字段,`t.iu5_1` 与 `cd` 都是 undefined,三个参数全走默认值 → no-op)', }; fs.writeFileSync( diff --git a/TankiOffline/app/src/jsMain/kotlin/App/State/Reducers/QuestsReducer.kt b/TankiOffline/app/src/jsMain/kotlin/App/State/Reducers/QuestsReducer.kt index ee0098b..775a2e1 100644 --- a/TankiOffline/app/src/jsMain/kotlin/App/State/Reducers/QuestsReducer.kt +++ b/TankiOffline/app/src/jsMain/kotlin/App/State/Reducers/QuestsReducer.kt @@ -25,8 +25,9 @@ import App.State.SetCurrentCategory /* ------------------------------------------------------------------ 匿名动作 */ /** - * 原 `Hrt`:类体为空,reducer 读的 `t.iu5_1` 恒为 undefined。 - * 原包的实际效果是把 isNotCompletedQuests 置成假值,这里按 false 收口。 + * 原 `Hrt`:类体为空、没有字段,reducer 读的 `t.iu5_1` 是 `undefined`。 + * 原包的 `cd` 就是 `undefined`,所以 `n.au5(cd, cd, t.iu5_1)` 三个参数都走默认值, + * 这一支实际是 **no-op**(状态不变)。Kotlin 侧保留动作类以维持动作目录,归约时原样返回。 */ object SetNotCompletedQuests @@ -45,7 +46,8 @@ fun ReduceQuests( Action: Any, ): QuestsStateSlice = when (Action) { is SetCurrentCategory -> State0.copy(CurrentCategory = Action.currentCategory) - is SetNotCompletedQuests -> State0.copy(IsNotCompletedQuests = false) + // 原包这一支读的是动作上不存在的字段(undefined === cd),三个参数全走默认值 → no-op。 + is SetNotCompletedQuests -> State0 // 原包的 QuestCategory 分支还会 `u.uar(new Wrt(currentScreen, currentCategoryId, section))` // 发一条 QuestsChangeCategory 命令;那是副作用,不属于纯状态归约,等中间件层再补。 is GoTo -> when (val Screen = Action.screen) { diff --git a/TankiOffline/app/src/jsMain/kotlin/App/StateCheck.kt b/TankiOffline/app/src/jsMain/kotlin/App/StateCheck.kt index 2bcbfb0..bffdd20 100644 --- a/TankiOffline/app/src/jsMain/kotlin/App/StateCheck.kt +++ b/TankiOffline/app/src/jsMain/kotlin/App/StateCheck.kt @@ -3063,8 +3063,8 @@ object StateCheck { ReduceQuests(S0, SetCurrentCategory("cat-1")).CurrentCategory == "cat-1" ) Check( - "切片 Quests:SetNotCompletedQuests 收口为 false", - !ReduceQuests(QuestsStateSlice(IsNotCompletedQuests = true), SetNotCompletedQuests) + "切片 Quests:SetNotCompletedQuests 读了不存在的字段,实际是 no-op", + ReduceQuests(QuestsStateSlice(IsNotCompletedQuests = true), SetNotCompletedQuests) .IsNotCompletedQuests ) Check(