Build ship settings surfaces directly

This commit is contained in:
Meta Vens 2026-06-29 05:33:45 +01:00
commit cf09a33731
3 changed files with 34 additions and 14 deletions

View file

@ -214,7 +214,10 @@ public class InventoryMenu : MonoBehaviour
transform,
_shipSettingsSurfaceDocument,
"Aetheria Inventory Ship Settings Surface",
AetheriaRuntimeShipSettingsSurfaceBuilder.Build(ComposeCurrentShipSettingsSurface(currentEntity)),
AetheriaRuntimeShipSettingsSurfaceBuilder.Build(
currentEntity?.Entity?.DisplayName ?? "",
(float)(currentEntity?.ShutdownPerformance ?? 0),
FormatValue),
HandleCurrentShipSettingsSurfaceCommand,
_shipSettingsSurfaceChrome);
}
@ -269,15 +272,6 @@ public class InventoryMenu : MonoBehaviour
AetheriaEveUnitySurfaceHost.Hide(_shipSettingsSurfaceDocument);
}
private AetheriaRuntimeShipSettingsSurfaceState ComposeCurrentShipSettingsSurface(
AetheriaRuntimeCurrentEntityDocument currentEntity)
{
return AetheriaRuntimeShipSettingsSurfaceBuilder.Compose(
currentEntity?.Entity?.DisplayName ?? "",
(float)(currentEntity?.ShutdownPerformance ?? 0),
FormatValue);
}
private void RenderCargoItemDetailsSurface(ItemInstance item)
{
var typedItem = FindTypedInventoryItem(item);