Keep Unity state surface compile fixes

This commit is contained in:
Meta Vens 2026-06-27 13:36:40 +01:00
commit 6dba17d86c
10 changed files with 53 additions and 11 deletions

View file

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using GameCult.Aetheria.State.Verse;
public sealed class AetheriaUnityCockpitHudShell
{
public InventoryPanel ShipPanel { get; set; }

View file

@ -53,10 +53,10 @@ public sealed class AetheriaUnityPilotFrameAdapter
if (renderSettings != null)
{
if (HeatstrokePost != null)
HeatstrokePost.weight = (float)renderSettings.NormalizeHeatstrokePost(currentEntity.Heatstroke);
HeatstrokePost.weight = (float)renderSettings.Value.NormalizeHeatstrokePost(currentEntity.Heatstroke);
if (SevereHeatstrokePost != null)
SevereHeatstrokePost.weight =
(float)renderSettings.ResolveSevereHeatstrokePostWeight(currentEntity.Heatstroke, timeSeconds);
(float)renderSettings.Value.ResolveSevereHeatstrokePostWeight(currentEntity.Heatstroke, timeSeconds);
}
if (currentEntity is Ship)

View file

@ -3,6 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Linq;
using GameCult.Aetheria.State.Verse;
public static class AetheriaUnityRenderSettingsBridge
{

View file

@ -66,7 +66,7 @@ public sealed class AetheriaUnityTargetPresentation
{
var contacts = ResolveVisibleContacts?.Invoke(
currentEntity,
renderSettings.TargetDetectionInfoThreshold,
renderSettings.Value.TargetDetectionInfoThreshold,
true) ?? Array.Empty<AetheriaRuntimeZoneContactRow>();
foreach (var contact in contacts)
@ -168,9 +168,9 @@ public sealed class AetheriaUnityTargetPresentation
}
var infoGathered = ResolveInfoGathered?.Invoke(indicator.Key, currentEntity) ?? 0f;
indicator.Value.Fill.fillAmount = (float)renderSettings.NormalizeDetectionProgress(infoGathered);
indicator.Value.Fill.fillAmount = (float)renderSettings.Value.NormalizeDetectionProgress(infoGathered);
indicator.Value.Fill.enabled = !blinkSpottedTargets ||
renderSettings.ResolveTargetSpottedFillEnabled(infoGathered, time);
renderSettings.Value.ResolveTargetSpottedFillEnabled(infoGathered, time);
}
}

View file

@ -210,7 +210,7 @@ public class SchematicDisplay : MonoBehaviour
HeatstrokeMeterFill.anchorMax = new Vector2((float)hud.Heatstroke, 1);
HypothermiaMeterFill.anchorMax = new Vector2((float)hud.Hypothermia, 1);
HeatstrokeLimitFill.anchorMax = new Vector2(
(float)(_renderSettings?.NormalizeThermalRisk(_cockpit.Item.Temperature) ?? 0),
(float)(_renderSettings.NormalizeThermalRisk(_cockpit.Item.Temperature)),
1);
}
@ -225,7 +225,7 @@ public class SchematicDisplay : MonoBehaviour
{
var charge = hud.CapacitorCharge;
var maxCharge = hud.CapacitorCapacity;
EnergyFill.anchorMax = new Vector2(charge / maxCharge, 1);
EnergyFill.anchorMax = new Vector2((float)(charge / maxCharge), 1);
EnergyLabel.text = $"{((int)charge).ToString()}/{((int)maxCharge).ToString()} + ({((int)hud.ReactorDraw).ToString()})";
}

View file

@ -254,8 +254,6 @@ public class MainMenu : MonoBehaviour
AetheriaRuntimeMainMenuSurfaceBuilder.BuildInputSettings(
AetheriaRuntimeMainMenuSurfaceBuilder.ProjectRoot(
stateBoot,
null,
null,
LatestPlayerSettings(stateBoot),
CanOpenRuntimeInputScreen(),
InGame,

View file

@ -797,6 +797,22 @@ public class InventoryMenu : MonoBehaviour
return currentEntity != null;
}
private AetheriaRuntimeStationRefitDocument ResolveStationRefit()
{
try
{
return ResolveClient()
.StationRefitAsync()
.GetAwaiter()
.GetResult();
}
catch (Exception ex)
{
Debug.LogWarning($"Failed to read Aetheria station refit projection for inventory menu: {ex.Message}");
return null;
}
}
private bool TryResolveCurrentDocking(out AetheriaRuntimeCurrentDockingDocument docking)
{
docking = null;

View file

@ -13,6 +13,7 @@ using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.UIElements;
using Path = System.IO.Path;
public class LocalMenu : MonoBehaviour
{

View file

@ -243,8 +243,7 @@ public class SectorMap : MonoBehaviour
foreach (var factionIndex in ResolveFactionIndices())
AddFactionMaterials(factionIndex);
foreach (var zoneIndex in _sectorMap.DiscoveredZoneIndices)
QueueZoneReveal([zoneIndex]);
QueueZoneReveal(_sectorMap.DiscoveredZoneIndices);
if (_queuedZoneReveals.Count == 0)
QueueZoneReveal(_sectorMap.Zones.Select(zone => zone.ZoneIndex));

View file

@ -90,6 +90,31 @@ namespace GameCult.Aetheria.State.Verse
public static class AetheriaRuntimeMainMenuSurfaceBuilder
{
public static AetheriaRuntimeMainMenuSurfaceState ProjectRoot(
AetheriaRuntimeStateBootReport stateBoot,
AetheriaRuntimePlayerSettingsSnapshot playerSettings,
bool canOpenRuntimeInputScreen,
bool inGame,
string updatedAtUtc)
{
return new AetheriaRuntimeMainMenuSurfaceState(
stateBoot.TargetLabel,
stateBoot.TargetKind,
stateBoot.TargetSource,
stateBoot.Title,
stateBoot.VerseId,
"unknown",
stateBoot.CultMeshAddress,
inGame,
false,
"",
-1,
playerSettings?.BindingOverrides?.Count ?? 0,
playerSettings?.ActionBarInputs?.Count ?? 0,
canOpenRuntimeInputScreen,
updatedAtUtc);
}
public static AetheriaRuntimeMainMenuSurfaceState ProjectRoot(
AetheriaRuntimeStateBootReport stateBoot,
AetheriaRuntimeDaemonFrameDocument daemonFrame,