From 92da7819f4f06a3c84eba0125400be3af27bc02a Mon Sep 17 00:00:00 2001 From: gamer147 Date: Sun, 7 Jun 2026 21:16:57 -0400 Subject: [PATCH] chore(engine-ambient): refresh BattleManagerBase manifest sha + add patch artifact Hygiene fixup for the IsForecast/IsRandomDraw ambient conversion in 3b5f2e1. The manifest sha was stale (pointed at the pre-ambient RNG-virtual-patched contents) and the change had no companion .patch artifact alongside BattleManagerBase.rng-virtual.patch. Follow established convention. Co-Authored-By: Claude Opus 4.6 (1M context) --- SVSim.BattleEngine/COPIED.manifest.tsv | 2 +- ...Base.ambient-isforecast-israndomdraw.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 SVSim.BattleEngine/Patches/BattleManagerBase.ambient-isforecast-israndomdraw.patch diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv index a48e2f9..8dbc488 100644 --- a/SVSim.BattleEngine/COPIED.manifest.tsv +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -62,7 +62,7 @@ BattleFinishToOpponentDisConnectChecker.cs BattleFinishToOpponentDisConnectCheck BattleKeywordInfoListMgr.cs BattleKeywordInfoListMgr.cs a014170d0b3f5499635bcc2e29755dc2f3125d5a5a28b1741a4abc74b4abcf86 0 BattleLifeTimeSharedObject.cs BattleLifeTimeSharedObject.cs ab8bc3703d268752a1de56ab5d3e9ebd276980c20076eb0ca300838b3db13d5f 0 BattleLogTextBuilderAttachSkill.cs BattleLogTextBuilderAttachSkill.cs 11c585ae931fa3dc734bb231d6da61df3b51b803516ca2c5d88a0c78bc7c0104 0 -BattleManagerBase.cs BattleManagerBase.cs 849737bd494e33221b9f8672f67a685ca2372d23fae11ad2e1cfb5406caa5750 1 +BattleManagerBase.cs BattleManagerBase.cs 6e537b57a66d16c056f62ed3d00c1727d08adab098e90b4f1373c987a2da8a35 1 BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047fc18c5892eb7971d361 0 BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0 BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0 diff --git a/SVSim.BattleEngine/Patches/BattleManagerBase.ambient-isforecast-israndomdraw.patch b/SVSim.BattleEngine/Patches/BattleManagerBase.ambient-isforecast-israndomdraw.patch new file mode 100644 index 0000000..25cffe2 --- /dev/null +++ b/SVSim.BattleEngine/Patches/BattleManagerBase.ambient-isforecast-israndomdraw.patch @@ -0,0 +1,32 @@ +Multi-instancing migration (Step 2): convert the two static `bool` fields IsForecast and +IsRandomDraw to static properties that resolve through BattleAmbient.Current when a scope is +active, falling back to a private static when not (preserves today's behavior for unwrapped +callers — solo SingleBattleMgr, in-process unit tests). This is the field-to-property pivot +that lets HeadlessBattleMgr (and any future per-session battle host) carry its own forecast / +random-draw flags inside an AsyncLocal scope without colliding with sibling battles +(design 2026-06-07-engine-multi-instancing, Task 2). ZERO logic change for unwrapped callers +(fallback storage holds the value); scoped callers get per-scope isolation. + +--- Engine/BattleManagerBase.cs (~line 414) +- public static bool IsRandomDraw = false; ++ private static bool _isRandomDrawFallback = false; ++ public static bool IsRandomDraw { ++ get => SVSim.BattleEngine.Ambient.BattleAmbient.Current?.IsRandomDraw ?? _isRandomDrawFallback; ++ set { ++ var c = SVSim.BattleEngine.Ambient.BattleAmbient.Current; ++ if (c != null) c.IsRandomDraw = value; ++ else _isRandomDrawFallback = value; ++ } ++ } + +--- Engine/BattleManagerBase.cs (~line 416) +- public static bool IsForecast = false; ++ private static bool _isForecastFallback = false; ++ public static bool IsForecast { ++ get => SVSim.BattleEngine.Ambient.BattleAmbient.Current?.IsForecast ?? _isForecastFallback; ++ set { ++ var c = SVSim.BattleEngine.Ambient.BattleAmbient.Current; ++ if (c != null) c.IsForecast = value; ++ else _isForecastFallback = value; ++ } ++ }