From 066597e70bba1c0ea11a477611ceb7988344b89e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 15:02:32 +0100 Subject: [PATCH] Replace runtime MessagePack DTO keys --- .voidbot/state/aetheria.cc | Bin 33738 -> 34757 bytes .../ServerShared/Aetheria.Shared.Unity.asmdef | 1 - .../AetheriaRuntimeItemCatalog.cs | 9 +- .../ServerShared/Behaviors/AetherDrive.cs | 29 ++- .../ServerShared/Behaviors/AutoWeapon.cs | 3 +- .../ServerShared/Behaviors/Behaviors.cs | 6 +- .../ServerShared/Behaviors/Capacitor.cs | 7 +- .../ServerShared/Behaviors/ChargedWeapon.cs | 27 ++- .../Scripts/ServerShared/Behaviors/Cockpit.cs | 3 +- .../ServerShared/Behaviors/ConstantWeapon.cs | 5 +- .../ServerShared/Behaviors/Cooldown.cs | 5 +- .../ServerShared/Behaviors/EnergyDraw.cs | 7 +- Assets/Scripts/ServerShared/Behaviors/Heat.cs | 7 +- .../ServerShared/Behaviors/HeatStorage.cs | 3 +- .../ServerShared/Behaviors/InstantWeapon.cs | 11 +- .../ServerShared/Behaviors/ItemUsage.cs | 5 +- .../ServerShared/Behaviors/Launcher.cs | 29 ++- .../ServerShared/Behaviors/LockWeapon.cs | 13 +- .../ServerShared/Behaviors/MiningTool.cs | 11 +- .../ServerShared/Behaviors/Radiator.cs | 15 +- .../Scripts/ServerShared/Behaviors/Reactor.cs | 11 +- .../ServerShared/Behaviors/Reflector.cs | 7 +- .../ServerShared/Behaviors/ResourceScanner.cs | 9 +- .../Scripts/ServerShared/Behaviors/Sensor.cs | 21 +- .../Scripts/ServerShared/Behaviors/Shield.cs | 7 +- .../ServerShared/Behaviors/StatModifier.cs | 17 +- .../Scripts/ServerShared/Behaviors/Switch.cs | 3 +- .../ServerShared/Behaviors/Thermotoggle.cs | 9 +- .../ServerShared/Behaviors/Thruster.cs | 15 +- .../Scripts/ServerShared/Behaviors/Trigger.cs | 3 +- .../Behaviors/TurretController.cs | 3 +- .../Behaviors/VelocityConversion.cs | 5 +- .../ServerShared/Behaviors/VelocityLimit.cs | 5 +- .../ServerShared/Behaviors/Visibility.cs | 7 +- .../Scripts/ServerShared/Behaviors/Weapon.cs | 33 ++- Assets/Scripts/ServerShared/Behaviors/Wear.cs | 5 +- Assets/Scripts/ServerShared/BezierCurve.cs | 11 +- Assets/Scripts/ServerShared/ItemData.cs | 201 ++++++++---------- .../RuntimeCatalogKeyAttribute.cs | 12 ++ .../RuntimeCatalogKeyAttribute.cs.meta | 11 + docs/aetheria-perfect-machine-map.md | 21 +- 41 files changed, 298 insertions(+), 314 deletions(-) create mode 100644 Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs create mode 100644 Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs.meta diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 7e84514f108489069a74faa361fa8377019497bd..57fc1b3c7a896ee127f7c5c8ed5b7c94532c08c9 100644 GIT binary patch delta 1904 zcmb7F%}-oa6n7Yk(1lSGiy;;-gkr3ZH&6ycKOmu^1qlTing}sz?!0$q-i7z>eYy9( z8AcY9=)%O<7`=ah3o#_7i`H2io5pT*qj5#!M)!?z<3bblypJj40*JdeXU;tzzw`T@ z^W6ts4?ga?v)|Qs@zP|`o}Rq0`AP0M^PuaaCo_ZjJ>PFcem8R{P9zS!-DkV%AGTiV z_FioIbD%wtj1r&KfZX6rH;59EbbxR{e8Huu7fn!gZ)?!Ih}! z!WxEQe7m4%4aO?W2cqJrK6@9Rt42^3zOuh?e9D4{xeMza5Dh^n%*MIFD_qn`q(G5S ziY;*Tn5c7b$y&rU3*a@XsV}Na(3sO&vT~$>Fs?LEmxziPIyd}$VX?}Egk=cIm@NQJ zU3_E{v$8ZWLnL~tW1?Ava+fS(J@fd=B3HqqH6~>I%RCx+p*g?4qB_7}Shv)jK-l{l zxMG4o%=N~t$+U8!H1qv-SBmIHh;2!5gv5dv*MbQDFmqByXL5pYDFsbslQ=4e9Zjfo zJf;z(NCI&pO_V1h3?d=)Db7rLLIJ^w6O1T#5Y{@=9^q8S15Rte2tksrob~#+=$J|1-?BrqXyntCGsd3j$xWMI#)i!J;_22OOC+C|W@FR9(MmJVES#NvE6bkg z@^BUv21q@hHUttepmH0rsR*P^O7v6(=FZZ9aW4;d#|kswTpzkpjK7jj{}bSF-J}Xr zog=c}|6D@l;Cx(fvn>*}w~dUuog#ZP-a2YuMFCdQIGAob{oh2lp~l>pJn1|OY2p!A zII2LCW!aiux!RqZGrOhX!K0yz)!F*0bnR5`b@S)jqoc=rX8je-cxlA^RybwuZT1*{ zgX9*>t&NvYO7s23uTK}#LT6;P6St#wbjE0NnZ1&0ndVl%x#jgucW7cI(X~Zz?^>jD zzgoDfW2ScaTITN?XXY((cn>U+9R!P%@FKX^XaL#grr`0X7P9fC65Jw4n3AR%;$PPWMl)PfT8#O3&ED#wc7{Ihq{DW>Z^f{9`oYHE)&*eUYaIwU! z3Y?i74`3dZ@yD}^Pb`;lZ)J7DWffFsm}YG-#4OFFXoGXi!y)cs8w@j-U9F5UfAn{m zU`jE~=Mc*1`ly07V8Vu?6gZ3mDJK;O39b|+RA5ng1t`QlUn&h_7zE6`9Bp2N$%>CQ zSW;1fCdR7;t_$9upQ`q#pAlyK9HT(Y3)t&1`}|v$*R* z7@#R<_csI6TJf1sV*revsn2E?1B*G1bnX0dRl*U^cRArtcArJ`A;s^9szi+rK@W(! z6rhmkSX`7qml0yWj?APG!B_GMCZ517R>(ZA%b*j{99kq5r&*+Iwp7)fCaO?q?jd;6 zMmIQ0B9Rpum~ETo(Uu&{Fl!cc985pQT0{Ih^3O9HQmi+dYHF2d~D0a1HC+LP4E5q6Hq!Cl69$sq24m z&)<5a&{-*%PZRshgR_m%k5Q;?evWh8MzXC6HXnUGKUr5(FuhazTh___i87j-8s1oQ z%)GvIVD~=@(mmbg%jK4PQ%$C+bF=B6hMJS6IDP0pGapWWYc{?6wwVvtT213Z@wLo_qh<+}-ZCHyGioXDQc7hiG diff --git a/Assets/Scripts/ServerShared/Aetheria.Shared.Unity.asmdef b/Assets/Scripts/ServerShared/Aetheria.Shared.Unity.asmdef index ea3ce104d..418cb55d2 100644 --- a/Assets/Scripts/ServerShared/Aetheria.Shared.Unity.asmdef +++ b/Assets/Scripts/ServerShared/Aetheria.Shared.Unity.asmdef @@ -2,7 +2,6 @@ "name": "Aetheria.Shared.Unity", "rootNamespace": "", "references": [ - "MessagePack", "Unity.Mathematics", "UniRx", "Ink", diff --git a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs index 66562a6b2..40685f4f4 100644 --- a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs +++ b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using GameCult.Aetheria.State.Unity; -using MessagePack; using Unity.Mathematics; public interface IRuntimeItemCatalogReader @@ -223,9 +222,9 @@ public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemCatalogReader { return type .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) - .Select(field => (attribute: field.GetCustomAttribute(), field)) - .Where(entry => entry.attribute?.IntKey != null) - .Select(entry => (entry.attribute.IntKey.GetValueOrDefault(), entry.field)); + .Select(field => (attribute: field.GetCustomAttribute(), field)) + .Where(entry => entry.attribute != null) + .Select(entry => (entry.attribute.Key, entry.field)); } private static object ConvertValue(AetheriaRuntimeBehaviorValue value, Type targetType) @@ -253,7 +252,7 @@ public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemCatalogReader return ConvertList(value, targetType); } - if (targetType.GetCustomAttribute() != null) + if (GetKeyedFields(targetType).Any()) { return ConvertKeyedObject(value, targetType); } diff --git a/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs b/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs index a2c09d0aa..1eae81563 100644 --- a/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs +++ b/Assets/Scripts/ServerShared/Behaviors/AetherDrive.cs @@ -2,50 +2,49 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] +[Inspectable, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] public class AetherDriveData : BehaviorData { - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public float3 RotorDiameter; - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public float3 RotorMass; - [Inspectable, Key(3), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(3), RuntimeInspectable] public PerformanceStat MaximumRpm; - [Inspectable, Key(4)] + [Inspectable, RuntimeCatalogKey(4)] public float3 CouplingLambda; - [Inspectable, Key(5)] + [Inspectable, RuntimeCatalogKey(5)] public PerformanceStat LambdaMultiplier; - [Inspectable, Key(6), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(6), RuntimeInspectable] public PerformanceStat CouplingEfficiency; - [Inspectable, Key(7), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(7), RuntimeInspectable] public PerformanceStat Torque; - [Inspectable, Key(8), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(8), RuntimeInspectable] public BezierCurve TorqueProfile; - [Inspectable, Key(9), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(9), RuntimeInspectable] public PerformanceStat EnergyDraw; - [Inspectable, Key(10), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(10), RuntimeInspectable] public PerformanceStat PassiveCoupling; - [InspectableAudioParameter, Key(11), RuntimeInspectable] + [InspectableAudioParameter, RuntimeCatalogKey(11), RuntimeInspectable] public uint RpmAudioParameter; - [InspectableAudioParameter, Key(12), RuntimeInspectable] + [InspectableAudioParameter, RuntimeCatalogKey(12), RuntimeInspectable] public uint TorqueRatioAudioParameter; - [InspectablePrefab, Key(13)] + [InspectablePrefab, RuntimeCatalogKey(13)] public string Particles; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/AutoWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/AutoWeapon.cs index 19ac49573..fa6a183fa 100644 --- a/Assets/Scripts/ServerShared/Behaviors/AutoWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/AutoWeapon.cs @@ -1,11 +1,10 @@ using System; using System.Collections; using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class AutoWeaponData : InstantWeaponData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 333fea738..5d713f52b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -6,7 +6,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; using static Unity.Mathematics.noise; @@ -28,7 +27,7 @@ public abstract class Behavior if(Item != null) { var hardpoint = Entity.Hardpoints[Item.Position.x, Item.Position.y]; - if (hardpoint != null && Entity.HardpointTransforms.ContainsKey(hardpoint)) + if (hardpoint != null && Entity.HardpointTransforms.ContainsRuntimeCatalogKey(hardpoint)) { return normalize(Entity.HardpointTransforms[hardpoint].direction); } @@ -140,7 +139,6 @@ public interface IPopulationAssignment int AssignedPopulation { get; set; } } -[MessagePackObject] public abstract class PersistentBehaviorData { } @@ -148,7 +146,7 @@ public abstract class PersistentBehaviorData [Inspectable] public abstract class BehaviorData { - [Inspectable, Key(0)] + [Inspectable, RuntimeCatalogKey(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 e677b5251..080cc8daa 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Capacitor.cs @@ -3,17 +3,16 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class CapacitorData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Capacity = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 ef0dccb3a..b065a8f14 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ChargedWeapon.cs @@ -1,47 +1,46 @@ using System; using System.Collections; using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class ChargedWeaponData : InstantWeaponData { - [Inspectable, Key(21), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(21), RuntimeInspectable] public PerformanceStat ChargeTime = new PerformanceStat(); - [Inspectable, Key(22), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(22), RuntimeInspectable] public PerformanceStat ChargeEnergy = new PerformanceStat(); - [Inspectable, Key(23), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(23), RuntimeInspectable] public PerformanceStat ChargeHeat = new PerformanceStat(); - [Inspectable, Key(24)] + [Inspectable, RuntimeCatalogKey(24)] public bool CanFireEarly; - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(25)] public float FailureCharge; - [Inspectable, Key(26)] + [Inspectable, RuntimeCatalogKey(26)] public float FailureDamage = 1; - [Inspectable, Key(27)] + [Inspectable, RuntimeCatalogKey(27)] public float ChargeFiringDamageMultiplier = 1; - [Inspectable, Key(28)] + [Inspectable, RuntimeCatalogKey(28)] public float ChargeFiringSpreadMultiplier = 1; - [Inspectable, Key(29)] + [Inspectable, RuntimeCatalogKey(29)] public float ChargeFiringBurstCountMultiplier = 1; - [Inspectable, Key(30)] + [Inspectable, RuntimeCatalogKey(30)] public float ChargeFiringVisibilityMultiplier = 1; - [Inspectable, Key(31)] + [Inspectable, RuntimeCatalogKey(31)] public float ChargeFiringVelocityMultiplier = 1; - [Inspectable, Key(32)] + [Inspectable, RuntimeCatalogKey(32)] public float ChargeFiringHeatMultiplier = 1; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Cockpit.cs b/Assets/Scripts/ServerShared/Behaviors/Cockpit.cs index a1146950d..2d229775a 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Cockpit.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Cockpit.cs @@ -3,11 +3,10 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class CockpitData : BehaviorData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs index eefa7028c..c0a1e20a4 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ConstantWeapon.cs @@ -3,14 +3,13 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject] +[Inspectable] public class ConstantWeaponData : WeaponData { - [InspectablePrefab, Key(17)] + [InspectablePrefab, RuntimeCatalogKey(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 04890e549..f1db8eb26 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs @@ -4,14 +4,13 @@ using System; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, Order(-10), RuntimeInspectable] +[Inspectable, Order(-10), RuntimeInspectable] public class CooldownData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 13f5f0c1d..6f1656949 100644 --- a/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs +++ b/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs @@ -4,14 +4,13 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(-20), RuntimeInspectable] +[Inspectable, Order(-20), RuntimeInspectable] public class EnergyDrawData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat EnergyDraw = new PerformanceStat(); - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(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 59aec861d..7bf3ae887 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Heat.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Heat.cs @@ -4,14 +4,13 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(10)] +[Inspectable, Order(10)] public class HeatData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public bool PerSecond; public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/HeatStorage.cs b/Assets/Scripts/ServerShared/Behaviors/HeatStorage.cs index 01c3de3e3..7d6bd03d3 100644 --- a/Assets/Scripts/ServerShared/Behaviors/HeatStorage.cs +++ b/Assets/Scripts/ServerShared/Behaviors/HeatStorage.cs @@ -3,11 +3,10 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class HeatStorageData : BehaviorData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs index afdab140e..d6fce87e7 100644 --- a/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/InstantWeapon.cs @@ -1,23 +1,22 @@ using System; using System.Collections; using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class InstantWeaponData : WeaponData { - [Inspectable, Key(17)] + [Inspectable, RuntimeCatalogKey(17)] public PerformanceStat Count = new PerformanceStat(); - [Inspectable, Key(18)] + [Inspectable, RuntimeCatalogKey(18)] public PerformanceStat BurstTime = new PerformanceStat(); - [Inspectable, Key(19), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(19), RuntimeInspectable] public PerformanceStat Cooldown = new PerformanceStat(); - [InspectablePrefab, Key(20)] + [InspectablePrefab, RuntimeCatalogKey(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 47620ff08..dac81f838 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs @@ -4,11 +4,10 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(-5), RuntimeInspectable] +[Inspectable, Order(-5), RuntimeInspectable] public class ItemUsageData : BehaviorData { - [InspectableDatabaseLink(typeof(SimpleCommodityData)), Key(1), RuntimeInspectable] + [InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(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 3532b4d2c..30c1ca0e0 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Launcher.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Launcher.cs @@ -2,28 +2,27 @@ * 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 Unity.Mathematics; -[Inspectable, MessagePackObject] +[Inspectable] public class LauncherData : LockWeaponData { - [InspectableAnimationCurve, Key(26)] + [InspectableAnimationCurve, RuntimeCatalogKey(26)] public float4[] GuidanceCurve; - [InspectableAnimationCurve, Key(27)] + [InspectableAnimationCurve, RuntimeCatalogKey(27)] public float4[] ThrustCurve; - [InspectableAnimationCurve, Key(28)] + [InspectableAnimationCurve, RuntimeCatalogKey(28)] public float4[] LiftCurve; - [Inspectable, Key(29)] + [Inspectable, RuntimeCatalogKey(29)] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, Key(30)] + [Inspectable, RuntimeCatalogKey(30)] public float DodgeFrequency; - [Inspectable, Key(31), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(31), RuntimeInspectable] public PerformanceStat MissileVelocity = new PerformanceStat(); public override Behavior CreateInstance(EquippedItem item) @@ -32,25 +31,25 @@ public class LauncherData : LockWeaponData } } -[Inspectable, MessagePackObject] +[Inspectable] public class GuidedWeaponData : InstantWeaponData { - [InspectableAnimationCurve, Key(21)] + [InspectableAnimationCurve, RuntimeCatalogKey(21)] public float4[] GuidanceCurve; - [InspectableAnimationCurve, Key(22)] + [InspectableAnimationCurve, RuntimeCatalogKey(22)] public float4[] ThrustCurve; - [InspectableAnimationCurve, Key(23)] + [InspectableAnimationCurve, RuntimeCatalogKey(23)] public float4[] LiftCurve; - [Inspectable, Key(24)] + [Inspectable, RuntimeCatalogKey(24)] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(25)] public float DodgeFrequency; - [Inspectable, Key(26), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 5364efb60..919292002 100644 --- a/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/LockWeapon.cs @@ -1,26 +1,25 @@ using System; using System.Collections; using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class LockWeaponData : InstantWeaponData { - [Inspectable, Key(21), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(21), RuntimeInspectable] public PerformanceStat LockSpeed = new PerformanceStat(); - [Inspectable, Key(22)] + [Inspectable, RuntimeCatalogKey(22)] public PerformanceStat SensorImpact = new PerformanceStat(); - [Inspectable, Key(23), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(23), RuntimeInspectable] public PerformanceStat LockAngle = new PerformanceStat(); - [Inspectable, Key(24)] + [Inspectable, RuntimeCatalogKey(24)] public PerformanceStat DirectionImpact = new PerformanceStat(); - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(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 ac6df02ae..8dde9db84 100644 --- a/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs +++ b/Assets/Scripts/ServerShared/Behaviors/MiningTool.cs @@ -4,23 +4,22 @@ using System; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, Order(10)] +[Inspectable, Order(10)] public class MiningToolData : BehaviorData { - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public PerformanceStat DamagePerSecond = new PerformanceStat(); - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, Key(3)] + [Inspectable, RuntimeCatalogKey(3)] public PerformanceStat Penetration = new PerformanceStat(); - [Inspectable, Key(4)] + [Inspectable, RuntimeCatalogKey(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 85ee832a4..5224986e8 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Radiator.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Radiator.cs @@ -2,29 +2,28 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class RadiatorData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Emissivity = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(2), RuntimeInspectable] public PerformanceStat PumpedHeat = new PerformanceStat(); - [InspectableTemperature, Key(3), RuntimeInspectable] + [InspectableTemperature, RuntimeCatalogKey(3), RuntimeInspectable] public float TemperatureFloor; - [Inspectable, Key(4), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(4), RuntimeInspectable] public PerformanceStat WasteHeat = new PerformanceStat(); - [Inspectable, Key(5), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(5), RuntimeInspectable] public PerformanceStat EnergyUsage = new PerformanceStat(); - [Inspectable, Key(6), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 341cd0ba3..a24ac2b52 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reactor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reactor.cs @@ -5,24 +5,23 @@ using System; using System.Collections.Generic; using System.Linq; -using MessagePack; using UniRx; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class ReactorData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Charge = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(2), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, Key(3), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(3), RuntimeInspectable] public PerformanceStat OverloadEfficiency = new PerformanceStat(); - [Inspectable, Key(4), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 c30554567..cfac502b8 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reflector.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reflector.cs @@ -2,17 +2,16 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class ReflectorData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat CrossSection = new PerformanceStat(); - // [InspectableAnimationCurve, Key(1)] + // [InspectableAnimationCurve, RuntimeCatalogKey(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 aef533138..b328277b5 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs @@ -4,20 +4,19 @@ using System; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class ResourceScannerData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Range = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(2), RuntimeInspectable] public PerformanceStat MinimumDensity = new PerformanceStat(); - [Inspectable, Key(3), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 6b6d8c372..35b36a5a3 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs @@ -4,38 +4,37 @@ using System; using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class SensorData : BehaviorData { - [Inspectable, Key(3), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(3), RuntimeInspectable] public PerformanceStat Sensitivity = new PerformanceStat(); - [InspectableAnimationCurve, Key(4), RuntimeInspectable] + [InspectableAnimationCurve, RuntimeCatalogKey(4), RuntimeInspectable] public BezierCurve SensitivityCurve; - [Inspectable, Key(5), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(5), RuntimeInspectable] public PerformanceStat PingBoost; - [Inspectable, Key(6), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(6), RuntimeInspectable] public PerformanceStat PingEnergy; - [Inspectable, Key(7), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(7), RuntimeInspectable] public PerformanceStat PingVisibility; - [Inspectable, Key(8), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(8), RuntimeInspectable] public PerformanceStat PingRange; - [Inspectable, Key(9), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(9), RuntimeInspectable] public PerformanceStat PingCooldown; - [Inspectable, Key(10)] + [Inspectable, RuntimeCatalogKey(10)] public float PingDuration = 2; - [Inspectable, Key(11)] + [Inspectable, RuntimeCatalogKey(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 e9abd36fe..58e2d654b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Shield.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Shield.cs @@ -2,17 +2,16 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class ShieldData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 b03fb5db2..2559a3cd1 100644 --- a/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs +++ b/Assets/Scripts/ServerShared/Behaviors/StatModifier.cs @@ -4,20 +4,19 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject] +[Inspectable] public class StatModifierData : BehaviorData { - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public StatReference Stat = new StatReference(); - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public PerformanceStat Modifier = new PerformanceStat(); - [Inspectable, Key(3)] + [Inspectable, RuntimeCatalogKey(3)] public StatModifierType Type; - [InspectableType(typeof(BehaviorData)), Key(4)] + [InspectableType(typeof(BehaviorData)), RuntimeCatalogKey(4)] public Type RequireBehavior; public override Behavior CreateInstance(EquippedItem item) @@ -128,12 +127,12 @@ public enum StatModifierType Multiplier } -[Inspectable, MessagePackObject] +[Inspectable] public class StatReference { - [InspectableType(typeof(BehaviorData)), Key(1)] + [InspectableType(typeof(BehaviorData)), RuntimeCatalogKey(1)] public string Target; - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public string Stat; } \ No newline at end of file diff --git a/Assets/Scripts/ServerShared/Behaviors/Switch.cs b/Assets/Scripts/ServerShared/Behaviors/Switch.cs index 0db096d01..b446d7219 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Switch.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Switch.cs @@ -4,8 +4,7 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(-25)] +[Inspectable, Order(-25)] public class SwitchData : BehaviorData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs index 5c741464a..3ca2a3d61 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs @@ -4,17 +4,16 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(-22)] +[Inspectable, Order(-22)] public class ThermotoggleData : BehaviorData { - [InspectableTemperature, Key(1)] + [InspectableTemperature, RuntimeCatalogKey(1)] public float TargetTemperature; - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public bool HighPass; - [Inspectable, Key(3)] + [Inspectable, RuntimeCatalogKey(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 45e34ae29..c37d6001e 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs @@ -2,26 +2,25 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] +[Inspectable, EntityTypeRestriction(HullType.Ship), RuntimeInspectable] public class ThrusterData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Thrust = new PerformanceStat(); - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(2), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [Inspectable, Key(3), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(3), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [Inspectable, Key(4), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(4), RuntimeInspectable] public PerformanceStat EnergyUsage = new PerformanceStat(); - [InspectablePrefab, Key(5)] + [InspectablePrefab, RuntimeCatalogKey(5)] public string ParticlesPrefab; public override Behavior CreateInstance(EquippedItem item) @@ -80,7 +79,7 @@ public class Thruster : Behavior, IAnalogBehavior Unity.Mathematics.float2x2.Rotate(_input * Torque * Thrust * ItemManager.GameplaySettings.TorqueMultiplier / Entity.Mass * dt)); AddHeat(_input * Evaluate(_data.Heat) * dt); var vis = _input * Evaluate(_data.Visibility); - if (!Entity.VisibilitySources.ContainsKey(this) || vis > Entity.VisibilitySources[this]) + if (!Entity.VisibilitySources.ContainsRuntimeCatalogKey(this) || vis > Entity.VisibilitySources[this]) Entity.VisibilitySources[this] = vis; return true; } diff --git a/Assets/Scripts/ServerShared/Behaviors/Trigger.cs b/Assets/Scripts/ServerShared/Behaviors/Trigger.cs index a56e684ca..f21ec6d95 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Trigger.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Trigger.cs @@ -4,8 +4,7 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, Order(-20)] +[Inspectable, Order(-20)] public class TriggerData : BehaviorData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/TurretController.cs b/Assets/Scripts/ServerShared/Behaviors/TurretController.cs index 51004d4ab..87ad77f9b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/TurretController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/TurretController.cs @@ -4,13 +4,12 @@ using System.Collections.Generic; using System.Linq; -using MessagePack; using UniRx; using Unity.Mathematics; using static Unity.Mathematics.math; using float3 = Unity.Mathematics.float3; -[MessagePackObject, RuntimeInspectable] +[RuntimeInspectable] public class TurretControllerData : BehaviorData { public override Behavior CreateInstance(EquippedItem item) diff --git a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs index dfb2a3d39..ee8a1a04b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs @@ -2,14 +2,13 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, RuntimeInspectable] +[RuntimeInspectable] public class VelocityConversionData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 596e3b234..9204f24d2 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs @@ -2,14 +2,13 @@ * 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 Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class VelocityLimitData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(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 6ce82b5af..e5b314c48 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Visibility.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Visibility.cs @@ -4,14 +4,13 @@ using System; using System.Linq; -using MessagePack; -[Inspectable, MessagePackObject, RuntimeInspectable] +[Inspectable, RuntimeInspectable] public class VisibilityData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(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 4b1d3e6a9..12ec9f829 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs @@ -5,59 +5,58 @@ using System; using System.Collections.Generic; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; [Inspectable, RuntimeInspectable] public abstract class WeaponData : BehaviorData { - [Inspectable, Key(1), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(1), RuntimeInspectable] public DamageType DamageType; - [Inspectable, Key(2), RuntimeInspectable] + [Inspectable, RuntimeCatalogKey(2), RuntimeInspectable] public PerformanceStat Damage = new PerformanceStat(); - [InspectableRangedFloat(0,1), Key(3), RuntimeInspectable] + [InspectableRangedFloat(0,1), RuntimeCatalogKey(3), RuntimeInspectable] public PerformanceStat Penetration = new PerformanceStat(); - [InspectableRangedFloat(0,1), Key(4)] + [InspectableRangedFloat(0,1), RuntimeCatalogKey(4)] public PerformanceStat DamageSpread = new PerformanceStat(); - [Inspectable, Key(5)] + [Inspectable, RuntimeCatalogKey(5)] public PerformanceStat MinRange = new PerformanceStat(); - [Inspectable, Key(6)] + [Inspectable, RuntimeCatalogKey(6)] public PerformanceStat Range = new PerformanceStat(); - [InspectableAnimationCurve, Key(7)] + [InspectableAnimationCurve, RuntimeCatalogKey(7)] public BezierCurve DamageCurve; - [InspectablePrefab, Key(8)] + [InspectablePrefab, RuntimeCatalogKey(8)] public string EffectPrefab; - [InspectablePrefab, Key(9), RuntimeInspectable] + [InspectablePrefab, RuntimeCatalogKey(9), RuntimeInspectable] public PerformanceStat Energy = new PerformanceStat(); - [InspectablePrefab, Key(10), RuntimeInspectable] + [InspectablePrefab, RuntimeCatalogKey(10), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); - [InspectablePrefab, Key(11), RuntimeInspectable] + [InspectablePrefab, RuntimeCatalogKey(11), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); - [InspectableDatabaseLink(typeof(SimpleCommodityData)), Key(12), RuntimeInspectable] + [InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(12), RuntimeInspectable] public Guid AmmoType; - [InspectablePrefab, Key(13)] + [InspectablePrefab, RuntimeCatalogKey(13)] public int MagazineSize; - [InspectablePrefab, Key(14)] + [InspectablePrefab, RuntimeCatalogKey(14)] public float ReloadTime = 1; - [InspectablePrefab, Key(15)] + [InspectablePrefab, RuntimeCatalogKey(15)] public PerformanceStat Spread = new PerformanceStat(); - [Inspectable, Key(16)] + [Inspectable, RuntimeCatalogKey(16)] public PerformanceStat Velocity = new PerformanceStat(); } diff --git a/Assets/Scripts/ServerShared/Behaviors/Wear.cs b/Assets/Scripts/ServerShared/Behaviors/Wear.cs index 9873e71f3..f22ab6f7e 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Wear.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Wear.cs @@ -3,14 +3,13 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System.Collections.Generic; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[Inspectable, MessagePackObject, Order(1000), RuntimeInspectable] +[Inspectable, Order(1000), RuntimeInspectable] public class WearData : BehaviorData { - [InspectableTemperature, Key(1)] + [InspectableTemperature, RuntimeCatalogKey(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 75e0bf746..61fd09546 100644 --- a/Assets/Scripts/ServerShared/BezierCurve.cs +++ b/Assets/Scripts/ServerShared/BezierCurve.cs @@ -1,21 +1,18 @@ using System; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject] public class BezierCurve { - [Key(0)] public float4[] Keys; + [RuntimeCatalogKey(0)] public float4[] Keys; - [IgnoreMember] private int2 _cachedIndices; + private int2 _cachedIndices; - [IgnoreMember] private const int STEPS = 64; + private const int STEPS = 64; - [IgnoreMember] private float? _maximum; + private float? _maximum; - [IgnoreMember] public float Maximum { get diff --git a/Assets/Scripts/ServerShared/ItemData.cs b/Assets/Scripts/ServerShared/ItemData.cs index c16665e9e..badfe1ed3 100644 --- a/Assets/Scripts/ServerShared/ItemData.cs +++ b/Assets/Scripts/ServerShared/ItemData.cs @@ -6,16 +6,15 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using MessagePack; using Unity.Mathematics; using static Unity.Mathematics.math; using float2 = Unity.Mathematics.float2; using int2 = Unity.Mathematics.int2; -[Inspectable, MessagePackObject] +[Inspectable] public class Shape { - [Key(0)] public bool[,] Cells; + [RuntimeCatalogKey(0)] public bool[,] Cells; private bool _dirty = true; @@ -30,14 +29,12 @@ public class Shape Cells = new bool[width, height]; } - [IgnoreMember] public int Width { get { return Cells.GetLength(0); } set { Resize(value, Height); } } - [IgnoreMember] public int Height { get { return Cells.GetLength(1); } @@ -77,7 +74,6 @@ public class Shape private int2[] _cachedShapeCoordinates; - [IgnoreMember] public int2[] Coordinates { get @@ -104,7 +100,6 @@ public class Shape private int2[] _cachedAllShapeCoordinates; - [IgnoreMember] public int2[] AllCoordinates => _cachedAllShapeCoordinates ?? (_cachedAllShapeCoordinates = EnumerateAllShapeCoordinates().ToArray()); private IEnumerable EnumerateAllShapeCoordinates() @@ -120,7 +115,6 @@ public class Shape private float2? _centerOfMass; - [IgnoreMember] public float2 CenterOfMass => _centerOfMass ?? (_centerOfMass = Coordinates .Aggregate(float2.zero, (total, coord) => total + coord) / Coordinates.Length).Value; @@ -266,35 +260,34 @@ public class Shape } -[MessagePackObject] public abstract class ItemData : DatabaseEntry, INamedEntry { - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public string Name; - [InspectableText, Key(2)] + [InspectableText, RuntimeCatalogKey(2)] public string Description; - [InspectableDatabaseLink(typeof(Faction)), Key(3)] + [InspectableDatabaseLink(typeof(Faction)), RuntimeCatalogKey(3)] public Guid Manufacturer; - [Inspectable, Key(4)] + [Inspectable, RuntimeCatalogKey(4)] public float Mass; - [InspectableSchematicShape, Key(5)] + [InspectableSchematicShape, RuntimeCatalogKey(5)] public Shape Shape; // Heat needed to change temperature of 1 gram by 1 degree - [Inspectable, Key(6)] + [Inspectable, RuntimeCatalogKey(6)] public float SpecificHeat = 1; - [Inspectable, Key(7)] + [Inspectable, RuntimeCatalogKey(7)] public float Conductivity = 1; - [Inspectable, Key(8)] + [Inspectable, RuntimeCatalogKey(8)] public int Price = 0; - [IgnoreMember] public string EntryName + public string EntryName { get => Name; set => Name = value; @@ -302,117 +295,114 @@ public abstract class ItemData : DatabaseEntry, INamedEntry } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class SimpleCommodityData : ItemData { // // Types of body where this resource can be found - // [InspectableField, Key(6)] + // [InspectableField, RuntimeCatalogKey(6)] // public BodyType ResourceBodyType; // // // Link to map(s) controlling density of resource, multiplied together when more than one - // [InspectableDatabaseLink(typeof(GalaxyMapLayerData)), Key(7)] + // [InspectableDatabaseLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)] // public List ResourceDensity = new List(); // // // Controls the lowest value in the resource distribution curve - // [InspectableField, Key(8)] + // [InspectableField, RuntimeCatalogKey(8)] // public ExponentialLerp Distribution; // // // Minimum amount of resources needed for presence to register - // [InspectableField, Key(11)] + // [InspectableField, RuntimeCatalogKey(11)] // public float Floor = 5f; - [Inspectable, Key(9)] + [Inspectable, RuntimeCatalogKey(9)] public int MaxStack = 10; - [Inspectable, Key(10)] + [Inspectable, RuntimeCatalogKey(10)] public SimpleCommodityCategory Category; } -[MessagePackObject] public abstract class CraftedItemData : ItemData { - // [Inspectable, Key(9)] + // [Inspectable, RuntimeCatalogKey(9)] // public float IngredientQualityWeight = .5f; } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class CompoundCommodityData : CraftedItemData { - [InspectableDatabaseLink(typeof(PersonalityAttribute)), Key(10)] + [InspectableDatabaseLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)] public Dictionary DemandProfile = new Dictionary(); - [Inspectable, Key(11)] + [Inspectable, RuntimeCatalogKey(11)] public CompoundCommodityCategory Category; } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class ConsumableItemData : CraftedItemData { - [Inspectable, Key(10)] + [Inspectable, RuntimeCatalogKey(10)] public List Behaviors = new List(); - [Inspectable, Key(11)] + [Inspectable, RuntimeCatalogKey(11)] public bool Stackable; - [Inspectable, Key(12)] + [Inspectable, RuntimeCatalogKey(12)] public float Duration; - [InspectableTexture, Key(13)] + [InspectableTexture, RuntimeCatalogKey(13)] public string Icon; - [Inspectable, Key(14)] + [Inspectable, RuntimeCatalogKey(14)] public BezierCurve Effectiveness; } public abstract class EquippableItemData : CraftedItemData { - [InspectableTexture, Key(10)] + [InspectableTexture, RuntimeCatalogKey(10)] public string Schematic; - [Inspectable, Key(11)] + [Inspectable, RuntimeCatalogKey(11)] public List Behaviors = new List(); - [Inspectable, Key(12)] + [Inspectable, RuntimeCatalogKey(12)] public float Durability; - [InspectableTemperature, Key(13)] + [InspectableTemperature, RuntimeCatalogKey(13)] public float MinimumTemperature; - [InspectableTemperature, Key(14)] + [InspectableTemperature, RuntimeCatalogKey(14)] public float MaximumTemperature; - // [InspectableField, Key(15), SimplePerformanceStat] + // [InspectableField, RuntimeCatalogKey(15), SimplePerformanceStat] // public PerformanceStat DurabilityExponent = new PerformanceStat(); // - // [InspectableField, Key(16), SimplePerformanceStat] + // [InspectableField, RuntimeCatalogKey(16), SimplePerformanceStat] // public PerformanceStat HeatExponent = new PerformanceStat(); - [InspectableAnimationCurve, Key(17)] + [InspectableAnimationCurve, RuntimeCatalogKey(17)] public BezierCurve HeatPerformanceCurve; - [Inspectable, Key(18)] + [Inspectable, RuntimeCatalogKey(18)] public float ThermalResilience = 1; - // [Inspectable, Key(19)] + // [Inspectable, RuntimeCatalogKey(19)] // public string SoundEffectTrigger; - [InspectableTexture, Key(20)] + [InspectableTexture, RuntimeCatalogKey(20)] public string ActionBarIcon; - [InspectableSoundBank, Key(21)] + [InspectableSoundBank, RuntimeCatalogKey(21)] public uint SoundBank; - [Inspectable, Key(22)] + [Inspectable, RuntimeCatalogKey(22)] public List AudioStats = new List(); - [IgnoreMember] public abstract HardpointType HardpointType { get; } - [IgnoreMember] private const int STEPS = 64; + private const int STEPS = 64; - [IgnoreMember] private float? _optimum; + private float? _optimum; - [IgnoreMember] public float OptimalTemperature { get @@ -443,85 +433,84 @@ public abstract class EquippableItemData : CraftedItemData } } -[Inspectable, MessagePackObject] +[Inspectable] public class AudioStat { - [InspectableAudioParameter, Key(0)] + [InspectableAudioParameter, RuntimeCatalogKey(0)] public uint Parameter; - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public PerformanceStat Stat = new PerformanceStat(); } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class GearData : EquippableItemData { - [Inspectable, Key(23)] + [Inspectable, RuntimeCatalogKey(23)] public HardpointType Hardpoint; - [IgnoreMember] public override HardpointType HardpointType => Hardpoint; + public override HardpointType HardpointType => Hardpoint; } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class CargoBayData : EquippableItemData { - [Inspectable, Key(24)] + [Inspectable, RuntimeCatalogKey(24)] public Shape InteriorShape; - [IgnoreMember] public override HardpointType HardpointType => HardpointType.Tool; + public override HardpointType HardpointType => HardpointType.Tool; } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class DockingBayData : CargoBayData { - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(25)] public int2 MaxSize; } -[LegacyCatalogGroup("Items"), MessagePackObject] +[LegacyCatalogGroup("Items")] public class WeaponItemData : GearData { - [Inspectable, Key(24)] + [Inspectable, RuntimeCatalogKey(24)] public WeaponRange WeaponRange; - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(25)] public WeaponCaliber WeaponCaliber; - [Inspectable, Key(26)] + [Inspectable, RuntimeCatalogKey(26)] public WeaponType WeaponType; - [Inspectable, Key(27)] + [Inspectable, RuntimeCatalogKey(27)] public WeaponFireType WeaponFireTypes; - [Inspectable, Key(28)] + [Inspectable, RuntimeCatalogKey(28)] public WeaponModifiers WeaponModifiers; } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class HullData : EquippableItemData { - [Inspectable, Key(23)] + [Inspectable, RuntimeCatalogKey(23)] public List Hardpoints = new List(); - [InspectablePrefab, Key(24)] + [InspectablePrefab, RuntimeCatalogKey(24)] public string Prefab; - [Inspectable, Key(25)] + [Inspectable, RuntimeCatalogKey(25)] public HullType HullType; - [Inspectable, Key(26)] + [Inspectable, RuntimeCatalogKey(26)] public float GridOffset; - [Inspectable, Key(27)] + [Inspectable, RuntimeCatalogKey(27)] public float Armor; - [Inspectable, Key(28)] + [Inspectable, RuntimeCatalogKey(28)] public float Drag; - [Inspectable, Key(29)] + [Inspectable, RuntimeCatalogKey(29)] public bool CanTow; - [IgnoreMember] public Shape InteriorCells { get @@ -537,25 +526,24 @@ public class HullData : EquippableItemData private Shape _interiorCells; - [IgnoreMember] public override HardpointType HardpointType => HardpointType.Hull; + public override HardpointType HardpointType => HardpointType.Hull; } -[Inspectable, MessagePackObject] +[Inspectable] public class HardpointData : ITintInspector { - [Inspectable, Key(0)] public HardpointType Type; - [Inspectable, Key(1)] public int2 Position; - [Inspectable, Key(2)] public Shape Shape = new Shape(); - [Inspectable, Key(3)] public string Transform; - [Inspectable, Key(4)] public ItemRotation Rotation; - [Inspectable, Key(5)] public float Armor; + [Inspectable, RuntimeCatalogKey(0)] public HardpointType Type; + [Inspectable, RuntimeCatalogKey(1)] public int2 Position; + [Inspectable, RuntimeCatalogKey(2)] public Shape Shape = new Shape(); + [Inspectable, RuntimeCatalogKey(3)] public string Transform; + [Inspectable, RuntimeCatalogKey(4)] public ItemRotation Rotation; + [Inspectable, RuntimeCatalogKey(5)] public float Armor; public override string ToString() { return $"{Enum.GetName(typeof(HardpointType), Type)} Hardpoint {Rotation.Arrow()}"; } - [IgnoreMember] public float3 TintColor { get @@ -573,46 +561,43 @@ public class HardpointData : ITintInspector x => ColorMath.HsvToRgb(float3(frac((float)(int)x/hardpointTypes.Length + .25f), 1, 1))); } - return _tintColors.ContainsKey(type) ? _tintColors[type] : _tintColors[HardpointType.Hull]; + return _tintColors.ContainsRuntimeCatalogKey(type) ? _tintColors[type] : _tintColors[HardpointType.Hull]; } private static Dictionary _tintColors; } -[MessagePackObject] public class PerformanceStat { - [Key(0)] public float Min; + [RuntimeCatalogKey(0)] public float Min; - [Key(1)] public float Max; + [RuntimeCatalogKey(1)] public float Max; - [Key(2)] + [RuntimeCatalogKey(2)] public float HeatExponentMultiplier; - [Key(3)] + [RuntimeCatalogKey(3)] public float DurabilityExponentMultiplier; - [Key(4)] + [RuntimeCatalogKey(4)] public float QualityExponent; - //[Key(5)] public Guid ID = Guid.NewGuid(); + //[RuntimeCatalogKey(5)] public Guid ID = Guid.NewGuid(); - // [Key(5)] public Guid? Ingredient; + // [RuntimeCatalogKey(5)] public Guid? Ingredient; - [IgnoreMember] private Dictionary> _scaleModifiers; - [IgnoreMember] private Dictionary> _constantModifiers; + private Dictionary> _scaleModifiers; + private Dictionary> _constantModifiers; - [IgnoreMember] private Dictionary> ScaleModifiers => _scaleModifiers = _scaleModifiers ?? new Dictionary>(); - [IgnoreMember] private Dictionary> ConstantModifiers => _constantModifiers = _constantModifiers ?? new Dictionary>(); public Dictionary GetScaleModifiers(Entity entity) { - if(!ScaleModifiers.ContainsKey(entity)) + if(!ScaleModifiers.ContainsRuntimeCatalogKey(entity)) ScaleModifiers[entity] = new Dictionary(); return ScaleModifiers[entity]; @@ -620,26 +605,26 @@ public class PerformanceStat public Dictionary GetConstantModifiers(Entity entity) { - if(!ConstantModifiers.ContainsKey(entity)) + if(!ConstantModifiers.ContainsRuntimeCatalogKey(entity)) ConstantModifiers[entity] = new Dictionary(); return ConstantModifiers[entity]; } } -[LegacyCatalogGroup("Items"), Inspectable, MessagePackObject] +[LegacyCatalogGroup("Items"), Inspectable] public class PersonalityAttribute : DatabaseEntry, INamedEntry { - [Inspectable, Key(1)] + [Inspectable, RuntimeCatalogKey(1)] public string Name; - [Inspectable, Key(2)] + [Inspectable, RuntimeCatalogKey(2)] public string LowName; - [Inspectable, Key(3)] + [Inspectable, RuntimeCatalogKey(3)] public string HighName; - [IgnoreMember] public string EntryName + public string EntryName { get => Name; set => Name = value; diff --git a/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs b/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs new file mode 100644 index 000000000..0ae5a3294 --- /dev/null +++ b/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs @@ -0,0 +1,12 @@ +using System; + +[AttributeUsage(AttributeTargets.Field)] +public sealed class RuntimeCatalogKeyAttribute : Attribute +{ + public RuntimeCatalogKeyAttribute(int key) + { + Key = key; + } + + public int Key { get; } +} diff --git a/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs.meta b/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs.meta new file mode 100644 index 000000000..6aa76295b --- /dev/null +++ b/Assets/Scripts/ServerShared/RuntimeCatalogKeyAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d84c2d3401b6477a9e708b7aa559f02b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 69c713957..1615c14d9 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -221,7 +221,15 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - Legacy player, faction, name-file, galaxy-map-layer, and narrative helper DTOs no longer carry MessagePack object/key/ignore metadata. Typed corporation/name-file/catalog documents own durable state; these classes are - inspector/runtime projections only. + inspector/runtime projections only. Item and behavior DTO field layout for + `AetheriaRuntimeItemCatalog` no longer depends on MessagePack attributes. The + temporary bridge uses `RuntimeCatalogKeyAttribute` while typed item instances + and behavior factories are being built. +- `Aetheria.Shared.Unity` no longer references the vendored `MessagePack` + assembly. The embedded `GameCult.Aetheria.State.Unity` package still depends + on MessagePackReader to open CultCache `.cc` records; that dependency belongs + to the typed state package boundary until it can move to a modern CultLib + Unity package. - The dead story compiled-JSON cache sketch and its SHA helper are deleted; story compilation currently reads Ink source directly until a typed Verse story/cache document exists. @@ -266,8 +274,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. item records for the old simulation object model. `DatabaseEntry` no longer carries MessagePack union metadata, and behavior type selection now uses an explicit runtime catalog map instead of `UnionAttribute` reflection. - Remaining item/behavior DTO MessagePack keys are temporary projection metadata - until typed behavior factories replace reflection. Item properties + Item/behavior DTO field layout for the temporary projection bridge is now + marked with project-owned `RuntimeCatalogKeyAttribute`, 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 console `give` command have been deleted. No live caller can enumerate legacy @@ -456,6 +465,12 @@ First Aetheria surfaces to publish: - Done: demote legacy player, faction, name-file, galaxy-map-layer, and narrative helper DTOs from MessagePack metadata to plain runtime/inspector shapes. + - Done: replace remaining item/behavior DTO MessagePack field metadata with + `RuntimeCatalogKeyAttribute`; no live `Assets/Scripts` source depends on + MessagePack, Newtonsoft, RethinkDB, or bespoke save-file serializer symbols. + - Done: remove the stale `MessagePack` assembly reference from + `Aetheria.Shared.Unity`; the remaining MessagePack reference is contained + in the typed state package's `.cc` reader. - Convert domain references from GUID/base-class patterns to typed record refs. - Remove runtime dependency on `ItemData` DTOs as item instance owners.