Signatures: every light signature names its channel and item through Entity.SetSignature

VisibilitySources holds Signature (channel, strength, item); the eight direct writes
go through the one writer; Visibility stays the sum; SignatureOn(channel) splits it.
VisibilityData gains Key(3) Channel. No number changes. Not yet built or tested at this
commit (verification follows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-11 09:13:24 +02:00
commit 1d14edea3a
13 changed files with 431 additions and 16 deletions

View file

@ -15,6 +15,9 @@ public class VisibilityData : BehaviorData
[Inspectable, JsonProperty("visibilityDecay"), Key(2)]
public PerformanceStat VisibilityDecay = new PerformanceStat();
[Inspectable, JsonProperty("channel"), Key(3)]
public SignatureChannel Channel = SignatureChannel.Thermal;
public override Behavior CreateInstance(EquippedItem item)
{
@ -41,7 +44,7 @@ public class Visibility : Behavior
public override bool Execute(float dt)
{
Entity.VisibilitySources[this] = Evaluate(_data.Visibility);
Entity.SetSignature(this, _data.Channel, Evaluate(_data.Visibility), Item);
return true;
}
}