Remove observed run projection shim
This commit is contained in:
parent
e736a28bda
commit
d37826ea9a
6 changed files with 21 additions and 60 deletions
|
|
@ -96,7 +96,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
private AetheriaUnityObservedFrameApplier ObservedFrameApplier =>
|
||||
_observedFrameApplier ??= new AetheriaUnityObservedFrameApplier(
|
||||
ResolveDaemonObserver,
|
||||
zoneIndex => AetheriaUnityObservedRunProjection.FindZone(ObservedGalaxy, zoneIndex),
|
||||
ResolveObservedGalaxyZone,
|
||||
() => Zone,
|
||||
zone => Zone = zone,
|
||||
_observedEntityIndex,
|
||||
|
|
@ -370,6 +370,20 @@ public class ActionGameManager : MonoBehaviour
|
|||
return ObservedDocking.IsEntityUndocked(CurrentEntity);
|
||||
}
|
||||
|
||||
private GalaxyZone ResolveObservedGalaxyZone(int daemonZoneIndex)
|
||||
{
|
||||
if (daemonZoneIndex < 0 || ObservedGalaxy?.Zones == null)
|
||||
return null;
|
||||
|
||||
foreach (var zone in ObservedGalaxy.Zones)
|
||||
{
|
||||
if (zone != null && zone.ZoneIndex == daemonZoneIndex)
|
||||
return zone;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// public void ToggleEditMode()
|
||||
// {
|
||||
// _editMode = !_editMode;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public sealed class AetheriaUnityGameplayBootShell
|
|||
? Settings.TutorialBackgroundSettings
|
||||
: Settings.SectorBackgroundSettings;
|
||||
backgroundSettings.NoisePosition = sectorMap.GenerationSeed == 0 ? 1 : sectorMap.GenerationSeed;
|
||||
var observedGalaxy = AetheriaUnityObservedRunProjection.Project(
|
||||
var observedGalaxy = global::Galaxy.ProjectObservedSectorMap(
|
||||
sectorMap,
|
||||
backgroundSettings,
|
||||
runtimeCatalog,
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using GameCult.Aetheria.State.Verse;
|
||||
|
||||
public static class AetheriaUnityObservedRunProjection
|
||||
{
|
||||
public static Galaxy Project(
|
||||
AetheriaRuntimeSectorMapDocument sectorMap,
|
||||
SectorBackgroundSettings backgroundSettings,
|
||||
AetheriaRuntimeCatalogSnapshot runtimeCatalog,
|
||||
Action<string> log)
|
||||
{
|
||||
return global::Galaxy.ProjectObservedSectorMap(sectorMap, backgroundSettings, runtimeCatalog, log);
|
||||
}
|
||||
|
||||
public static GalaxyZone FindZone(Galaxy galaxy, int daemonZoneIndex)
|
||||
{
|
||||
return daemonZoneIndex < 0
|
||||
? null
|
||||
: galaxy?.Zones?.FirstOrDefault(zone => zone != null && zone.ZoneIndex == daemonZoneIndex);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5262d4719f1ec6647a465a9450b2787c
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 49ec0c83548c7084ab0d3f6c2175ee71
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in a new issue