From 477e1b2ed5ed782b700a858c95b3e25e125c3df5 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 10:54:17 +0100 Subject: [PATCH] Keep behavior config bridge inside item manager --- .voidbot/state/aetheria.cc | Bin 83961 -> 83925 bytes .../AetheriaRuntimeItemCatalog.cs | 222 ------------------ Assets/Scripts/ServerShared/ItemManager.cs | 206 +++++++++++++++- docs/aetheria-perfect-machine-map.md | 20 +- 4 files changed, 216 insertions(+), 232 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 6463f9164082c0e0bd2cd11180e4b0eaf2de0202..40c37be7d51e87a0cc001c3e35105a7ffa4a2f9c 100644 GIT binary patch delta 1154 zcmZux%TE(Q7|-w$MH5MsB7%HI6r0FeXn7T?C|pnwLxM3in4NB??MQcLnccRQi!q#x ziA2^o#;cEmV&cJs#Dj)|7Y`;LJOKU!UNk*=bGF?rJ-CO>=G&R?`@LrVt~LHxYkdE@ zu6b}E8W~c;!%nF_;C!ijc)%}=#vh}j4y#}BDA2GX8|*^MFrHFk;)_|a-!GnGRfdPW!zG0pqQN9 zA)0N0T{KA&65bjxaWTtq(gJGO3?vYfamOOT&eh~wRPURS0p|;oO)}pF_I37l`t<~W=v2jxN7yAa$hlL%~IK?De8#u9S z#tCQ@QTil1smdN`56z|P(^3s7crKBpS`B#bzq?HwJAt|*oS0dx5vb9u*Yefz$$1h{ zW6OsnZ>5usWC1SQX`(5Y{IP! zHG!qXpH37gN4(pM_y)<-Br!DN(q3PE!AWX+hNnTSjG|8Wbx>%ds7-{+>#h6;x^TowBC%IOtv$55zxABe4S)Zrif(P8)Ki_UTM*(*gt kA@6=@dKyE_ulDzs7e0!i`_)qUBH2_fpsoFWZ6Ff=2Q*8QnE(I) delta 1176 zcmZ8hO>9j;6wb6IenLv3B_s|hQoPsKpO<>?sYu&sghoqa(Xg1_JNLfPd+%H`b6Z5x zh=quRa3zy&{Vl}8f=Gm5Va>*Zou!>F1UqM5?=5v#cV^C<^PTVe=6t%f;`gl;Paid{ z>g%hP`-|PBbfLLDecyCrb-qzCZx51fY0|9MWLw=mlefvHbX5zGS64e*UUasQg(5j^ zOdlC7g-lbIYFd2g1eAwg$jwul>QUixk2498fIvh({z*2K@W3^#9c1&I$9)B!6d~w3 z0|)O1!Us>-u=5F*EM$=eTq;af&{Xu&fk!H4j#gl!1+x zK~|?TTu22pa%}}JVc23k#&JDEgZ_l6{f)z^EEJ~ksLP`v4=zGTwNvMj4_txE0_IbV z6|?~Jb0^uo52&Xbt;vuE{E`g}xi1?*du<&Ioo10L!i0HUAzOA($6-p@Y&^o75e;mz zqlkEvMij}p^SsUc=p)b4j~_OyjFYK=J7z-%X*XlNq-9Pr>MBb{4z>^o2Xk1+py>q> ziI6iacO=n?WUx#C$>M-Ii+rlONCFoU#Xw)Qq~!@gAwDi5Tg0P|77|IwgoXXsSsnY; zbsA+VYH&n^8p80z2~~VdBd0FpN#?1$>GEYRSv;6?MZtm?S=LQGIs56aS7Q}3X zHJ9?{s^hl$izKEJr7tvk%XKi{yU6jTkwrE)E!yBeHqE+zq-%T+8JjyZN@K+72#KsU z{E)XR6~(CN#8v*cL1@U7F#SIOFq%gL~>);z9~p|*0hT&|W%#nR$8`9M=& z&70;LnKjpHq_i{}y3>!%Tk^5c({0Cs`Bfut@_?SQ9UeFG;nHKi*0AAo1LR76skdY= Py;yUIyj#7r*E{(Ka~Yki diff --git a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs index 95193eead..4f1f87f4f 100644 --- a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs +++ b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs @@ -1,54 +1,16 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Reflection; using GameCult.Aetheria.State.Unity; -using Unity.Mathematics; public interface IRuntimeItemCatalogReader { AetheriaRuntimeCatalogItem GetRuntimeItem(Guid guid); - IReadOnlyList GetTemporaryBehaviorConfigs(Guid guid); } public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemCatalogReader { private readonly Dictionary _typedItems; - private static readonly IReadOnlyDictionary BehaviorTypesByKind = new Dictionary(StringComparer.Ordinal) - { - { "GuidedWeapon", typeof(GuidedWeaponData) }, - { "Launcher", typeof(LauncherData) }, - { "Reactor", typeof(ReactorData) }, - { "Radiator", typeof(RadiatorData) }, - { "StatModifier", typeof(StatModifierData) }, - { "Sensor", typeof(SensorData) }, - { "Reflector", typeof(ReflectorData) }, - { "Shield", typeof(ShieldData) }, - { "Thruster", typeof(ThrusterData) }, - { "Wear", typeof(WearData) }, - { "VelocityConversion", typeof(VelocityConversionData) }, - { "VelocityLimit", typeof(VelocityLimitData) }, - { "AetherDrive", typeof(AetherDriveData) }, - { "Cooldown", typeof(CooldownData) }, - { "Heat", typeof(HeatData) }, - { "ItemUsage", typeof(ItemUsageData) }, - { "Switch", typeof(SwitchData) }, - { "Trigger", typeof(TriggerData) }, - { "Visibility", typeof(VisibilityData) }, - { "Thermotoggle", typeof(ThermotoggleData) }, - { "EnergyDraw", typeof(EnergyDrawData) }, - { "MiningTool", typeof(MiningToolData) }, - { "ResourceScanner", typeof(ResourceScannerData) }, - { "Capacitor", typeof(CapacitorData) }, - { "Cockpit", typeof(CockpitData) }, - { "HeatStorage", typeof(HeatStorageData) }, - { "TurretController", typeof(TurretControllerData) }, - { "InstantWeapon", typeof(InstantWeaponData) }, - { "ConstantWeapon", typeof(ConstantWeaponData) }, - { "ChargedWeapon", typeof(ChargedWeaponData) }, - { "AutoWeapon", typeof(AutoWeaponData) } - }; public AetheriaRuntimeItemCatalog(AetheriaRuntimeCatalogSnapshot catalog) { @@ -64,188 +26,4 @@ public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemCatalogReader _typedItems.TryGetValue(guid, out var item); return item; } - - public IReadOnlyList GetTemporaryBehaviorConfigs(Guid guid) - { - var item = GetRuntimeItem(guid); - return item == null - ? Array.Empty() - : BuildBehaviorConfigs(item); - } - - private static BehaviorData[] BuildBehaviorConfigs(AetheriaRuntimeCatalogItem item) - { - return item.BehaviorPayloads - .Select(BuildBehaviorConfig) - .Where(behavior => behavior != null) - .ToArray(); - } - - private static PerformanceStat ProjectPerformanceStat(AetheriaRuntimePerformanceStat stat) - { - return new PerformanceStat - { - Min = (float)stat.Min, - Max = (float)stat.Max, - HeatExponentMultiplier = (float)stat.HeatExponentMultiplier, - DurabilityExponentMultiplier = (float)stat.DurabilityExponentMultiplier, - QualityExponent = (float)stat.QualityExponent - }; - } - - private static BehaviorData BuildBehaviorConfig(AetheriaRuntimeBehaviorPayload payload) - { - if (!BehaviorTypesByKind.TryGetValue(payload.Kind, out var behaviorType)) - { - return null; - } - - var behavior = Activator.CreateInstance(behaviorType) as BehaviorData; - if (behavior == null) - { - return null; - } - - behavior.Kind = payload.Kind; - behavior.Group = payload.Group; - - foreach (var field in GetKeyedFields(behaviorType)) - { - var payloadField = payload.Fields.FirstOrDefault(candidate => candidate.Key == field.key); - if (payloadField == null) - { - continue; - } - - field.field.SetValue(behavior, ConvertValue(payloadField.Value, field.field.FieldType)); - } - - return behavior; - } - - private static IEnumerable<(int key, FieldInfo field)> GetKeyedFields(Type type) - { - return type - .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) - .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) - { - if (targetType == typeof(string)) return value.StringValue ?? ""; - if (targetType == typeof(bool)) return value.BoolValue; - if (targetType == typeof(float)) return (float)value.NumberValue; - if (targetType == typeof(double)) return value.NumberValue; - if (targetType == typeof(int)) return checked((int)value.NumberValue); - if (targetType == typeof(uint)) return checked((uint)value.NumberValue); - if (targetType == typeof(Guid)) return ParseGuid(value.LegacyIdValue); - if (targetType == typeof(float2)) return ConvertFloat2(value); - if (targetType == typeof(float3)) return ConvertFloat3(value); - if (targetType == typeof(float4)) return ConvertFloat4(value); - if (targetType == typeof(int2)) return ConvertInt2(value); - if (targetType.IsEnum) return ParseEnumValue(value, targetType); - - if (targetType.IsArray) - { - return ConvertArray(value, targetType.GetElementType()); - } - - if (typeof(IList).IsAssignableFrom(targetType) && targetType.IsGenericType) - { - return ConvertList(value, targetType); - } - - if (GetKeyedFields(targetType).Any()) - { - return ConvertKeyedObject(value, targetType); - } - - return targetType.IsValueType ? Activator.CreateInstance(targetType) : null; - } - - private static object ConvertArray(AetheriaRuntimeBehaviorValue value, Type elementType) - { - var array = Array.CreateInstance(elementType, value.Children.Count); - for (var index = 0; index < value.Children.Count; index++) - { - array.SetValue(ConvertValue(value.Children[index], elementType), index); - } - - return array; - } - - private static object ConvertList(AetheriaRuntimeBehaviorValue value, Type targetType) - { - var elementType = targetType.GetGenericArguments()[0]; - var list = Activator.CreateInstance(targetType) as IList; - foreach (var child in value.Children) - { - list.Add(ConvertValue(child, elementType)); - } - - return list; - } - - private static object ConvertKeyedObject(AetheriaRuntimeBehaviorValue value, Type targetType) - { - var instance = Activator.CreateInstance(targetType); - var children = value.Children; - foreach (var field in GetKeyedFields(targetType)) - { - if (field.key >= 0 && field.key < children.Count) - { - field.field.SetValue(instance, ConvertValue(children[field.key], field.field.FieldType)); - } - } - - return instance; - } - - private static object ParseEnumValue(AetheriaRuntimeBehaviorValue value, Type targetType) - { - if (!string.IsNullOrWhiteSpace(value.StringValue)) - { - return Enum.Parse(targetType, value.StringValue, true); - } - - return Enum.ToObject(targetType, checked((int)value.NumberValue)); - } - - private static Guid ParseGuid(string value) - { - return Guid.TryParse(value, out var result) ? result : Guid.Empty; - } - - private static float2 ConvertFloat2(AetheriaRuntimeBehaviorValue value) - { - return new float2( - value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, - value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0); - } - - private static float3 ConvertFloat3(AetheriaRuntimeBehaviorValue value) - { - return new float3( - value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, - value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0, - value.Children.Count > 2 ? (float)value.Children[2].NumberValue : 0); - } - - private static float4 ConvertFloat4(AetheriaRuntimeBehaviorValue value) - { - return new float4( - value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, - value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0, - value.Children.Count > 2 ? (float)value.Children[2].NumberValue : 0, - value.Children.Count > 3 ? (float)value.Children[3].NumberValue : 0); - } - - private static int2 ConvertInt2(AetheriaRuntimeBehaviorValue value) - { - return new int2( - value.Children.Count > 0 ? checked((int)value.Children[0].NumberValue) : 0, - value.Children.Count > 1 ? checked((int)value.Children[1].NumberValue) : 0); - } } diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index 0914882f4..93b2eeb61 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -6,6 +6,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; +using System.Reflection; using GameCult.Aetheria.State.Unity; using Unity.Mathematics; using static Unity.Mathematics.math; @@ -31,6 +32,41 @@ public class ItemManager // private Guid _forceLoadZone; private readonly IRuntimeItemCatalogReader _runtimeItems; + private static readonly IReadOnlyDictionary BehaviorTypesByKind = new Dictionary(StringComparer.Ordinal) + { + { "GuidedWeapon", typeof(GuidedWeaponData) }, + { "Launcher", typeof(LauncherData) }, + { "Reactor", typeof(ReactorData) }, + { "Radiator", typeof(RadiatorData) }, + { "StatModifier", typeof(StatModifierData) }, + { "Sensor", typeof(SensorData) }, + { "Reflector", typeof(ReflectorData) }, + { "Shield", typeof(ShieldData) }, + { "Thruster", typeof(ThrusterData) }, + { "Wear", typeof(WearData) }, + { "VelocityConversion", typeof(VelocityConversionData) }, + { "VelocityLimit", typeof(VelocityLimitData) }, + { "AetherDrive", typeof(AetherDriveData) }, + { "Cooldown", typeof(CooldownData) }, + { "Heat", typeof(HeatData) }, + { "ItemUsage", typeof(ItemUsageData) }, + { "Switch", typeof(SwitchData) }, + { "Trigger", typeof(TriggerData) }, + { "Visibility", typeof(VisibilityData) }, + { "Thermotoggle", typeof(ThermotoggleData) }, + { "EnergyDraw", typeof(EnergyDrawData) }, + { "MiningTool", typeof(MiningToolData) }, + { "ResourceScanner", typeof(ResourceScannerData) }, + { "Capacitor", typeof(CapacitorData) }, + { "Cockpit", typeof(CockpitData) }, + { "HeatStorage", typeof(HeatStorageData) }, + { "TurretController", typeof(TurretControllerData) }, + { "InstantWeapon", typeof(InstantWeaponData) }, + { "ConstantWeapon", typeof(ConstantWeaponData) }, + { "ChargedWeapon", typeof(ChargedWeaponData) }, + { "AutoWeapon", typeof(AutoWeaponData) } + }; + public GameplaySettings GameplaySettings { get; } // public double Time @@ -80,10 +116,174 @@ public class ItemManager private IReadOnlyList CreateRuntimeBehaviorConfigs(ItemInstance item) { - var itemId = item?.Data?.ItemId ?? Guid.Empty; - return itemId == Guid.Empty + var typedItem = GetRuntimeItem(item); + return typedItem == null ? Array.Empty() - : _runtimeItems.GetTemporaryBehaviorConfigs(itemId); + : BuildBehaviorConfigs(typedItem); + } + + private static BehaviorData[] BuildBehaviorConfigs(AetheriaRuntimeCatalogItem item) + { + return item.BehaviorPayloads + .Select(BuildBehaviorConfig) + .Where(behavior => behavior != null) + .ToArray(); + } + + private static BehaviorData BuildBehaviorConfig(AetheriaRuntimeBehaviorPayload payload) + { + if (!BehaviorTypesByKind.TryGetValue(payload.Kind, out var behaviorType)) + { + return null; + } + + var behavior = Activator.CreateInstance(behaviorType) as BehaviorData; + if (behavior == null) + { + return null; + } + + behavior.Kind = payload.Kind; + behavior.Group = payload.Group; + + foreach (var field in GetKeyedFields(behaviorType)) + { + var payloadField = payload.Fields.FirstOrDefault(candidate => candidate.Key == field.key); + if (payloadField == null) + { + continue; + } + + field.field.SetValue(behavior, ConvertValue(payloadField.Value, field.field.FieldType)); + } + + return behavior; + } + + private static IEnumerable<(int key, FieldInfo field)> GetKeyedFields(Type type) + { + return type + .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) + .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) + { + if (targetType == typeof(string)) return value.StringValue ?? ""; + if (targetType == typeof(bool)) return value.BoolValue; + if (targetType == typeof(float)) return (float)value.NumberValue; + if (targetType == typeof(double)) return value.NumberValue; + if (targetType == typeof(int)) return checked((int)value.NumberValue); + if (targetType == typeof(uint)) return checked((uint)value.NumberValue); + if (targetType == typeof(Guid)) return ParseGuid(value.LegacyIdValue); + if (targetType == typeof(float2)) return ConvertFloat2(value); + if (targetType == typeof(float3)) return ConvertFloat3(value); + if (targetType == typeof(float4)) return ConvertFloat4(value); + if (targetType == typeof(int2)) return ConvertInt2(value); + if (targetType.IsEnum) return ParseEnumValue(value, targetType); + + if (targetType.IsArray) + { + return ConvertArray(value, targetType.GetElementType()); + } + + if (typeof(IList).IsAssignableFrom(targetType) && targetType.IsGenericType) + { + return ConvertList(value, targetType); + } + + if (GetKeyedFields(targetType).Any()) + { + return ConvertKeyedObject(value, targetType); + } + + return targetType.IsValueType ? Activator.CreateInstance(targetType) : null; + } + + private static object ConvertArray(AetheriaRuntimeBehaviorValue value, Type elementType) + { + var array = Array.CreateInstance(elementType, value.Children.Count); + for (var index = 0; index < value.Children.Count; index++) + { + array.SetValue(ConvertValue(value.Children[index], elementType), index); + } + + return array; + } + + private static object ConvertList(AetheriaRuntimeBehaviorValue value, Type targetType) + { + var elementType = targetType.GetGenericArguments()[0]; + var list = Activator.CreateInstance(targetType) as IList; + foreach (var child in value.Children) + { + list.Add(ConvertValue(child, elementType)); + } + + return list; + } + + private static object ConvertKeyedObject(AetheriaRuntimeBehaviorValue value, Type targetType) + { + var instance = Activator.CreateInstance(targetType); + var children = value.Children; + foreach (var field in GetKeyedFields(targetType)) + { + if (field.key >= 0 && field.key < children.Count) + { + field.field.SetValue(instance, ConvertValue(children[field.key], field.field.FieldType)); + } + } + + return instance; + } + + private static object ParseEnumValue(AetheriaRuntimeBehaviorValue value, Type targetType) + { + if (!string.IsNullOrWhiteSpace(value.StringValue)) + { + return Enum.Parse(targetType, value.StringValue, true); + } + + return Enum.ToObject(targetType, checked((int)value.NumberValue)); + } + + private static Guid ParseGuid(string value) + { + return Guid.TryParse(value, out var result) ? result : Guid.Empty; + } + + private static float2 ConvertFloat2(AetheriaRuntimeBehaviorValue value) + { + return new float2( + value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, + value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0); + } + + private static float3 ConvertFloat3(AetheriaRuntimeBehaviorValue value) + { + return new float3( + value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, + value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0, + value.Children.Count > 2 ? (float)value.Children[2].NumberValue : 0); + } + + private static float4 ConvertFloat4(AetheriaRuntimeBehaviorValue value) + { + return new float4( + value.Children.Count > 0 ? (float)value.Children[0].NumberValue : 0, + value.Children.Count > 1 ? (float)value.Children[1].NumberValue : 0, + value.Children.Count > 2 ? (float)value.Children[2].NumberValue : 0, + value.Children.Count > 3 ? (float)value.Children[3].NumberValue : 0); + } + + private static int2 ConvertInt2(AetheriaRuntimeBehaviorValue value) + { + return new int2( + value.Children.Count > 0 ? checked((int)value.Children[0].NumberValue) : 0, + value.Children.Count > 1 ? checked((int)value.Children[1].NumberValue) : 0); } public Shape GetRuntimeShape(ItemInstance item) diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 81adc08bb..6443c9316 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -146,8 +146,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `ItemManager` no longer exposes the raw runtime item catalog reader as public gameplay/UI API, and its old `GetData`/`Hydrate` item DTO projection path has been deleted. `AetheriaRuntimeItemCatalog` no longer materializes whole - `ItemData` DTOs as a runtime cache; it exposes typed item rows plus the - temporary behavior config bridge. The item properties UI no longer uses + `ItemData` DTOs as a runtime cache; it exposes typed item rows only. The + temporary behavior config bridge has moved under `ItemManager` behavior + construction. The item properties UI no longer uses `ItemManager` for manufacturer display; it resolves the manufacturer through the package-owned `ActionGameManager.RuntimeCatalog` typed snapshot. Entity restore and loadout manufacturer-distance weighting no longer use `ItemManager` @@ -536,14 +537,15 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. contract for full .NET smokes and Eve surface reads. Neither writes state or owns simulation. The runtime no longer has a MessagePack catalog cache or whole-item DTO projection cache. `AetheriaRuntimeItemCatalog` exposes typed - item rows and temporarily builds `BehaviorData` config objects from typed - behavior payloads behind the `ItemManager.CreateRuntimeBehaviors` runtime - construction primitive. Direct config reads no longer escape `ItemManager`; + item rows only. `ItemManager.CreateRuntimeBehaviors` owns the temporary + projection from typed behavior payloads into `BehaviorData` config objects + required by the current behavior constructors. Direct config reads no longer + escape `ItemManager`; gameplay stat modifiers target live behavior instances and package-owned behavior metadata instead of rebuilding config DTOs for lookup. `RuntimeItemReference.ItemId` is the only item reference value. The reader - interface for this bridge is named `IRuntimeItemCatalogReader` so callers see - typed catalog row ownership rather than old DTO projection ownership. Behavior + interface for this bridge is named `IRuntimeItemCatalogReader` and exposes + only typed catalog row lookup. Behavior type selection now uses an explicit runtime catalog map instead of `UnionAttribute` reflection, and the temporary behavior config constructor map is keyed by typed behavior payload kind rather than legacy union key. @@ -1055,6 +1057,10 @@ First Aetheria surfaces to publish: `IRuntimeItemProjectionReader` to `IRuntimeItemCatalogReader`, and rename behavior config methods to temporary behavior config construction so old projection vocabulary no longer implies item DTO authority. + - Done: delete `IRuntimeItemCatalogReader.GetTemporaryBehaviorConfigs`; the + runtime catalog reader now exposes typed item rows only, and the remaining + `BehaviorData` config projection is private `ItemManager` behavior + construction machinery. - Done: quarantine the vendored Unity `MessagePack` assembly by disabling asmdef auto-reference; only explicit state-spine assemblies should see it while the Unity CultCache bridge still needs a low-level `.cc` codec.