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
|
|
@ -358,6 +358,9 @@ public class Zone
|
|||
};
|
||||
}
|
||||
|
||||
// The zone as it stands, owned by no live object: what a save stores and what the player saw leaving.
|
||||
public ZonePack Snapshot() => EntitySerializer.Copy(PackZone());
|
||||
|
||||
private bool IsExpired(ChunkWear wear) => wear.Damage <= 0f && (!wear.BrokenUntil.HasValue || wear.BrokenUntil.Value <= _time);
|
||||
|
||||
public void Update(float deltaTime)
|
||||
|
|
|
|||
Loading…
Reference in a new issue