Listener gear (ListenerData, union 50), float HearingMultiple, and AetherDb sensor-stat-set

Entity.HearingMultiple is now the largest of 1 (any active sensor) and each active
listener's Multiple. sensor-stat-set authors every sensor design's InterceptFactor
as a quality-ranged emission-discipline stat plus the Passive Array and its
products. Not yet built or run; the catalog is not yet regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-13 19:10:15 +02:00
commit 45f98c74eb
7 changed files with 307 additions and 4 deletions

View file

@ -191,6 +191,7 @@ public interface IPowerConsumer
Union(47, typeof(MunitionFuelData)),
Union(48, typeof(PickupData)),
Union(49, typeof(LaunchSuppressorData)),
Union(50, typeof(ListenerData)),
JsonObject(MemberSerialization.OptIn)]
public abstract class BehaviorData
{

View file

@ -0,0 +1,44 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using MessagePack;
using Newtonsoft.Json;
// Passive listening gear (ruling sensor-stat-set): hears other ships' emissions at a multiple of their own range,
// bearing only. It emits nothing; Entity.HearingMultiple asks each active listener at hearing time. Its power is the
// design's EnergyDraw and its activity is the item's Active, as for sensors.
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ListenerData : BehaviorData
{
// How many times an emitter's own reach this listener hears it at.
[Inspectable, JsonProperty("multiple"), Key(1), RuntimeInspectable]
public PerformanceStat Multiple = new PerformanceStat();
public override Behavior CreateInstance(EquippedItem item)
{
return new Listener(this, item);
}
public override Behavior CreateInstance(ConsumableItemEffect item)
{
return new Listener(this, item);
}
}
public class Listener : Behavior
{
private readonly ListenerData _data;
public Listener(ListenerData data, EquippedItem item) : base(data, item)
{
_data = data;
}
public Listener(ListenerData data, ConsumableItemEffect item) : base(data, item)
{
_data = data;
}
public float Multiple => Evaluate(_data.Multiple);
public override bool Execute(float dt) => true;
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5b0e1f6c2d7a4e39a8c4d1f27e6b3a90
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: