diff --git a/Assets/Scripts/ServerShared/Behaviors/Scanner.cs b/Assets/Scripts/ServerShared/Behaviors/Scanner.cs index d94a8b978..c1e9ede41 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Scanner.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Scanner.cs @@ -46,8 +46,10 @@ public class Scanner : Behavior, IProgressBehavior // The scan's progress now: what Execute last built, less ScanTime-relative decay over the time since a tick last held // it (ruling scan-held-beam: a broken scan decays over ScanTime, the item inactive or destroyed included). Derived from // the zone clock, never from tick order, so a scanner decays on the tick it breaks whether its host runs Execute - // before the always-updated pass (EquippedItem) or after it (ConsumableItemEffect). The one decay site. - public float Progress => Remaining(_heldAt); + // before the always-updated pass (EquippedItem) or after it (ConsumableItemEffect). The one decay site. It is the + // progress against the ship's target now: a scan built on another ship reads 0 the moment the target changes, whether + // or not the item is running to reset it. + public float Progress => _target == Entity.Target.Value.Entity ? Remaining(_heldAt) : 0f; public Scanner(ScannerData data, EquippedItem item) : base(data, item) { diff --git a/tools/AetherDb/Program.cs b/tools/AetherDb/Program.cs index 0d4c96cf1..a99c7526c 100644 --- a/tools/AetherDb/Program.cs +++ b/tools/AetherDb/Program.cs @@ -285,8 +285,12 @@ public static class Program _ => null, }; - // Whether CB-R1 maps this design's stats to roles; the catalog test asks the tool, so it keeps no copy of the kinds. - public static bool HasRoleMap(EquippableItemData item) => RoleMapFor(item, KindOf(item)) != null; + // The field->role map roles-backfill would apply to this design, or null; the catalog tests ask the tool, so they keep no + // copy of the kinds or the maps. + public static IReadOnlyDictionary RoleMapOf(EquippableItemData item) => RoleMapFor(item, KindOf(item)); + + // Whether CB-R1 maps this design's stats to roles. + public static bool HasRoleMap(EquippableItemData item) => RoleMapOf(item) != null; private sealed record RoleAuthoring( EquippableItemData Item, string Kind, List<(string Behavior, string Field, string Role)> StatsAssigned,