Reveal book: one gate, one removal counterpart; departure ends reveals on perception; departed subjects age out
RecordReveal gates on zone membership and EndReveals is the only way out; the observer's Zone.Entities handler no longer wipes the book and PublishInbox no longer decides membership. Zone records each removal as a one-tick Departure that each observer's Sense judges under the light-act gate; a departed subject's entries are pruned once older than BearingMemory. Unverified build at this commit (first test run follows). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c86f28e93f
commit
b6c2a2368b
4 changed files with 335 additions and 26 deletions
|
|
@ -72,6 +72,9 @@ public class Zone
|
|||
return false;
|
||||
}
|
||||
|
||||
private readonly List<Departure> _departures = new List<Departure>();
|
||||
internal IReadOnlyList<Departure> Departures => _departures;
|
||||
|
||||
public float Time
|
||||
{
|
||||
get => (float) _time;
|
||||
|
|
@ -109,6 +112,9 @@ public class Zone
|
|||
// every join, whichever caller admits the entity (deserialization below, a jump, a spawned turret) --
|
||||
// ObserveAdd fires for all of them. Forbidden writer: no presentation may remove an entity from Zone.
|
||||
Entities.ObserveAdd().Subscribe(add => add.Value.Death.Subscribe(_ => { Entities.Remove(add.Value); add.Value.Deactivate(); }));
|
||||
// The one record of a removal for observers (ruling reveal-ends-on-perception): read by the next Sense pass.
|
||||
Entities.ObserveRemove().Subscribe(remove => _departures.Add(new Departure(remove.Value, remove.Value.Position.xz,
|
||||
remove.Value.Visibility - remove.Value.SignatureOn(SignatureChannel.Emission))));
|
||||
|
||||
Targets.Add(new EntityTargets());
|
||||
|
||||
|
|
@ -230,6 +236,7 @@ public class Zone
|
|||
foreach (var entity in entities) entity.PublishInbox();
|
||||
foreach (var entity in entities) entity.Update(deltaTime);
|
||||
foreach (var entity in entities) entity.Sense();
|
||||
_departures.Clear();
|
||||
|
||||
StepMines(deltaTime);
|
||||
StepClouds(deltaTime);
|
||||
|
|
|
|||
Loading…
Reference in a new issue