diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 150ed9acc..429d860b9 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ 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