From eabe0961e6cc5215ed9bf208de9b13de673a9ea8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 17:27:16 +0100 Subject: [PATCH] Move behavior grouping onto runtime instances --- .voidbot/state/aetheria.cc | Bin 85568 -> 85623 bytes Aetheria.State/README.md | 6 +++--- .../ServerShared/Behaviors/Behaviors.cs | 3 +++ Assets/Scripts/ServerShared/Entity.cs | 2 +- docs/aetheria-perfect-machine-map.md | 11 ++++++----- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index d627d6c652c2aab7536be7ba530d717bbe79d82c..1b405ae20540098081d1b4d04d96ffacf48431a5 100644 GIT binary patch delta 642 zcmX>whxPj$)(y*<*v+g=jPwi)CVylWpL~?5hZD-TjGD+OIys-Y8Y*C902bh2QDC%c z)@0eP$--!1uA-NiT9T1kl$ofTl$w!PmYH9qo0(T!l9-pAs+*aTnpcupQaQcRnlXma zYx+HFMk9sn%)AtZL?BKt$}cTYfT_`2nw*oEnS1lubVVCR%jt18jB+YEV0EsArI`f< zsVSZ%sksU;OCY*4^U|j`*f5F+fy{G)+OOvhGI;uA8%8}bh5RD8xJzP5B2@064dZ>r z9n%-uGP)#!l)y~YL#VM(%pyxf<0Lg;Jmga}Wo0ypgbP?P%h2;Fa zw9NGB>2{12j1kix*fGj+0Nn|3-XA;08g(Dv#G>qCg0^h$v1iO>oXqu9(|1D=$j01M zU2y0DZChSknwy(gRC&`Fe>j1>gJcuf5tA8Di?W-97@Audn@+#a!6?THVV-tmjNpK# z0;9vX delta 594 zcmY*WL2DC16y_xYiP`^=t)Hi9;UmKWV+dzGBc~j9twKZ zgY02Ig3v=L6c65VErJ(4d&sHcKky`8#Mxw1@ia5vd-J{T``)j?%-LY(<4JDLSzmQ3 zu3OuA3&rGf?)B^h@RFbT#YE%}vIcKu+;FLYkbhMw3`+&@Tr*gP`Qk3^lBZ0_GUG}U z?$dI}xDgBR1nTBT9h@sHpjMw8Sfw$&rnhl zU^64FY%?C1ZyQiC*EiuDM&|b>v<~aY+DLFZ8m0ZmDGd}(XWhnF(f?^M9T-x&e*w3M zCa8R|PXp8fePJEQ*w;+(W&3Ee4z?NXS=!hd=%MaXY!hGSh3uR6ci=hPH;WBeGK~hj zxVm!}FMcuW-% zrKq&`&Oe_v*&sEmtQ0BYP8W4Q6+a5g*RE*886;kZo$hb;-(*lA6oEfE`wI8JAVN%4#qG5 diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 3071b78a7..d201cfd54 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -126,9 +126,9 @@ persist hull simulation grids into `AetheriaEntitySnapshot`, so `RuntimeEntityBlueprint` is no longer the only surface carrying those live values. Broader runtime object graphs, typed behavior factory construction, and behavior-private simulation state remain legacy until dedicated typed runtime -documents exist. Live behavior instances expose typed behavior kind through -`Behavior.Kind`; the remaining `BehaviorData` objects are construction configs, -not runtime identity owners. +documents exist. Live behavior instances expose typed behavior kind and group +through `Behavior.Kind` and `Behavior.Group`; the remaining `BehaviorData` +objects are construction configs, not runtime identity owners. Typed name-file documents are `aetheria.name_file.v2` records. They carry the legacy ID, display name, count, compact sample names for surfaces, and the full name array needed to move `Galaxy`/Markov name generation off legacy diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index fd0424373..65d6b0dd9 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -14,6 +14,7 @@ public abstract class Behavior { public BehaviorData Data { get; } public string Kind { get; } + public int Group { get; } public EquippedItem Item { get; } private ConsumableItemEffect Consumable { get; } protected ItemManager ItemManager { get; } @@ -47,6 +48,7 @@ public abstract class Behavior { Data = data; Kind = data?.Kind ?? ""; + Group = data?.Group ?? 0; Item = item; ItemManager = Item.ItemManager; } @@ -55,6 +57,7 @@ public abstract class Behavior { Data = data; Kind = data?.Kind ?? ""; + Group = data?.Group ?? 0; Consumable = consumable; ItemManager = consumable.Entity.ItemManager; } diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index 17d658ef5..71bf00f45 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -1395,7 +1395,7 @@ public class EquippedItem Behaviors = ItemManager.CreateRuntimeBehaviors(this); BehaviorGroups = Behaviors - .GroupBy(b => b.Data.Group) + .GroupBy(b => b.Group) .OrderBy(g => g.Key) .ToDictionary(g => g.Key, g => new BehaviorGroup { diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 297d7705d..7172e809a 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -618,9 +618,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. 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. - Live `Behavior` instances expose their typed payload kind directly, so runtime - state projection and stat-modifier matching no longer reach back through - `BehaviorData.Kind` for behavior identity. + Live `Behavior` instances expose their typed payload kind and group directly, + so runtime state projection, stat-modifier matching, and behavior grouping no + longer reach back through `BehaviorData` for behavior identity. Runtime item category classification uses package-owned `AetheriaRuntimeItemCategories` tokens; gameplay code should not ask C# legacy DTO class names to classify typed catalog rows. The typed state @@ -991,8 +991,9 @@ First Aetheria surfaces to publish: `AetheriaRuntimeBehaviorMetadataCatalog`; the behavior only normalizes migrated `*Data` tokens before asking the package-owned metadata owner. - Done: move live behavior identity reads from the temporary `BehaviorData` - config bridge onto `Behavior.Kind`, so state snapshots, weapon snapshots, - progress rows, and stat-modifier matching use runtime instance identity. + config bridge onto `Behavior.Kind` and `Behavior.Group`, so state + snapshots, weapon snapshots, progress rows, stat-modifier matching, and + behavior grouping use runtime instance identity. - Done: delete the legacy `Behaviors` lists from `ConsumableItemData` and `EquippableItemData`; item DTOs can no longer carry behavior config state. - Done: move runtime blueprint price aggregation and conductivity restore