From 3d2dfcd82d73d67d677e6f918329d56433caa9fc Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 21:19:53 +0100 Subject: [PATCH] Rename runtime projection keys to legacy payload keys --- Aetheria.State/README.md | 2 +- .../AetheriaRuntimeItemCatalog.cs | 2 +- .../ServerShared/Behaviors/AetherDrive.cs | 26 ++-- .../ServerShared/Behaviors/Behaviors.cs | 2 +- .../ServerShared/Behaviors/Capacitor.cs | 4 +- .../ServerShared/Behaviors/ChargedWeapon.cs | 24 ++-- .../ServerShared/Behaviors/ConstantWeapon.cs | 2 +- .../ServerShared/Behaviors/Cooldown.cs | 2 +- .../ServerShared/Behaviors/EnergyDraw.cs | 4 +- Assets/Scripts/ServerShared/Behaviors/Heat.cs | 4 +- .../ServerShared/Behaviors/InstantWeapon.cs | 8 +- .../ServerShared/Behaviors/ItemUsage.cs | 2 +- .../ServerShared/Behaviors/Launcher.cs | 24 ++-- .../ServerShared/Behaviors/LockWeapon.cs | 10 +- .../ServerShared/Behaviors/MiningTool.cs | 8 +- .../ServerShared/Behaviors/Radiator.cs | 12 +- .../Scripts/ServerShared/Behaviors/Reactor.cs | 8 +- .../ServerShared/Behaviors/Reflector.cs | 4 +- .../ServerShared/Behaviors/ResourceScanner.cs | 6 +- .../Scripts/ServerShared/Behaviors/Sensor.cs | 18 +-- .../Scripts/ServerShared/Behaviors/Shield.cs | 4 +- .../ServerShared/Behaviors/StatModifier.cs | 12 +- .../ServerShared/Behaviors/Thermotoggle.cs | 6 +- .../ServerShared/Behaviors/Thruster.cs | 10 +- .../Behaviors/VelocityConversion.cs | 2 +- .../ServerShared/Behaviors/VelocityLimit.cs | 2 +- .../ServerShared/Behaviors/Visibility.cs | 4 +- .../Scripts/ServerShared/Behaviors/Weapon.cs | 32 ++--- Assets/Scripts/ServerShared/Behaviors/Wear.cs | 2 +- Assets/Scripts/ServerShared/BezierCurve.cs | 2 +- Assets/Scripts/ServerShared/ItemData.cs | 130 +++++++++--------- ...ribute.cs => LegacyPayloadKeyAttribute.cs} | 4 +- ...meta => LegacyPayloadKeyAttribute.cs.meta} | 0 docs/aetheria-perfect-machine-map.md | 8 +- 34 files changed, 195 insertions(+), 195 deletions(-) rename Assets/Scripts/ServerShared/{RuntimeProjectionKeyAttribute.cs => LegacyPayloadKeyAttribute.cs} (51%) rename Assets/Scripts/ServerShared/{RuntimeProjectionKeyAttribute.cs.meta => LegacyPayloadKeyAttribute.cs.meta} (100%) diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 01d9556e8..965ad40e1 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -72,7 +72,7 @@ projection is routed through `ItemManager` and the typed runtime catalog reader. Surviving Unity DTOs inherit `RuntimeProjectionEntry`; the old `RuntimeCatalogEntry` base name no longer appears in live source. The dead `InspectableRuntimeCatalogLinkAttribute` inspector metadata is gone; -typed runtime projection still uses `RuntimeProjectionKeyAttribute` only where the +typed runtime projection still uses `LegacyPayloadKeyAttribute` only where the temporary mapper needs a deterministic field order. `Aetheria.State.Import` captures the legacy catalog files into typed quarantine diff --git a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs index ae6d9fb5f..7ab01f37e 100644 --- a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs +++ b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs @@ -222,7 +222,7 @@ public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemCatalogReader { return type .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) - .Select(field => (attribute: field.GetCustomAttribute(), field)) + .Select(field => (attribute: field.GetCustomAttribute(), field)) .Where(entry => entry.attribute != null) .Select(entry => (entry.attribute.Key, entry.field)); } diff --git a/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs b/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs index 3f3e27fd8..3f1bb0096 100644 --- a/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs +++ b/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs @@ -8,43 +8,43 @@ using static Unity.Mathematics.math; [Inspectable, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] public class AetherDriveData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1)] + [Inspectable, LegacyPayloadKey(1)] public float3 RotorDiameter; - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public float3 RotorMass; - [Inspectable, RuntimeProjectionKey(3), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat MaximumRpm; - [Inspectable, RuntimeProjectionKey(4)] + [Inspectable, LegacyPayloadKey(4)] public float3 CouplingLambda; - [Inspectable, RuntimeProjectionKey(5)] + [Inspectable, LegacyPayloadKey(5)] public PerformanceStat LambdaMultiplier; - [Inspectable, RuntimeProjectionKey(6), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(6), RuntimeInspectable] public PerformanceStat CouplingEfficiency; - [Inspectable, RuntimeProjectionKey(7), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(7), RuntimeInspectable] public PerformanceStat Torque; - [Inspectable, RuntimeProjectionKey(8), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(8), RuntimeInspectable] public BezierCurve TorqueProfile; - [Inspectable, RuntimeProjectionKey(9), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(9), RuntimeInspectable] public PerformanceStat EnergyDraw; - [Inspectable, RuntimeProjectionKey(10), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(10), RuntimeInspectable] public PerformanceStat PassiveCoupling; - [InspectableAudioParameter, RuntimeProjectionKey(11), RuntimeInspectable] + [InspectableAudioParameter, LegacyPayloadKey(11), RuntimeInspectable] public uint RpmAudioParameter; - [InspectableAudioParameter, RuntimeProjectionKey(12), RuntimeInspectable] + [InspectableAudioParameter, LegacyPayloadKey(12), RuntimeInspectable] public uint TorqueRatioAudioParameter; - [InspectablePrefab, RuntimeProjectionKey(13)] + [InspectablePrefab, LegacyPayloadKey(13)] public string Particles; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 74ba6f7b6..8db5376bc 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -146,7 +146,7 @@ public abstract class PersistentBehaviorData [Inspectable] public abstract class BehaviorData { - [Inspectable, RuntimeProjectionKey(0)] + [Inspectable, LegacyPayloadKey(0)] public int Group; public abstract Behavior CreateInstance(EquippedItem item); diff --git a/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs b/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs index 4d8c62fd2..72ed3e937 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs @@ -9,10 +9,10 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class CapacitorData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Capacity = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs index 5dfdfd65f..7f3dc8a62 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs @@ -7,40 +7,40 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class ChargedWeaponData : InstantWeaponData { - [Inspectable, RuntimeProjectionKey(21), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(21), RuntimeInspectable] public PerformanceStat ChargeTime = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(22), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(22), RuntimeInspectable] public PerformanceStat ChargeEnergy = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(23), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(23), RuntimeInspectable] public PerformanceStat ChargeHeat = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(24)] + [Inspectable, LegacyPayloadKey(24)] public bool CanFireEarly; - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public float FailureCharge; - [Inspectable, RuntimeProjectionKey(26)] + [Inspectable, LegacyPayloadKey(26)] public float FailureDamage = 1; - [Inspectable, RuntimeProjectionKey(27)] + [Inspectable, LegacyPayloadKey(27)] public float ChargeFiringDamageMultiplier = 1; - [Inspectable, RuntimeProjectionKey(28)] + [Inspectable, LegacyPayloadKey(28)] public float ChargeFiringSpreadMultiplier = 1; - [Inspectable, RuntimeProjectionKey(29)] + [Inspectable, LegacyPayloadKey(29)] public float ChargeFiringBurstCountMultiplier = 1; - [Inspectable, RuntimeProjectionKey(30)] + [Inspectable, LegacyPayloadKey(30)] public float ChargeFiringVisibilityMultiplier = 1; - [Inspectable, RuntimeProjectionKey(31)] + [Inspectable, LegacyPayloadKey(31)] public float ChargeFiringVelocityMultiplier = 1; - [Inspectable, RuntimeProjectionKey(32)] + [Inspectable, LegacyPayloadKey(32)] public float ChargeFiringHeatMultiplier = 1; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs index 342f6673a..ee0c842c0 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs @@ -9,7 +9,7 @@ using static Unity.Mathematics.math; [Inspectable] public class ConstantWeaponData : WeaponData { - [InspectablePrefab, RuntimeProjectionKey(17)] + [InspectablePrefab, LegacyPayloadKey(17)] public float AmmoInterval = 1; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs b/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs index ca1074ed2..fa5260018 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs @@ -10,7 +10,7 @@ using static Unity.Mathematics.math; [Inspectable, Order(-10), RuntimeInspectable] public class CooldownData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Cooldown = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs b/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs index b49d2fac2..67c042cea 100644 --- a/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs +++ b/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs @@ -7,10 +7,10 @@ using System.Linq; [Inspectable, Order(-20), RuntimeInspectable] public class EnergyDrawData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat EnergyDraw = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public bool PerSecond; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Heat.cs b/Assets/Scripts/ServerShared/Behaviors/Heat.cs index 6c96927ad..66d605efd 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Heat.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Heat.cs @@ -7,10 +7,10 @@ using System.Linq; [Inspectable, Order(10)] public class HeatData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public bool PerSecond; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs index 4d6806015..0a3710f38 100644 --- a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs @@ -7,16 +7,16 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class InstantWeaponData : WeaponData { - [Inspectable, RuntimeProjectionKey(17)] + [Inspectable, LegacyPayloadKey(17)] public PerformanceStat Count = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(18)] + [Inspectable, LegacyPayloadKey(18)] public PerformanceStat BurstTime = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(19), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(19), RuntimeInspectable] public PerformanceStat Cooldown = new PerformanceStat(); - [InspectablePrefab, RuntimeProjectionKey(20)] + [InspectablePrefab, LegacyPayloadKey(20)] public bool SingleAmmoBurst; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs index deb49b229..c044e6274 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs @@ -7,7 +7,7 @@ using System.Linq; [Inspectable, Order(-5), RuntimeInspectable] public class ItemUsageData : BehaviorData { - [RuntimeProjectionKey(1), RuntimeInspectable] + [LegacyPayloadKey(1), RuntimeInspectable] public Guid Item; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Launcher.cs b/Assets/Scripts/ServerShared/Behaviors/Launcher.cs index 29e3764c3..34e215a83 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Launcher.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Launcher.cs @@ -7,22 +7,22 @@ using Unity.Mathematics; [Inspectable] public class LauncherData : LockWeaponData { - [InspectableAnimationCurve, RuntimeProjectionKey(26)] + [InspectableAnimationCurve, LegacyPayloadKey(26)] public float4[] GuidanceCurve; - [InspectableAnimationCurve, RuntimeProjectionKey(27)] + [InspectableAnimationCurve, LegacyPayloadKey(27)] public float4[] ThrustCurve; - [InspectableAnimationCurve, RuntimeProjectionKey(28)] + [InspectableAnimationCurve, LegacyPayloadKey(28)] public float4[] LiftCurve; - [Inspectable, RuntimeProjectionKey(29)] + [Inspectable, LegacyPayloadKey(29)] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(30)] + [Inspectable, LegacyPayloadKey(30)] public float DodgeFrequency; - [Inspectable, RuntimeProjectionKey(31), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(31), RuntimeInspectable] public PerformanceStat MissileVelocity = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) @@ -34,22 +34,22 @@ public class LauncherData : LockWeaponData [Inspectable] public class GuidedWeaponData : InstantWeaponData { - [InspectableAnimationCurve, RuntimeProjectionKey(21)] + [InspectableAnimationCurve, LegacyPayloadKey(21)] public float4[] GuidanceCurve; - [InspectableAnimationCurve, RuntimeProjectionKey(22)] + [InspectableAnimationCurve, LegacyPayloadKey(22)] public float4[] ThrustCurve; - [InspectableAnimationCurve, RuntimeProjectionKey(23)] + [InspectableAnimationCurve, LegacyPayloadKey(23)] public float4[] LiftCurve; - [Inspectable, RuntimeProjectionKey(24)] + [Inspectable, LegacyPayloadKey(24)] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public float DodgeFrequency; - [Inspectable, RuntimeProjectionKey(26), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(26), RuntimeInspectable] public PerformanceStat MissileVelocity = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs index 253947a51..9cd63a8db 100644 --- a/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs @@ -7,19 +7,19 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class LockWeaponData : InstantWeaponData { - [Inspectable, RuntimeProjectionKey(21), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(21), RuntimeInspectable] public PerformanceStat LockSpeed = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(22)] + [Inspectable, LegacyPayloadKey(22)] public PerformanceStat SensorImpact = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(23), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(23), RuntimeInspectable] public PerformanceStat LockAngle = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(24)] + [Inspectable, LegacyPayloadKey(24)] public PerformanceStat DirectionImpact = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public PerformanceStat Decay = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs b/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs index b46b50bb4..43e5ce979 100644 --- a/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs +++ b/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs @@ -10,16 +10,16 @@ using static Unity.Mathematics.math; [Inspectable, Order(10)] public class MiningToolData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1)] + [Inspectable, LegacyPayloadKey(1)] public PerformanceStat DamagePerSecond = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(3)] + [Inspectable, LegacyPayloadKey(3)] public PerformanceStat Penetration = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(4)] + [Inspectable, LegacyPayloadKey(4)] public PerformanceStat Range = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Radiator.cs b/Assets/Scripts/ServerShared/Behaviors/Radiator.cs index a42501688..becfb736c 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Radiator.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Radiator.cs @@ -8,22 +8,22 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class RadiatorData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Emissivity = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat PumpedHeat = new PerformanceStat(); - [InspectableTemperature, RuntimeProjectionKey(3), RuntimeInspectable] + [InspectableTemperature, LegacyPayloadKey(3), RuntimeInspectable] public float TemperatureFloor; - [Inspectable, RuntimeProjectionKey(4), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(4), RuntimeInspectable] public PerformanceStat WasteHeat = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(5), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(5), RuntimeInspectable] public PerformanceStat EnergyUsage = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(6), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(6), RuntimeInspectable] public PerformanceStat ThermalMass = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Reactor.cs b/Assets/Scripts/ServerShared/Behaviors/Reactor.cs index 53b835a1c..3d04a5ecb 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reactor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reactor.cs @@ -12,16 +12,16 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class ReactorData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Charge = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(3), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat OverloadEfficiency = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(4), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(4), RuntimeInspectable] public PerformanceStat ThrottlingFactor = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Reflector.cs b/Assets/Scripts/ServerShared/Behaviors/Reflector.cs index ed6edc955..4f34533ef 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reflector.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reflector.cs @@ -8,10 +8,10 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class ReflectorData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat CrossSection = new PerformanceStat(); - // [InspectableAnimationCurve, RuntimeProjectionKey(1)] + // [InspectableAnimationCurve, LegacyPayloadKey(1)] // public float4[] VisibilityCurve; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs b/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs index 7dd12385c..442ab7aa9 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs @@ -10,13 +10,13 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class ResourceScannerData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Range = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat MinimumDensity = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(3), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat ScanDuration = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs index 9ebd7ecc5..e98addf87 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs @@ -10,31 +10,31 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class SensorData : BehaviorData { - [Inspectable, RuntimeProjectionKey(3), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat Sensitivity = new PerformanceStat(); - [InspectableAnimationCurve, RuntimeProjectionKey(4), RuntimeInspectable] + [InspectableAnimationCurve, LegacyPayloadKey(4), RuntimeInspectable] public BezierCurve SensitivityCurve; - [Inspectable, RuntimeProjectionKey(5), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(5), RuntimeInspectable] public PerformanceStat PingBoost; - [Inspectable, RuntimeProjectionKey(6), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(6), RuntimeInspectable] public PerformanceStat PingEnergy; - [Inspectable, RuntimeProjectionKey(7), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(7), RuntimeInspectable] public PerformanceStat PingVisibility; - [Inspectable, RuntimeProjectionKey(8), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(8), RuntimeInspectable] public PerformanceStat PingRange; - [Inspectable, RuntimeProjectionKey(9), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(9), RuntimeInspectable] public PerformanceStat PingCooldown; - [Inspectable, RuntimeProjectionKey(10)] + [Inspectable, LegacyPayloadKey(10)] public float PingDuration = 2; - [Inspectable, RuntimeProjectionKey(11)] + [Inspectable, LegacyPayloadKey(11)] public float PingRadiusExponent = .5f; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Shield.cs b/Assets/Scripts/ServerShared/Behaviors/Shield.cs index d1d497494..cb21a5eda 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Shield.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Shield.cs @@ -8,10 +8,10 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class ShieldData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat EnergyUsage = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs b/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs index c02525352..0a0f86a7a 100644 --- a/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs +++ b/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs @@ -7,16 +7,16 @@ using System.Linq; [Inspectable] public class StatModifierData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1)] + [Inspectable, LegacyPayloadKey(1)] public StatReference Stat = new StatReference(); - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public PerformanceStat Modifier = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(3)] + [Inspectable, LegacyPayloadKey(3)] public StatModifierType Type; - [InspectableType(typeof(BehaviorData)), RuntimeProjectionKey(4)] + [InspectableType(typeof(BehaviorData)), LegacyPayloadKey(4)] public Type RequireBehavior; public override Behavior CreateInstance(EquippedItem item) @@ -130,9 +130,9 @@ public enum StatModifierType [Inspectable] public class StatReference { - [InspectableType(typeof(BehaviorData)), RuntimeProjectionKey(1)] + [InspectableType(typeof(BehaviorData)), LegacyPayloadKey(1)] public string Target; - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public string Stat; } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs index e2ff2e901..0e86436b5 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs @@ -7,13 +7,13 @@ using System.Linq; [Inspectable, Order(-22)] public class ThermotoggleData : BehaviorData { - [InspectableTemperature, RuntimeProjectionKey(1)] + [InspectableTemperature, LegacyPayloadKey(1)] public float TargetTemperature; - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public bool HighPass; - [Inspectable, RuntimeProjectionKey(3)] + [Inspectable, LegacyPayloadKey(3)] public bool Adjustable; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs index 569ab1875..44423a290 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs @@ -8,19 +8,19 @@ using static Unity.Mathematics.math; [Inspectable, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] public class ThrusterData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(3), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(4), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(4), RuntimeInspectable] public PerformanceStat EnergyUsage = new PerformanceStat(); - [InspectablePrefab, RuntimeProjectionKey(5)] + [InspectablePrefab, LegacyPayloadKey(5)] public string ParticlesPrefab; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs index 4fbd4b362..43f613f67 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs @@ -8,7 +8,7 @@ using static Unity.Mathematics.math; [RuntimeInspectable] public class VelocityConversionData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Lambda = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs b/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs index 86c8ca49d..9c9a97908 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs @@ -8,7 +8,7 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public class VelocityLimitData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat TopSpeed = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Visibility.cs b/Assets/Scripts/ServerShared/Behaviors/Visibility.cs index fd743d833..9c0dd411c 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Visibility.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Visibility.cs @@ -7,10 +7,10 @@ using System.Linq; [Inspectable, RuntimeInspectable] public class VisibilityData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(2)] + [Inspectable, LegacyPayloadKey(2)] public PerformanceStat VisibilityDecay = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs index 9e6409bd4..b2a3cd960 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs @@ -11,52 +11,52 @@ using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public abstract class WeaponData : BehaviorData { - [Inspectable, RuntimeProjectionKey(1), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(1), RuntimeInspectable] public DamageType DamageType; - [Inspectable, RuntimeProjectionKey(2), RuntimeInspectable] + [Inspectable, LegacyPayloadKey(2), RuntimeInspectable] public PerformanceStat Damage = new PerformanceStat(); - [InspectableRangedFloat(0,1), RuntimeProjectionKey(3), RuntimeInspectable] + [InspectableRangedFloat(0,1), LegacyPayloadKey(3), RuntimeInspectable] public PerformanceStat Penetration = new PerformanceStat(); - [InspectableRangedFloat(0,1), RuntimeProjectionKey(4)] + [InspectableRangedFloat(0,1), LegacyPayloadKey(4)] public PerformanceStat DamageSpread = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(5)] + [Inspectable, LegacyPayloadKey(5)] public PerformanceStat MinRange = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(6)] + [Inspectable, LegacyPayloadKey(6)] public PerformanceStat Range = new PerformanceStat(); - [InspectableAnimationCurve, RuntimeProjectionKey(7)] + [InspectableAnimationCurve, LegacyPayloadKey(7)] public BezierCurve DamageCurve; - [InspectablePrefab, RuntimeProjectionKey(8)] + [InspectablePrefab, LegacyPayloadKey(8)] public string EffectPrefab; - [InspectablePrefab, RuntimeProjectionKey(9), RuntimeInspectable] + [InspectablePrefab, LegacyPayloadKey(9), RuntimeInspectable] public PerformanceStat Energy = new PerformanceStat(); - [InspectablePrefab, RuntimeProjectionKey(10), RuntimeInspectable] + [InspectablePrefab, LegacyPayloadKey(10), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [InspectablePrefab, RuntimeProjectionKey(11), RuntimeInspectable] + [InspectablePrefab, LegacyPayloadKey(11), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [RuntimeProjectionKey(12), RuntimeInspectable] + [LegacyPayloadKey(12), RuntimeInspectable] public Guid AmmoType; - [InspectablePrefab, RuntimeProjectionKey(13)] + [InspectablePrefab, LegacyPayloadKey(13)] public int MagazineSize; - [InspectablePrefab, RuntimeProjectionKey(14)] + [InspectablePrefab, LegacyPayloadKey(14)] public float ReloadTime = 1; - [InspectablePrefab, RuntimeProjectionKey(15)] + [InspectablePrefab, LegacyPayloadKey(15)] public PerformanceStat Spread = new PerformanceStat(); - [Inspectable, RuntimeProjectionKey(16)] + [Inspectable, LegacyPayloadKey(16)] public PerformanceStat Velocity = new PerformanceStat(); } diff --git a/Assets/Scripts/ServerShared/Behaviors/Wear.cs b/Assets/Scripts/ServerShared/Behaviors/Wear.cs index 16af4acc3..b5b6a690a 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Wear.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Wear.cs @@ -9,7 +9,7 @@ using static Unity.Mathematics.math; [Inspectable, Order(1000), RuntimeInspectable] public class WearData : BehaviorData { - [InspectableTemperature, RuntimeProjectionKey(1)] + [InspectableTemperature, LegacyPayloadKey(1)] public bool PerSecond = true; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/BezierCurve.cs b/Assets/Scripts/ServerShared/BezierCurve.cs index daf663b1a..ccdaac8ca 100644 --- a/Assets/Scripts/ServerShared/BezierCurve.cs +++ b/Assets/Scripts/ServerShared/BezierCurve.cs @@ -5,7 +5,7 @@ using static Unity.Mathematics.math; public class BezierCurve { - [RuntimeProjectionKey(0)] public float4[] Keys; + [LegacyPayloadKey(0)] public float4[] Keys; private int2 _cachedIndices; diff --git a/Assets/Scripts/ServerShared/ItemData.cs b/Assets/Scripts/ServerShared/ItemData.cs index d5cfbbe6d..0938f9900 100644 --- a/Assets/Scripts/ServerShared/ItemData.cs +++ b/Assets/Scripts/ServerShared/ItemData.cs @@ -14,7 +14,7 @@ using int2 = Unity.Mathematics.int2; [Inspectable] public class Shape { - [RuntimeProjectionKey(0)] public bool[,] Cells; + [LegacyPayloadKey(0)] public bool[,] Cells; private bool _dirty = true; @@ -262,29 +262,29 @@ public class Shape public abstract class ItemData : RuntimeProjectionEntry, INamedEntry { - [Inspectable, RuntimeProjectionKey(1)] + [Inspectable, LegacyPayloadKey(1)] public string Name; - [InspectableText, RuntimeProjectionKey(2)] + [InspectableText, LegacyPayloadKey(2)] public string Description; - [RuntimeProjectionKey(3)] + [LegacyPayloadKey(3)] public Guid Manufacturer; - [Inspectable, RuntimeProjectionKey(4)] + [Inspectable, LegacyPayloadKey(4)] public float Mass; - [InspectableSchematicShape, RuntimeProjectionKey(5)] + [InspectableSchematicShape, LegacyPayloadKey(5)] public Shape Shape; // Heat needed to change temperature of 1 gram by 1 degree - [Inspectable, RuntimeProjectionKey(6)] + [Inspectable, LegacyPayloadKey(6)] public float SpecificHeat = 1; - [Inspectable, RuntimeProjectionKey(7)] + [Inspectable, LegacyPayloadKey(7)] public float Conductivity = 1; - [Inspectable, RuntimeProjectionKey(8)] + [Inspectable, LegacyPayloadKey(8)] public int Price = 0; public string EntryName @@ -299,98 +299,98 @@ public abstract class ItemData : RuntimeProjectionEntry, INamedEntry public class SimpleCommodityData : ItemData { // // Types of body where this resource can be found - // [InspectableField, RuntimeProjectionKey(6)] + // [InspectableField, LegacyPayloadKey(6)] // public BodyType ResourceBodyType; // // // Controls the lowest value in the resource distribution curve - // [InspectableField, RuntimeProjectionKey(8)] + // [InspectableField, LegacyPayloadKey(8)] // public ExponentialLerp Distribution; // // // Minimum amount of resources needed for presence to register - // [InspectableField, RuntimeProjectionKey(11)] + // [InspectableField, LegacyPayloadKey(11)] // public float Floor = 5f; - [Inspectable, RuntimeProjectionKey(9)] + [Inspectable, LegacyPayloadKey(9)] public int MaxStack = 10; - [Inspectable, RuntimeProjectionKey(10)] + [Inspectable, LegacyPayloadKey(10)] public SimpleCommodityCategory Category; } public abstract class CraftedItemData : ItemData { - // [Inspectable, RuntimeProjectionKey(9)] + // [Inspectable, LegacyPayloadKey(9)] // public float IngredientQualityWeight = .5f; } [Inspectable] public class CompoundCommodityData : CraftedItemData { - [RuntimeProjectionKey(10)] + [LegacyPayloadKey(10)] public Dictionary DemandProfile = new Dictionary(); - [Inspectable, RuntimeProjectionKey(11)] + [Inspectable, LegacyPayloadKey(11)] public CompoundCommodityCategory Category; } [Inspectable] public class ConsumableItemData : CraftedItemData { - [Inspectable, RuntimeProjectionKey(10)] + [Inspectable, LegacyPayloadKey(10)] public List Behaviors = new List(); - [Inspectable, RuntimeProjectionKey(11)] + [Inspectable, LegacyPayloadKey(11)] public bool Stackable; - [Inspectable, RuntimeProjectionKey(12)] + [Inspectable, LegacyPayloadKey(12)] public float Duration; - [InspectableTexture, RuntimeProjectionKey(13)] + [InspectableTexture, LegacyPayloadKey(13)] public string Icon; - [Inspectable, RuntimeProjectionKey(14)] + [Inspectable, LegacyPayloadKey(14)] public BezierCurve Effectiveness; } public abstract class EquippableItemData : CraftedItemData { - [InspectableTexture, RuntimeProjectionKey(10)] + [InspectableTexture, LegacyPayloadKey(10)] public string Schematic; - [Inspectable, RuntimeProjectionKey(11)] + [Inspectable, LegacyPayloadKey(11)] public List Behaviors = new List(); - [Inspectable, RuntimeProjectionKey(12)] + [Inspectable, LegacyPayloadKey(12)] public float Durability; - [InspectableTemperature, RuntimeProjectionKey(13)] + [InspectableTemperature, LegacyPayloadKey(13)] public float MinimumTemperature; - [InspectableTemperature, RuntimeProjectionKey(14)] + [InspectableTemperature, LegacyPayloadKey(14)] public float MaximumTemperature; - // [InspectableField, RuntimeProjectionKey(15), SimplePerformanceStat] + // [InspectableField, LegacyPayloadKey(15), SimplePerformanceStat] // public PerformanceStat DurabilityExponent = new PerformanceStat(); // - // [InspectableField, RuntimeProjectionKey(16), SimplePerformanceStat] + // [InspectableField, LegacyPayloadKey(16), SimplePerformanceStat] // public PerformanceStat HeatExponent = new PerformanceStat(); - [InspectableAnimationCurve, RuntimeProjectionKey(17)] + [InspectableAnimationCurve, LegacyPayloadKey(17)] public BezierCurve HeatPerformanceCurve; - [Inspectable, RuntimeProjectionKey(18)] + [Inspectable, LegacyPayloadKey(18)] public float ThermalResilience = 1; - // [Inspectable, RuntimeProjectionKey(19)] + // [Inspectable, LegacyPayloadKey(19)] // public string SoundEffectTrigger; - [InspectableTexture, RuntimeProjectionKey(20)] + [InspectableTexture, LegacyPayloadKey(20)] public string ActionBarIcon; - [InspectableSoundBank, RuntimeProjectionKey(21)] + [InspectableSoundBank, LegacyPayloadKey(21)] public uint SoundBank; - [Inspectable, RuntimeProjectionKey(22)] + [Inspectable, LegacyPayloadKey(22)] public List AudioStats = new List(); public abstract HardpointType HardpointType { get; } @@ -432,17 +432,17 @@ public abstract class EquippableItemData : CraftedItemData [Inspectable] public class AudioStat { - [InspectableAudioParameter, RuntimeProjectionKey(0)] + [InspectableAudioParameter, LegacyPayloadKey(0)] public uint Parameter; - [Inspectable, RuntimeProjectionKey(1)] + [Inspectable, LegacyPayloadKey(1)] public PerformanceStat Stat = new PerformanceStat(); } [Inspectable] public class GearData : EquippableItemData { - [Inspectable, RuntimeProjectionKey(23)] + [Inspectable, LegacyPayloadKey(23)] public HardpointType Hardpoint; public override HardpointType HardpointType => Hardpoint; @@ -451,7 +451,7 @@ public class GearData : EquippableItemData [Inspectable] public class CargoBayData : EquippableItemData { - [Inspectable, RuntimeProjectionKey(24)] + [Inspectable, LegacyPayloadKey(24)] public Shape InteriorShape; public override HardpointType HardpointType => HardpointType.Tool; @@ -460,51 +460,51 @@ public class CargoBayData : EquippableItemData [Inspectable] public class DockingBayData : CargoBayData { - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public int2 MaxSize; } public class WeaponItemData : GearData { - [Inspectable, RuntimeProjectionKey(24)] + [Inspectable, LegacyPayloadKey(24)] public WeaponRange WeaponRange; - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public WeaponCaliber WeaponCaliber; - [Inspectable, RuntimeProjectionKey(26)] + [Inspectable, LegacyPayloadKey(26)] public WeaponType WeaponType; - [Inspectable, RuntimeProjectionKey(27)] + [Inspectable, LegacyPayloadKey(27)] public WeaponFireType WeaponFireTypes; - [Inspectable, RuntimeProjectionKey(28)] + [Inspectable, LegacyPayloadKey(28)] public WeaponModifiers WeaponModifiers; } [Inspectable] public class HullData : EquippableItemData { - [Inspectable, RuntimeProjectionKey(23)] + [Inspectable, LegacyPayloadKey(23)] public List Hardpoints = new List(); - [InspectablePrefab, RuntimeProjectionKey(24)] + [InspectablePrefab, LegacyPayloadKey(24)] public string Prefab; - [Inspectable, RuntimeProjectionKey(25)] + [Inspectable, LegacyPayloadKey(25)] public HullType HullType; - [Inspectable, RuntimeProjectionKey(26)] + [Inspectable, LegacyPayloadKey(26)] public float GridOffset; - [Inspectable, RuntimeProjectionKey(27)] + [Inspectable, LegacyPayloadKey(27)] public float Armor; - [Inspectable, RuntimeProjectionKey(28)] + [Inspectable, LegacyPayloadKey(28)] public float Drag; - [Inspectable, RuntimeProjectionKey(29)] + [Inspectable, LegacyPayloadKey(29)] public bool CanTow; public Shape InteriorCells @@ -528,12 +528,12 @@ public class HullData : EquippableItemData [Inspectable] public class HardpointData : ITintInspector { - [Inspectable, RuntimeProjectionKey(0)] public HardpointType Type; - [Inspectable, RuntimeProjectionKey(1)] public int2 Position; - [Inspectable, RuntimeProjectionKey(2)] public Shape Shape = new Shape(); - [Inspectable, RuntimeProjectionKey(3)] public string Transform; - [Inspectable, RuntimeProjectionKey(4)] public ItemRotation Rotation; - [Inspectable, RuntimeProjectionKey(5)] public float Armor; + [Inspectable, LegacyPayloadKey(0)] public HardpointType Type; + [Inspectable, LegacyPayloadKey(1)] public int2 Position; + [Inspectable, LegacyPayloadKey(2)] public Shape Shape = new Shape(); + [Inspectable, LegacyPayloadKey(3)] public string Transform; + [Inspectable, LegacyPayloadKey(4)] public ItemRotation Rotation; + [Inspectable, LegacyPayloadKey(5)] public float Armor; public override string ToString() { @@ -565,22 +565,22 @@ public class HardpointData : ITintInspector public class PerformanceStat { - [RuntimeProjectionKey(0)] public float Min; + [LegacyPayloadKey(0)] public float Min; - [RuntimeProjectionKey(1)] public float Max; + [LegacyPayloadKey(1)] public float Max; - [RuntimeProjectionKey(2)] + [LegacyPayloadKey(2)] public float HeatExponentMultiplier; - [RuntimeProjectionKey(3)] + [LegacyPayloadKey(3)] public float DurabilityExponentMultiplier; - [RuntimeProjectionKey(4)] + [LegacyPayloadKey(4)] public float QualityExponent; - //[RuntimeProjectionKey(5)] public Guid ID = Guid.NewGuid(); + //[LegacyPayloadKey(5)] public Guid ID = Guid.NewGuid(); - // [RuntimeProjectionKey(5)] public Guid? Ingredient; + // [LegacyPayloadKey(5)] public Guid? Ingredient; private Dictionary> _scaleModifiers; private Dictionary> _constantModifiers; diff --git a/Assets/Scripts/ServerShared/RuntimeProjectionKeyAttribute.cs b/Assets/Scripts/ServerShared/LegacyPayloadKeyAttribute.cs similarity index 51% rename from Assets/Scripts/ServerShared/RuntimeProjectionKeyAttribute.cs rename to Assets/Scripts/ServerShared/LegacyPayloadKeyAttribute.cs index 1bc8115bf..c97e1a641 100644 --- a/Assets/Scripts/ServerShared/RuntimeProjectionKeyAttribute.cs +++ b/Assets/Scripts/ServerShared/LegacyPayloadKeyAttribute.cs @@ -1,9 +1,9 @@ using System; [AttributeUsage(AttributeTargets.Field)] -public sealed class RuntimeProjectionKeyAttribute : Attribute +public sealed class LegacyPayloadKeyAttribute : Attribute { - public RuntimeProjectionKeyAttribute(int key) + public LegacyPayloadKeyAttribute(int key) { Key = key; } diff --git a/Assets/Scripts/ServerShared/RuntimeProjectionKeyAttribute.cs.meta b/Assets/Scripts/ServerShared/LegacyPayloadKeyAttribute.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/RuntimeProjectionKeyAttribute.cs.meta rename to Assets/Scripts/ServerShared/LegacyPayloadKeyAttribute.cs.meta diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index c7444195e..2956726bc 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -289,7 +289,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. corporation/name-file/catalog documents own durable state; these classes are inspector/runtime projections only. Item and behavior DTO field layout for `AetheriaRuntimeItemCatalog` no longer depends on MessagePack attributes. The - temporary bridge uses `RuntimeProjectionKeyAttribute` while typed item instances + temporary bridge uses `LegacyPayloadKeyAttribute` while typed item instances and behavior factories are being built. - The dead `PersonalityAttribute` projection DTO and its unused property-panel hook have been deleted; no typed catalog import or runtime caller owned that @@ -361,7 +361,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. selection now uses an explicit runtime catalog map instead of `UnionAttribute` reflection. Item/behavior DTO field layout for the temporary projection bridge is now - marked with project-owned `RuntimeProjectionKeyAttribute`, not MessagePack + marked with project-owned `LegacyPayloadKeyAttribute`, not MessagePack metadata. Item properties manufacturer display is a typed snapshot consumer; loadout generation is the remaining runtime single-ID item lookup bridge. The old trade debug UI and @@ -566,7 +566,7 @@ First Aetheria surfaces to publish: narrative helper DTOs from MessagePack metadata to plain runtime/inspector shapes. - Done: replace remaining item/behavior DTO MessagePack field metadata with - `RuntimeProjectionKeyAttribute`; no live `Assets/Scripts` source depends on + `LegacyPayloadKeyAttribute`; no live `Assets/Scripts` source depends on MessagePack, Newtonsoft, RethinkDB, or bespoke save-file serializer symbols. - Done: delete dead `PlayerData` and `GalaxyMapLayerData` catalog roots, and remove legacy catalog group/table annotations from surviving runtime DTOs. @@ -723,7 +723,7 @@ First Aetheria surfaces to publish: - Live Unity source has no `RuntimeCatalogEntry`; surviving DTOs inherit `RuntimeProjectionEntry`. - Live Unity source has no `InspectableRuntimeCatalogLinkAttribute`; - `RuntimeProjectionKeyAttribute` remains only as the temporary mapper key. + `LegacyPayloadKeyAttribute` remains only as the temporary mapper key. - Unity batchmode compile also returned cleanly after disabling `MessagePack` auto-reference; `Assets/Scripts` and `Assets/Editor` have no `using MessagePack`, `MessagePackSerializer`, `[MessagePackObject]`, or