From 2d3172887b21c238863f1de3d109031bb353fb70 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 15 Jun 2026 03:35:40 +0100 Subject: [PATCH] Use item keys for body resources --- .voidbot/state/aetheria.cc | Bin 100336 -> 101012 bytes Aetheria.State/README.md | 2 +- Assets/Scripts/Gameplay/ActionGameManager.cs | 4 ++-- Assets/Scripts/ServerShared/Zone.cs | 4 ++-- .../ServerShared/ZoneConstructionData.cs | 2 +- Assets/Scripts/ServerShared/ZoneGenerator.cs | 2 +- docs/aetheria-perfect-machine-map.md | 3 +++ 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 405aabdf74b1a466f94534d43f39bbf1684a953d..467db1d8317e18a90a2c9fbe876689669199d8eb 100644 GIT binary patch delta 1492 zcmah}O=uKJ6t*(i_=AGz23PUtu^_U+G|@3K@dtkrBZEOC2ZMu$l--q?GTmKGRdr$q zH3ab_BHAu}URGBW6=4oJiibT2K@u;b?A4ox)yvAB_Eq=vWG1Y53E@q@_rCZ2)Zcfy z?*H2L;*XAX#r{Km2dx98Qspk`j{oeql~)FeX+;!f8kPROfwZ!wb63aASpAny`}J(8 zB76pygcE^eN`%s8;BZ@W;Zw<(0$)r+s2J!dU=DE2JeXvWvL4zl<=zL z)3zb1sWsY|rS`%(m-49`PAW(+1kZv2$WF=#01#Xb+I4f zrOD0l!q;{2!khK8)+5b)h1Y)|U4x;N%-1kuD5^4_NosgmCMpm?=;k$#;%u;m=V1@t zAVR$tlmK1hSPnJVHR@Lpl&&#^PBs3m(SU)W!?bY?!Eq@rBT%!2hPo#3j0mPV{)Ypo z;~2b6omwDWVl_I&g|w3Ad&tfr_W~g`ZsD#AK{iw6gqDYZYT+s50?Eu3jpt5v&psX! zNS`({<}({j ze;OD_x7jV3X|7g4k;n$)(MqSsx4&$;H@2aGljGm|w~n63vXwfBW`RPX zFi_2T?O8UnbJo)x)>Agc9p>9C<8e57Rv{Pb-T!)hr?OLy$?6K}(%6 zQssfBRW!}y{9+Gz{KK{A6d@yH8thGv9pQ_xpXn-#1U6HEcd^Sb0^` z)IWS?Aa3;!^an5IP^bP_^PsU3ibeHS?IF!;XTzM>NVJsGrW@;y*31+NJ$3e4*ZB*! zqMSuiSb)u$^gWz%38W}1919Z4)L>^j+1iz@vbs3ZaT(HFz@@2Cxa(u4 zsLJ=Isp|q}4hY`_JOa3yy5~^^Il*rms%9YTwIWQK!^WEaa_4|v{L|cZ(U93D0aBIP z3F2YOWC<+TJcU~8WeGt)`FwoLg2^nG21O7c_i`?^cL6|(`^>?D5_uXJSJiB$61^cu z{cCU6{G(A`&JaW@Zn{+@+R+1YSV$u_P*&X}v_M)=WsxeYD?w(t?>dkopz=BLUlPG* zBpBgrUeZIEmxSu9SYZq@Akun^nVse08cE9^d&Uay)<2-&;VkNIuaeU(TNO!+mbnGR zT6D1R{_D>=ofP{{o}J*>;l7#Jcu`eEjps(t(u}xdfnNF4s;}7B3+KLXb?;v$)6^l% zCLwTe^%lBWSo-Vr>FMRR;8+BmXsIl2G~Sndsc^>7qpQgXdQ-o8B!+H`hkG532b=Tg zaCjRW3Kr+kx1C$K^9{lCdBnrT9~>@!j<%p@0o~t@#bf2qu)4N@icQTG pair.Key) .Select(pair => new AetheriaRuntimeBodyResourceCommit { - ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key), + ItemKey = pair.Key ?? "", Amount = pair.Value }) .ToArray() ?? Array.Empty(), @@ -705,7 +705,7 @@ public class ActionGameManager : MonoBehaviour .OrderBy(pair => pair.Key) .Select(pair => new AetheriaRuntimeBodyResourceCommit { - ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key), + ItemKey = pair.Key ?? "", Amount = pair.Value }) .ToArray() ?? Array.Empty(), diff --git a/Assets/Scripts/ServerShared/Zone.cs b/Assets/Scripts/ServerShared/Zone.cs index e953e1ff8..95c4c24c8 100644 --- a/Assets/Scripts/ServerShared/Zone.cs +++ b/Assets/Scripts/ServerShared/Zone.cs @@ -370,7 +370,7 @@ public class Planet public string Name { get; } public Guid OrbitId { get; } public float Mass { get; } - public IReadOnlyDictionary Resources { get; } + public IReadOnlyDictionary Resources { get; } public float BodyRadiusMultiplier { get; } public float GravityRadiusMultiplier { get; } public float GravityDepthMultiplier { get; } @@ -475,7 +475,7 @@ public class AsteroidBelt public string Name { get; } public Guid Orbit { get; } public float Mass { get; } - public IReadOnlyDictionary Resources { get; } + public IReadOnlyDictionary Resources { get; } public float BodyRadiusMultiplier { get; } public float GravityRadiusMultiplier { get; } public float GravityDepthMultiplier { get; } diff --git a/Assets/Scripts/ServerShared/ZoneConstructionData.cs b/Assets/Scripts/ServerShared/ZoneConstructionData.cs index 5535cfaf7..65c123549 100644 --- a/Assets/Scripts/ServerShared/ZoneConstructionData.cs +++ b/Assets/Scripts/ServerShared/ZoneConstructionData.cs @@ -31,7 +31,7 @@ public abstract class BodyConstructionData : INamedEntry public float Mass = 0; - public Dictionary Resources = new Dictionary(); + public Dictionary Resources = new Dictionary(); public float BodyRadiusMultiplier = 1; diff --git a/Assets/Scripts/ServerShared/ZoneGenerator.cs b/Assets/Scripts/ServerShared/ZoneGenerator.cs index eb9acc030..de2dab171 100644 --- a/Assets/Scripts/ServerShared/ZoneGenerator.cs +++ b/Assets/Scripts/ServerShared/ZoneGenerator.cs @@ -124,7 +124,7 @@ public static class ZoneGenerator blueprint.Bodies = planets.Where(p=>!p.Empty).Select(planet => { - // Dictionary planetResources = new Dictionary(); + // Dictionary planetResources = new Dictionary(); BodyType bodyType = planet.Belt ? BodyType.Asteroid : planet.Mass > zoneSettings.SunMass ? BodyType.Sun : planet.Mass > zoneSettings.GasGiantMass ? BodyType.GasGiant : diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 2d2469649..f6d85f723 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -1238,6 +1238,9 @@ First Aetheria surfaces to publish: - Done: move action-bar consumable bindings off `Target.LegacyId` parsing; they read the typed runtime row `ItemKey` directly for HUD fill/count and runtime commit projection. + - Done: move zone body resource dictionaries from legacy item GUID keys to + typed item-key strings; runtime body resource commit projection no longer + calls `FromLegacyId`. - Remove runtime dependency on `ItemData` DTOs as item instance owners. 5. Mesh host