Use typed thermal properties without DTO fallback
This commit is contained in:
parent
26e9fd7e80
commit
e9a29e7837
3 changed files with 12 additions and 16 deletions
Binary file not shown.
|
|
@ -405,18 +405,15 @@ public class PropertiesPanel : MonoBehaviour
|
|||
return Math.Max(item.Durability, 1f);
|
||||
}
|
||||
|
||||
private static (float minimum, float maximum) GetThermalRange(AetheriaRuntimeCatalogItem typedItem, EquippableItemData legacyData)
|
||||
private static (float minimum, float maximum) GetThermalRange(AetheriaRuntimeCatalogItem typedItem)
|
||||
{
|
||||
if (typedItem != null && typedItem.MaximumTemperature > typedItem.MinimumTemperature)
|
||||
return ((float)typedItem.MinimumTemperature, (float)typedItem.MaximumTemperature);
|
||||
|
||||
if (legacyData != null && legacyData.MaximumTemperature > legacyData.MinimumTemperature)
|
||||
return (legacyData.MinimumTemperature, legacyData.MaximumTemperature);
|
||||
|
||||
return (0f, 1f);
|
||||
}
|
||||
|
||||
private static BezierCurve GetThermalPerformanceCurve(AetheriaRuntimeCatalogItem typedItem, EquippableItemData legacyData)
|
||||
private static BezierCurve GetThermalPerformanceCurve(AetheriaRuntimeCatalogItem typedItem)
|
||||
{
|
||||
if (typedItem?.ThermalPerformanceCurveKeys != null && typedItem.ThermalPerformanceCurveKeys.Count > 0)
|
||||
{
|
||||
|
|
@ -432,7 +429,7 @@ public class PropertiesPanel : MonoBehaviour
|
|||
};
|
||||
}
|
||||
|
||||
return legacyData?.HeatPerformanceCurve ?? new BezierCurve
|
||||
return new BezierCurve
|
||||
{
|
||||
Keys = new[]
|
||||
{
|
||||
|
|
@ -540,9 +537,8 @@ public class PropertiesPanel : MonoBehaviour
|
|||
}
|
||||
|
||||
var typedItem = FindTypedPropertyItem(item.EquippableItem);
|
||||
var gearData = GameManager.ItemManager.GetData(item.EquippableItem);
|
||||
var thermalRange = GetThermalRange(typedItem, gearData);
|
||||
var thermalCurve = GetThermalPerformanceCurve(typedItem, gearData);
|
||||
var thermalRange = GetThermalRange(typedItem);
|
||||
var thermalCurve = GetThermalPerformanceCurve(typedItem);
|
||||
var statusSheet = AddStatSheet();
|
||||
if (item.EquippableItem.Durability < .01f)
|
||||
statusSheet.AddStat("Durability", () => "Item Destroyed!");
|
||||
|
|
@ -587,9 +583,8 @@ public class PropertiesPanel : MonoBehaviour
|
|||
Title.text = GetTitle(gear);
|
||||
AddSpacer();
|
||||
var typedItem = FindTypedPropertyItem(gear);
|
||||
var gearData = GameManager.ItemManager.GetData(gear);
|
||||
var thermalRange = GetThermalRange(typedItem, gearData);
|
||||
var thermalCurve = GetThermalPerformanceCurve(typedItem, gearData);
|
||||
var thermalRange = GetThermalRange(typedItem);
|
||||
var thermalCurve = GetThermalPerformanceCurve(typedItem);
|
||||
var statusSheet = AddStatSheet();
|
||||
statusSheet.AddStat("Durability", () => $"{(int)(gear.Durability / GetMaxDurability(gear) * 100)}%");
|
||||
var heatCurve = AddCurveField();
|
||||
|
|
|
|||
|
|
@ -182,8 +182,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
The item properties panel also reads typed catalog title names, descriptions,
|
||||
manufacturer, base mass, max durability, thermal bounds, and thermal
|
||||
performance curve keys for basic item presentation without hydrating legacy
|
||||
DTOs; legacy `ItemData` hydration remains only for behavior reflection and
|
||||
fallback projection when typed curve rows are incomplete. Inventory selection highlighting now uses typed item
|
||||
DTOs; legacy `ItemData` hydration remains only for behavior stat reflection.
|
||||
Incomplete typed thermal curve rows render a neutral fallback curve instead
|
||||
of hydrating legacy `EquippableItemData`. Inventory selection highlighting now uses typed item
|
||||
shape cells only for UI tint geometry; incomplete typed rows produce no
|
||||
selected-cell mask instead of falling back to legacy `ItemData.Shape`.
|
||||
Inventory cargo cell tint now uses typed hardpoint facets only; incomplete
|
||||
|
|
@ -656,8 +657,8 @@ First Aetheria surfaces to publish:
|
|||
- Done: import typed thermal bounds and move schematic HUD heat-fill ranges
|
||||
onto typed catalog rows.
|
||||
- Done: import typed thermal performance curve keys and move PropertiesPanel
|
||||
thermal curve presentation onto typed catalog rows; legacy thermal curves
|
||||
are fallback projection only for incomplete imported rows.
|
||||
thermal curve presentation onto typed catalog rows; incomplete typed rows
|
||||
use a neutral fallback curve instead of hydrating legacy thermal DTOs.
|
||||
- Done: remove the loot pickup presentation fallback to legacy `ItemData`;
|
||||
typed category/name rows now decide pickup visuals and scan labels, and
|
||||
missing typed rows render generic unknown gear pickup presentation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue