From 8aa1e15a39772b1f297920e2a69070d0a17cba54 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 06:39:23 +0100 Subject: [PATCH] Use typed equipped item simulation inputs --- .voidbot/state/aetheria.cc | Bin 69058 -> 69266 bytes Assets/Scripts/ServerShared/Entity.cs | 9 ++++++--- docs/aetheria-perfect-machine-map.md | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 150ed9acc11a683b3ec1a2a5a382c1cd11505b19..429d860b927a9a133f94ad15bf6b3746dbc2806f 100644 GIT binary patch delta 1211 zcmZ{kO=uHA7>3;>XoDh(tpTlN@KV$!ZDJeRD%790;Gsw%AoL(ib|=Z;W@nw5OzX7*+f+a5s_RDw6ea=u5%R@>`+i-{FU96^~=`_bk~NNU@tuwZd4 zL3sTi&e}win#2pb7ZD0122PAb$X1&!P+oiKT!AV9lzb>7Kj} zu{@GMnF13)3+#}2*QO@m;-rYFqrGN1wekcBkLR#Spn$_9RFnnAwaX5!z!^xiU{&{~ zy2<9WCq186L%9@46qsjQh!$POfntYpUu#qRo(6y_SwNlY3F53Q5aa68R;*uKKo;{w zfcH^vUm&dy*LaF~q4fP%)L z?|)ON<9gstV{Ss6%v^_+k6Wmx?2KB!bz0TBk5repK13%b{u%)g4XyN0#dDMkiQ2^L z$}@PrIjhxIUme5fsh<7z{ZQ}yWlnOnL7pG)uzgqYpCdQ3)69fRVd-IZ8b<&pQ3hu1 zH>{%oAg;q~_6Aq_;^LenT+>m9cdi_*KMv{PxhE3m#n!%yRlJi9pM2JO|6T;g9rvkM zmwp|K1`kGhSZ#z))E6Vkr2l$Uz8J=v1Ag6+WaU!Wh$$A{Us(+qZX?itcpe6;RO;pD Nu(279)>BgHxj&Bdz)%1H delta 1082 zcmY+DPiPZC6vo{oXhT5^6h%>(dQrhf+a#qHdTJsDEMAI2@iN(+Bx7f1)|pw;=%IoK z59-A|#J?wnUX`HYO)4TDlpb5@!BfG5Hx)bxzS+sf*>(8f3U!B~*)BL<7Sd(fm1!|r zkqo(}K0#hTGmk0}{&{#6N#bLWi3DeDC<~HZ;RlRpG9dx3jv1?AcNyYHH%VVdEE}*j z6&%$h^%^9iWVFO| z6T@_N#HdAeb9NBY72t#nt#XM0OF|v+u|++?DR0D86BoN5H_nXCRTpqz+z`?O5IZot z!vhOqF;tTVu{~y9ah2%N@}=&R?d|O1`3g)NcCIhMm|%9&mTbbnky#;*eF&P3%zWXd`{d9!jUD;?LW8m2%$oLQ^&bKYVxRVcH3L;X=t| VK1fb8Z(e4c&1^RAS1J~k{s975hs^*0 diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index fd173dd08..952663500 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -1262,6 +1262,7 @@ public class EquippedItem public Behavior[] Behaviors { get; } public Dictionary BehaviorGroups { get; } public float Conductivity { get; } + public float MaxDurability { get; } public float ThermalPerformance { get; private set; } public float ThermalExponent { get; } public float DurabilityPerformance { get; private set; } @@ -1371,7 +1372,9 @@ public class EquippedItem Entity = entity; EquippableItem = item; Position = position; - Conductivity = Data.Conductivity; + var typedItem = ItemManager.GetRuntimeItem(item); + Conductivity = typedItem != null ? (float)typedItem.Conductivity : Data.Conductivity; + MaxDurability = typedItem?.Durability > 0 ? (float)typedItem.Durability : Math.Max(item.Durability, 1f); ThermalExponent = lerp( ItemManager.GameplaySettings.ThermalQualityMin, ItemManager.GameplaySettings.ThermalQualityMax, @@ -1442,13 +1445,13 @@ public class EquippedItem var temp = Temperature; ThermalPerformance = Data.Performance(temp); var deltaTemp = math.abs(temp - oldTemperature); - DurabilityPerformance = EquippableItem.Durability / Data.Durability; + DurabilityPerformance = EquippableItem.Durability / MaxDurability; var performanceThreshold = Entity.Settings.ShutdownPerformance; Wear = (1 - pow(ThermalPerformance, (1 - pow(EquippableItem.Quality, ItemManager.GameplaySettings.QualityWearExponent)) * ItemManager.GameplaySettings.ThermalWearExponent) + deltaTemp * ItemManager.GameplaySettings.DeltaTempWearExponent - ) * Data.Durability / Data.ThermalResilience; + ) * MaxDurability / Data.ThermalResilience; ThermalOnline.Value = ThermalPerformance > performanceThreshold || Entity.OverrideShutdown && EquippableItem.OverrideShutdown; DurabilityOnline.Value = EquippableItem.Durability > .01f; oldTemperature = temp; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index c52435254..91adeda4b 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -233,6 +233,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. performance stats. `ItemManager.CreateInstance(CraftedItemData, float)` initializes new equippable runtime durability from the typed runtime item row; `EquippableItemData.Durability` is only an incomplete-row fallback. + `EquippedItem` also takes conductivity and max durability from the typed + runtime item row for heat conduction, durability performance, and wear + scaling; the legacy equippable DTO still owns thermal curve, thermal + resilience, and audio-stat residue until those surfaces are imported. Inventory drag preview occupancy now projects typed item shape cells only into the local `Shape` grid, and final fit/equip acceptance shares the typed runtime catalog geometry path in `Entity.ItemFits` and `TryEquip`. @@ -764,6 +768,9 @@ First Aetheria surfaces to publish: - Done: move new equippable instance durability initialization onto typed runtime item rows; legacy `EquippableItemData.Durability` remains only as an incomplete-row fallback in the instantiation bridge. + - Done: move `EquippedItem` conductivity and max-durability performance/wear + inputs onto typed runtime item rows; legacy thermal resilience and audio + stats remain explicit DTO residues. - Done: move `Ship` drag, combat/turret predicted shot height, and thruster torque geometry onto typed hull facets and typed shape masks. - Done: delete the console `give` command instead of preserving a debug