package routers import ( "context" "sync" ) var _ = sync.Mutex{} var _ = context.Background // // ★★ 捐赠端警察链的主线粘合层(2026-10-02)。 // 目的:让 GameRouter.LixiPolice.cs / GameRouter.PoliceVehicle.cs / // GameRouter.PolicePrison.cs / GameRouter.PolicePrisonAnimation.cs / // GameRouter.PoliceButtons.cs 能逐字编译,而不去改那些捐赠端文件一个字符。 // 本文件里的东西分三类: // // 捐赠端代码的最小子集:DeliveryText4229938(逐字抄自捐赠端 // GameRouter.Delivery.cs:225-227)、HackerDevices4229938 账本 // (逐字抄自捐赠端 GameRouter.HackerDevices.cs:30 与其 runtime 类的被用字段)。 // ⛑ 只抄被核心链真正引用的成员,机械狗的召唤/控制/武器结算那套没有搬(本次范围外)。 // 主线命名适配:GetEnemyRuntimeState → 主线的 // GetLocalEnemyRuntimeState;RunEnemyAttackAiAsync(session, gen, worker) // → 主线只有单参版本,这里按主线自己的 AttackAiWorkerStarted 闸门转发。 // 主线自有、捐赠端没有的保留件:TryFindInLedger / // RewriteLedgerPosition(原 GameRouter.PolicePrison.cs,被 // GameRouter.PoliceEscort.cs 依赖;捐赠端 PolicePrison.cs 不含这两个方法)。 // // ⛑ 将来若把机械狗/支援/派遣级联搬进来,本文件的第 1 类应整段删除,换成捐赠端真文件。 // // ================================================================ 主线命名适配 // // 捐赠端 GameRouter.Enemy.cs:116 的 GetEnemyRuntimeState。 // 主线这套敌人账本叫 LocalEnemyRuntimeState(见 GameRouter.LocalEnemyCombat.cs), // 语义是同一个"每会话一份敌人账本",所以这里只做类型/命名转发。 // 缺的字段已按捐赠端 EnemyRuntimeState / EnemyRecord 补进那两个类。 // func GameRouter_PoliceDonorGlue_GetEnemyRuntimeState(ctx context.Context, session *GameSession) any { // Router implementation for GameRouter_PoliceDonorGlue_GetEnemyRuntimeState var zero any; return zero } // // 捐赠端 RunEnemyAttackAiAsync(session, generation, worker)。主线只有单参版本, // 且用 LocalEnemyRuntimeState.AttackAiWorkerStarted 做"同一会话只起一个 worker"的闸门 // (捐赠端用 AttackAiWorkerGeneration == 0)。这里沿用主线闸门,语义等价。 // func GameRouter_PoliceDonorGlue_RunEnemyAttackAiAsync(ctx context.Context, session *GameSession, generation int32, worker int64) any { // Router implementation for GameRouter_PoliceDonorGlue_RunEnemyAttackAiAsync var zero any; return zero } // ================================================================ 捐赠端代码的最小子集 // // 玩家可见提示通道。逐字抄自捐赠端 GameRouter.Delivery.cs:225-227 // (MethodId.SyncShowMessage,65100728 是捐赠端写死的消息表 id)。 // 捐赠端在牢房 F 被拒时用它把原因打到屏幕上(LixiPolice.cs:546)。 // func GameRouter_PoliceDonorGlue_DeliveryText4229938(ctx context.Context, session *GameSession, text string) any { // Router implementation for GameRouter_PoliceDonorGlue_DeliveryText4229938 var zero any; return zero } // GetStateIfExists 在 GameRouter 里是 private;GM 桥接(另一个类)要用,开个转发。 func GameRouter_PoliceDonorGlue_GetStateIfExistsPublic(ctx context.Context, session *GameSession) any { // Router implementation for GameRouter_PoliceDonorGlue_GetStateIfExistsPublic var zero any; return zero } // // GM 面板诊断用:S002 root 是否已经发布(PoliceRuntime.RootSent)。 // ⛑ 这是 F 按钮的三个静默前置之一 —— // RefreshPoliceNpcInitializationPass4229938 里 // if (!LixiReady(state) || !r.RootSent || r.Child != 0) return;, // RootSent 为 false 时 不发 F 也不打日志,面板上表现为"点了没反应"。 // RootSent 只在 PublishLixiPolice4229938 里置位 ⇒ 没切过里希/没重进就是 false。 // func GameRouter_PoliceDonorGlue_PoliceRootSentForGm4229938(ctx context.Context, session *GameSession) bool { // Router implementation for GameRouter_PoliceDonorGlue_PoliceRootSentForGm4229938 return true } // // GM 面板「牢房状态」的只读快照。2026-10-02:移植时把 PolicePrisonStatus 降级成了一堆 // 硬编码占位(entrance="" / inside="" / entranceMeters=null / sceneOk=true), // 结果「刷新」按钮显示出来的全是假的 ⇒ 用户根本没法判断自己是不是站在门口 4 m 内。 // 这里把捐赠端 PolicePrison.cs 的两个坐标和场景判据原样透出(不新增能力,只补齐可读性)。 // func GameRouter_PoliceDonorGlue_PolicePrisonSnapshotForGm4229938(ctx context.Context, session *GameSession) any { // Router implementation for GameRouter_PoliceDonorGlue_PolicePrisonSnapshotForGm4229938 var zero any; return zero } // ================================================================ 主线自有保留件 // // 在服务端账本里找这个 uid(三本:Ambient 行人 / 地盘敌人 / 功能 NPC)。 // 找不到就不能收押 —— 城里绝大多数路人是客户端本地实体,服务端没有它们的 id。 // ⛑ 这是主线自己的代码(捐赠端没有),被 GameRouter.PoliceEscort.cs 依赖, // 随捐赠版 PolicePrison.cs 替换而搬到这里保留。 // func GameRouter_PoliceDonorGlue_TryFindInLedger(ctx context.Context, session *GameSession, uid uint64, ledger string, position Vec3) bool { // Router implementation for GameRouter_PoliceDonorGlue_TryFindInLedger return true } // // 改写服务端账本坐标。⛑ 不改的话下一次服务端路网/AI 一拍就把它拽回原处, // 表现就是「收押成功、一秒后 NPC 又站回街上」。同样是主线自有、捐赠端没有的保留件。 // func GameRouter_PoliceDonorGlue_RewriteLedgerPosition(ctx context.Context, session *GameSession, uid uint64, p Vec3, stopWalking bool) any { // Router implementation for GameRouter_PoliceDonorGlue_RewriteLedgerPosition var zero any; return zero } type HackerDeviceRuntime4229938 struct { Agent uint64 `json:"agent"` Template uint32 `json:"template"` Controlled bool `json:"controlled"` Riding bool `json:"riding"` }