A save is a copy of the run: Capture stores Zone.Snapshot(), a MessagePack round trip, never the live stack and run objects
Closes follow-up save-shares-live-objects. EntitySerializer.Copy is the one copy; every zone of a run is live, so Capture requires Contents and the PackedContents fallback is gone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
74ebf52274
commit
3e9a862a7a
11 changed files with 85 additions and 3 deletions
|
|
@ -742,9 +742,12 @@ public sealed partial class RunStartTests
|
|||
public void InfluenceScaleRoundTripsAndOldSavesAreRefused()
|
||||
{
|
||||
var arena = Arena(true);
|
||||
LiveRegion.Fill(_items, _galaxy);
|
||||
var (demo, _) = RunSave.Capture(_cache, _galaxy, arena, null, new SavedActionBarBinding[0], 0);
|
||||
Assert.Equal(.5f, demo.InfluenceScale);
|
||||
var (main, _) = RunSave.Capture(_cache, MainSectorGalaxy(), arena, null, new SavedActionBarBinding[0], 0);
|
||||
var mainGalaxy = MainSectorGalaxy();
|
||||
LiveRegion.Fill(_items, mainGalaxy);
|
||||
var (main, _) = RunSave.Capture(_cache, mainGalaxy, arena, null, new SavedActionBarBinding[0], 0);
|
||||
Assert.Equal(1f, main.InfluenceScale);
|
||||
|
||||
var old = Assert.Throws<InvalidOperationException>(() => new Galaxy(_cache, new SavedGame
|
||||
|
|
|
|||
Loading…
Reference in a new issue