--- a/addons/core/Scripts/Game/ERR/40_Chat/ERR_NativeSmoke.c +++ b/addons/core/Scripts/Game/ERR/40_Chat/ERR_NativeSmoke.c @@ -1,5 +1,21 @@ // Explicit, local Workbench diagnostic only. Never compiled into game/server builds. #ifdef WORKBENCH +modded class ERR_HQ +{ + bool ERR_IsolateMountedBMP() + { + string bmp; + if (!ERR_NativeMountedAmmoProbe.Enabled() || !System.GetCLIParam("errMountedBMP", bmp) || bmp != "1" + || !m_Mode || m_Mode != ERR_GameMode.Get() || m_Mode.StartMode() != 0 || m_Mode.Phase() != ERR_Phase.PRISON + || !m_Hunters || m_Hunters.Deployed() != 0 || !m_Towns) return false; + // Neither service ticks in PRISON. Town creation is synchronous; there are + // no queued town soldiers to cancel or existing populations to refund here. + m_Hunters.Stop(); + m_Towns.Stop(); + return true; + } +} + modded class ERR_GameMode { // Read-only normal-route stock witness; no courier, movement or arming action. @@ -838,6 +854,20 @@ } if (m_ERRTestMountedAmmo) { + string mountedBMP; + if (System.GetCLIParam("errMountedBMP", mountedBMP) && mountedBMP == "1") + { + string bmpMines, bmpSwap, bmpCourier; + bool mixedBMP = (System.GetCLIParam("errMineStock", bmpMines) && bmpMines == "1") + || (System.GetCLIParam("errMountedSwapEligibility", bmpSwap) && bmpSwap == "1") + || (System.GetCLIParam("errMountedCourier", bmpCourier) && bmpCourier == "1"); + if (!ERR_Check(!mixedBMP && StartMode() == 0 && Phase() == ERR_Phase.PRISON, + "BMP accounting isolation requires prison start and no mine/swap/courier variants")) return; + ERR_HQ bmpHQ = ERR_HQ.Get(); + if (!ERR_Check(bmpHQ && bmpHQ.ERR_IsolateMountedBMP(), + "BMP accounting isolation precedes opening hunter and town admissions")) return; + Print("ERR BMP FIXTURE: opening hunters and new town admissions stopped before prison escape; original site troops, automatic convoy target, body cap, stock and proof deadline unchanged"); + } // Protect only this diagnostic observer while normal enemy forces continue. DamageManagerComponent mountedObserverDamage = DamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(DamageManagerComponent)); if (!ERR_Check(mountedObserverDamage != null, "mounted observer has native damage component")) return;