Rename pilot adapters to controllers
This commit is contained in:
parent
a9e21eacef
commit
d4f6155cdc
8 changed files with 90 additions and 80 deletions
|
|
@ -2027,10 +2027,10 @@ static void RequireDaemonRenderQueryAuthority(string root)
|
|||
var targetPresentation = File.Exists(targetPresentationPath)
|
||||
? File.ReadAllText(targetPresentationPath)
|
||||
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityTargetPresentation.cs is missing.");
|
||||
var pilotFrameAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameAdapter.cs");
|
||||
var pilotFrameAdapter = File.Exists(pilotFrameAdapterPath)
|
||||
? File.ReadAllText(pilotFrameAdapterPath)
|
||||
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityPilotFrameAdapter.cs is missing.");
|
||||
var pilotFrameControllerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameController.cs");
|
||||
var pilotFrameController = File.Exists(pilotFrameControllerPath)
|
||||
? File.ReadAllText(pilotFrameControllerPath)
|
||||
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityPilotFrameController.cs is missing.");
|
||||
var gameplayInputShellPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityGameplayInputShell.cs");
|
||||
var gameplayInputShell = File.Exists(gameplayInputShellPath)
|
||||
? File.ReadAllText(gameplayInputShellPath)
|
||||
|
|
@ -2047,7 +2047,7 @@ static void RequireDaemonRenderQueryAuthority(string root)
|
|||
var gameplayBootShell = File.Exists(gameplayBootShellPath)
|
||||
? File.ReadAllText(gameplayBootShellPath)
|
||||
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityGameplayBootShell.cs is missing.");
|
||||
var unityRenderPresentation = actionGameManager + "\n" + targetPresentation + "\n" + pilotFrameAdapter + "\n" + gameplayInputShell + "\n" + renderSettingsBridge + "\n" + cockpitHudShell + "\n" + gameplayBootShell;
|
||||
var unityRenderPresentation = actionGameManager + "\n" + targetPresentation + "\n" + pilotFrameController + "\n" + gameplayInputShell + "\n" + renderSettingsBridge + "\n" + cockpitHudShell + "\n" + gameplayBootShell;
|
||||
|
||||
var canonicalSnapshotPath = Path.Combine(root, "Aetheria.State", "Documents", "AetheriaRuntimeStateDocuments.cs");
|
||||
var canonicalSnapshot = File.Exists(canonicalSnapshotPath)
|
||||
|
|
@ -4478,7 +4478,7 @@ static void RequireActionGameManagerInputScreenUsesSharedFullscreenPrimitive(str
|
|||
"public AetheriaUnityMenuShell MenuShell { get; set; }",
|
||||
"Input.Global.InputScreen.performed += context => MenuShell.ToggleFullscreenMenu(MenuShell.HelpScreen);",
|
||||
"Input.Global.ZoneMap.performed += context =>",
|
||||
"Input.Player.TargetNearest.performed += context => PilotOperationAdapter.RequestTargetNearest();",
|
||||
"Input.Player.TargetNearest.performed += context => PilotOperationController.RequestTargetNearest();",
|
||||
"private void RegisterActionBarInput()",
|
||||
"DragSession.RegisterTarget(dragAction => ActionBarPresentation.RequestBinding(slot, dragAction));"
|
||||
};
|
||||
|
|
@ -10153,7 +10153,7 @@ static void RequireTypedDaemonCommandPayloads(string root)
|
|||
if (unityDocumentSubmitHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity daemon operation adapters still fill command documents instead of delegating to typed runtime operations: " +
|
||||
"Unity daemon operation controllers still fill command documents instead of delegating to typed runtime operations: " +
|
||||
string.Join(", ", unityDocumentSubmitHits));
|
||||
}
|
||||
|
||||
|
|
@ -12760,10 +12760,10 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
var observedFrameApplier = File.Exists(observedFrameApplierPath)
|
||||
? File.ReadAllText(observedFrameApplierPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue frame application; AetheriaUnityObservedFrameApplier.cs is missing.");
|
||||
var pilotFrameAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameAdapter.cs");
|
||||
var pilotFrameAdapter = File.Exists(pilotFrameAdapterPath)
|
||||
? File.ReadAllText(pilotFrameAdapterPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue pilot frame adapter; AetheriaUnityPilotFrameAdapter.cs is missing.");
|
||||
var pilotFrameControllerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameController.cs");
|
||||
var pilotFrameController = File.Exists(pilotFrameControllerPath)
|
||||
? File.ReadAllText(pilotFrameControllerPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue pilot frame controller; AetheriaUnityPilotFrameController.cs is missing.");
|
||||
var legacyUnityDaemonEntitySnapshotProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityDaemonEntitySnapshotProjector.cs");
|
||||
if (File.Exists(legacyUnityDaemonEntitySnapshotProjectorPath))
|
||||
{
|
||||
|
|
@ -12844,8 +12844,8 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"private AetheriaUnityCurrentEntityBinder CurrentEntityBinder =>",
|
||||
"private readonly AetheriaUnityCurrentEntityPresentation _currentEntityPresentation",
|
||||
"CurrentEntityPresentation = _currentEntityPresentation",
|
||||
"private AetheriaUnityPilotFrameAdapter PilotFrameAdapter =>",
|
||||
"PilotFrameAdapter = PilotFrameAdapter",
|
||||
"private AetheriaUnityPilotFrameController PilotFrameController =>",
|
||||
"PilotFrameController = PilotFrameController",
|
||||
"SceneWiring.ConfigureCurrentEntityPresentation(_currentEntityPresentation, boot.RuntimeCatalog)",
|
||||
"SceneWiring.ConfigureTargetPresentation("
|
||||
};
|
||||
|
|
@ -13301,9 +13301,9 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
string.Join(", ", missingTargetPresentationSymbols));
|
||||
}
|
||||
|
||||
var requiredPilotFrameAdapterSymbols = new[]
|
||||
var requiredPilotFrameControllerSymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityPilotFrameAdapter",
|
||||
"public sealed class AetheriaUnityPilotFrameController",
|
||||
"public void Tick(Entity currentEntity, float deltaTime, float timeSeconds)",
|
||||
"TargetPresentation?.Tick(currentEntity, timeSeconds)",
|
||||
"Input.Player.Look.ReadValue<Vector2>()",
|
||||
|
|
@ -13315,14 +13315,14 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"Input.Player.TractorBeam.ReadValue<float>()",
|
||||
"PilotCommands.RequestTractorPower(Saturate("
|
||||
};
|
||||
var missingPilotFrameAdapterSymbols = requiredPilotFrameAdapterSymbols
|
||||
.Where(symbol => !pilotFrameAdapter.Contains(symbol, StringComparison.Ordinal))
|
||||
var missingPilotFrameControllerSymbols = requiredPilotFrameControllerSymbols
|
||||
.Where(symbol => !pilotFrameController.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingPilotFrameAdapterSymbols.Length > 0)
|
||||
if (missingPilotFrameControllerSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Undocked pilot-frame input/presentation policy must live in AetheriaUnityPilotFrameAdapter instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotFrameAdapterSymbols));
|
||||
"Undocked pilot-frame input/presentation policy must live in AetheriaUnityPilotFrameController instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotFrameControllerSymbols));
|
||||
}
|
||||
|
||||
var forbiddenManagerPilotFrameSymbols = new[]
|
||||
|
|
@ -13342,7 +13342,7 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
if (managerPilotFrameHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"ActionGameManager still owns undocked pilot-frame input/presentation internals instead of delegating to AetheriaUnityPilotFrameAdapter: " +
|
||||
"ActionGameManager still owns undocked pilot-frame input/presentation internals instead of delegating to AetheriaUnityPilotFrameController: " +
|
||||
string.Join(", ", managerPilotFrameHits));
|
||||
}
|
||||
|
||||
|
|
@ -13534,7 +13534,7 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"CurrentEntity.VisibleFriendlies.ObserveAdd()",
|
||||
"CurrentEntity.VisibleFriendlies.ObserveRemove()",
|
||||
"_currentEntityPresentation.Tick(Time.deltaTime);",
|
||||
"PilotFrameAdapter.Tick(CurrentEntity, Time.deltaTime, Time.time)",
|
||||
"PilotFrameController.Tick(CurrentEntity, Time.deltaTime, Time.time)",
|
||||
"_targetPresentation.UpdateTargetIndicators(",
|
||||
"foreach (var hostile in CurrentEntity.VisibleEnemies)",
|
||||
"foreach (var friendly in CurrentEntity.VisibleFriendlies)",
|
||||
|
|
@ -13694,8 +13694,10 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
var daemonIntentPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeDaemonIntentState.cs");
|
||||
var daemonObserverPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaDaemonObserver.cs");
|
||||
var pilotCommandSenderPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotCommandSender.cs");
|
||||
var pilotFrameAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameAdapter.cs");
|
||||
var pilotOperationAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotOperationAdapter.cs");
|
||||
var pilotFrameControllerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameController.cs");
|
||||
var pilotOperationControllerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotOperationController.cs");
|
||||
var legacyPilotFrameAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameAdapter.cs");
|
||||
var legacyPilotOperationAdapterPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotOperationAdapter.cs");
|
||||
var observedTargetQueryPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedTargetQuery.cs");
|
||||
var observedFrameApplierPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedFrameApplier.cs");
|
||||
var legacyUnityDaemonEntitySnapshotProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityDaemonEntitySnapshotProjector.cs");
|
||||
|
|
@ -13734,12 +13736,20 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
var pilotCommandSender = File.Exists(pilotCommandSenderPath)
|
||||
? File.ReadAllText(pilotCommandSenderPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityPilotCommandSender.cs is missing.");
|
||||
var pilotFrameAdapter = File.Exists(pilotFrameAdapterPath)
|
||||
? File.ReadAllText(pilotFrameAdapterPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityPilotFrameAdapter.cs is missing.");
|
||||
var pilotOperationAdapter = File.Exists(pilotOperationAdapterPath)
|
||||
? File.ReadAllText(pilotOperationAdapterPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityPilotOperationAdapter.cs is missing.");
|
||||
var pilotFrameController = File.Exists(pilotFrameControllerPath)
|
||||
? File.ReadAllText(pilotFrameControllerPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityPilotFrameController.cs is missing.");
|
||||
var pilotOperationController = File.Exists(pilotOperationControllerPath)
|
||||
? File.ReadAllText(pilotOperationControllerPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityPilotOperationController.cs is missing.");
|
||||
if (File.Exists(legacyPilotFrameAdapterPath) ||
|
||||
File.Exists(legacyPilotOperationAdapterPath) ||
|
||||
actionGameManager.Contains("AetheriaUnityPilotFrameAdapter", StringComparison.Ordinal) ||
|
||||
actionGameManager.Contains("AetheriaUnityPilotOperationAdapter", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity pilot control must be owned by named controllers; adapter-shaped pilot access is obsolete.");
|
||||
}
|
||||
var observedTargetQuery = File.Exists(observedTargetQueryPath)
|
||||
? File.ReadAllText(observedTargetQueryPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityObservedTargetQuery.cs is missing.");
|
||||
|
|
@ -13849,9 +13859,9 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"EntityBlueprintMaterializer.MaterializeObservedEntity",
|
||||
"_loadoutItemFactory.CreateLoadoutItem",
|
||||
"private AetheriaUnityPilotCommandSender PilotCommands =>",
|
||||
"private AetheriaUnityPilotFrameAdapter PilotFrameAdapter =>",
|
||||
"PilotFrameAdapter = PilotFrameAdapter",
|
||||
"private AetheriaUnityPilotOperationAdapter PilotOperationAdapter =>",
|
||||
"private AetheriaUnityPilotFrameController PilotFrameController =>",
|
||||
"PilotFrameController = PilotFrameController",
|
||||
"private AetheriaUnityPilotOperationController PilotOperationController =>",
|
||||
"private AetheriaUnityObservedTargetQuery ObservedTargetQuery =>",
|
||||
"SceneWiring.ConfigureTargetPresentation("
|
||||
};
|
||||
|
|
@ -14025,9 +14035,9 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
string.Join(", ", managerFrameApplicationHits));
|
||||
}
|
||||
|
||||
var requiredPilotFrameAdapterSymbols = new[]
|
||||
var requiredPilotFrameControllerSymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityPilotFrameAdapter",
|
||||
"public sealed class AetheriaUnityPilotFrameController",
|
||||
"public void Tick(Entity currentEntity, float deltaTime, float timeSeconds)",
|
||||
"TargetPresentation?.Tick(currentEntity, timeSeconds)",
|
||||
"Input.Player.Look.ReadValue<Vector2>()",
|
||||
|
|
@ -14039,14 +14049,14 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"Input.Player.TractorBeam.ReadValue<float>()",
|
||||
"PilotCommands.RequestTractorPower(Saturate("
|
||||
};
|
||||
var missingPilotFrameAdapterSymbols = requiredPilotFrameAdapterSymbols
|
||||
.Where(symbol => !pilotFrameAdapter.Contains(symbol, StringComparison.Ordinal))
|
||||
var missingPilotFrameControllerSymbols = requiredPilotFrameControllerSymbols
|
||||
.Where(symbol => !pilotFrameController.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingPilotFrameAdapterSymbols.Length > 0)
|
||||
if (missingPilotFrameControllerSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity observer pilot-frame input and presentation policy must live in AetheriaUnityPilotFrameAdapter instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotFrameAdapterSymbols));
|
||||
"Unity observer pilot-frame input and presentation policy must live in AetheriaUnityPilotFrameController instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotFrameControllerSymbols));
|
||||
}
|
||||
|
||||
var forbiddenManagerPilotFrameSymbols = new[]
|
||||
|
|
@ -14070,9 +14080,9 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
string.Join(", ", managerPilotFrameHits));
|
||||
}
|
||||
|
||||
var requiredPilotOperationAdapterSymbols = new[]
|
||||
var requiredPilotOperationControllerSymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityPilotOperationAdapter",
|
||||
"public sealed class AetheriaUnityPilotOperationController",
|
||||
"public void RequestInteract()",
|
||||
"public void RequestTargetSelection(Entity target)",
|
||||
"public void RequestTargetReticle()",
|
||||
|
|
@ -14094,14 +14104,14 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"operations => operations.Undock()",
|
||||
"_resolvePilotCommands()?.TrySubmit(submit, label)"
|
||||
};
|
||||
var missingPilotOperationAdapterSymbols = requiredPilotOperationAdapterSymbols
|
||||
.Where(symbol => !pilotOperationAdapter.Contains(symbol, StringComparison.Ordinal))
|
||||
var missingPilotOperationControllerSymbols = requiredPilotOperationControllerSymbols
|
||||
.Where(symbol => !pilotOperationController.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingPilotOperationAdapterSymbols.Length > 0)
|
||||
if (missingPilotOperationControllerSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity pilot operation lowering must live in AetheriaUnityPilotOperationAdapter instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotOperationAdapterSymbols));
|
||||
"Unity pilot operation lowering must live in AetheriaUnityPilotOperationController instead of ActionGameManager: " +
|
||||
string.Join(", ", missingPilotOperationControllerSymbols));
|
||||
}
|
||||
|
||||
var forbiddenManagerOperationLoweringSymbols = new[]
|
||||
|
|
@ -14127,7 +14137,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
if (managerOperationLoweringHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"ActionGameManager still owns typed daemon operation lowering instead of delegating to AetheriaUnityPilotOperationAdapter: " +
|
||||
"ActionGameManager still owns typed daemon operation lowering instead of delegating to AetheriaUnityPilotOperationController: " +
|
||||
string.Join(", ", managerOperationLoweringHits));
|
||||
}
|
||||
|
||||
|
|
@ -14592,15 +14602,15 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
|
||||
var requiredDockingLoweringSymbols = new[]
|
||||
{
|
||||
"private AetheriaUnityPilotOperationAdapter PilotOperationAdapter =>",
|
||||
"PilotOperationAdapter = PilotOperationAdapter",
|
||||
"public sealed class AetheriaUnityPilotOperationAdapter",
|
||||
"private AetheriaUnityPilotOperationController PilotOperationController =>",
|
||||
"PilotOperationController = PilotOperationController",
|
||||
"public sealed class AetheriaUnityPilotOperationController",
|
||||
"operations => operations.DockNearest()",
|
||||
"operations => operations.Undock()",
|
||||
"operations => operations.Interact()"
|
||||
};
|
||||
|
||||
var dockingLoweringSource = actionGameManager + "\n" + pilotOperationAdapter;
|
||||
var dockingLoweringSource = actionGameManager + "\n" + pilotOperationController;
|
||||
var missingDockingLoweringSymbols = requiredDockingLoweringSymbols
|
||||
.Where(symbol => !dockingLoweringSource.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
|
@ -14623,7 +14633,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"private void RequestUndock()",
|
||||
"private void RequestInteract()",
|
||||
"private void RequestTowToStation()",
|
||||
"PilotOperationAdapter.RequestTowToStation(_towingStation)",
|
||||
"PilotOperationController.RequestTowToStation(_towingStation)",
|
||||
"public void RequestTowToStation(Entity towingStation)",
|
||||
"_towingStation",
|
||||
"UpdateTowingStation",
|
||||
|
|
@ -14738,7 +14748,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
|
||||
var requiredShieldToggleSymbols = new[]
|
||||
{
|
||||
"PilotOperationAdapter.RequestShieldToggle()",
|
||||
"PilotOperationController.RequestShieldToggle()",
|
||||
"operations => operations.ToggleShieldEnabled()",
|
||||
"AetheriaRuntimeDaemonCommandKinds.ToggleShieldEnabled",
|
||||
"ApplyToggleEquipmentBehaviorItem(run, command, \"Shield\""
|
||||
|
|
@ -14747,7 +14757,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
var gameplayInputShell = File.Exists(gameplayInputShellPath)
|
||||
? File.ReadAllText(gameplayInputShellPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity shield input lowering; AetheriaUnityGameplayInputShell.cs is missing.");
|
||||
var unityPilotOperationSources = actionGameManager + "\n" + pilotOperationAdapter + "\n" + gameplayInputShell;
|
||||
var unityPilotOperationSources = actionGameManager + "\n" + pilotOperationController + "\n" + gameplayInputShell;
|
||||
var missingShieldToggleSymbols = requiredShieldToggleSymbols
|
||||
.Where(symbol =>
|
||||
!unityPilotOperationSources.Contains(symbol, StringComparison.Ordinal) &&
|
||||
|
|
@ -14826,7 +14836,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"operations => operations.TargetPrevious()",
|
||||
"operations => operations.TargetReticle("
|
||||
};
|
||||
var unityTargetRequestSources = actionGameManager + "\n" + pilotOperationAdapter + "\n" + daemonOperations;
|
||||
var unityTargetRequestSources = actionGameManager + "\n" + pilotOperationController + "\n" + daemonOperations;
|
||||
var missingUnityTargetRequestSymbols = requiredUnityTargetRequestSymbols
|
||||
.Where(symbol => !unityTargetRequestSources.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
private AetheriaUnityObservedEntityRestorer _observedEntityRestorer;
|
||||
private AetheriaUnityCurrentEntityBinder _currentEntityBinder;
|
||||
private AetheriaUnityObservedZoneContextFactory _observedZoneContextFactory;
|
||||
private AetheriaUnityPilotFrameAdapter _pilotFrameAdapter;
|
||||
private AetheriaUnityPilotOperationAdapter _pilotOperationAdapter;
|
||||
private AetheriaUnityPilotFrameController _pilotFrameController;
|
||||
private AetheriaUnityPilotOperationController _pilotOperationController;
|
||||
private AetheriaUnityObservedTargetQuery _observedTargetQuery;
|
||||
private AetheriaUnityObservedFrameApplier _observedFrameApplier;
|
||||
private AetheriaUnityEntityBlueprintMaterializer _entityBlueprintMaterializer;
|
||||
|
|
@ -71,8 +71,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
PlayMusic = PlayMusic,
|
||||
UpdateTargetPanel = target => CockpitHudShell.UpdateTarget(target, CurrentEntity)
|
||||
};
|
||||
private AetheriaUnityPilotFrameAdapter PilotFrameAdapter =>
|
||||
_pilotFrameAdapter ??= new AetheriaUnityPilotFrameAdapter(direction => _viewDirection = direction)
|
||||
private AetheriaUnityPilotFrameController PilotFrameController =>
|
||||
_pilotFrameController ??= new AetheriaUnityPilotFrameController(direction => _viewDirection = direction)
|
||||
{
|
||||
ZoneRenderer = ZoneRenderer,
|
||||
Input = Input,
|
||||
|
|
@ -82,8 +82,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
SevereHeatstrokePost = SevereHeatstrokePost,
|
||||
Sensitivity = Sensitivity
|
||||
};
|
||||
private AetheriaUnityPilotOperationAdapter PilotOperationAdapter =>
|
||||
_pilotOperationAdapter ??= new AetheriaUnityPilotOperationAdapter(
|
||||
private AetheriaUnityPilotOperationController PilotOperationController =>
|
||||
_pilotOperationController ??= new AetheriaUnityPilotOperationController(
|
||||
() => PilotCommands,
|
||||
_observedEntityIndex,
|
||||
() => _viewDirection,
|
||||
|
|
@ -141,7 +141,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
MenuShell = MenuShell,
|
||||
DragSession = _dragSession,
|
||||
ActionBarPresentation = _actionBarPresentation,
|
||||
PilotOperationAdapter = PilotOperationAdapter,
|
||||
PilotOperationController = PilotOperationController,
|
||||
ResolveCurrentEntity = () => CurrentEntity,
|
||||
SetInput = input => Input = input
|
||||
};
|
||||
|
|
@ -161,7 +161,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
IsCurrentEntityUndocked = IsCurrentEntityObservedUndocked,
|
||||
ApplyLatestZoneRender = () => ObservedFrameApplier.ApplyLatestZoneRender(),
|
||||
CurrentEntityPresentation = _currentEntityPresentation,
|
||||
PilotFrameAdapter = PilotFrameAdapter,
|
||||
PilotFrameController = PilotFrameController,
|
||||
TargetPresentation = _targetPresentation
|
||||
};
|
||||
private AetheriaUnityGameplayBootShell GameplayBootShell =>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public sealed class AetheriaUnityGameplayInputShell : IDisposable
|
|||
public AetheriaUnityMenuShell MenuShell { get; set; }
|
||||
public AetheriaUnityDragSession DragSession { get; set; }
|
||||
public AetheriaUnityActionBarPresentation ActionBarPresentation { get; set; }
|
||||
public AetheriaUnityPilotOperationAdapter PilotOperationAdapter { get; set; }
|
||||
public AetheriaUnityPilotOperationController PilotOperationController { get; set; }
|
||||
public Func<Entity> ResolveCurrentEntity { get; set; }
|
||||
public Action<AetheriaInput> SetInput { get; set; }
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ public sealed class AetheriaUnityGameplayInputShell : IDisposable
|
|||
return;
|
||||
}
|
||||
|
||||
PilotOperationAdapter.RequestInteract();
|
||||
PilotOperationController.RequestInteract();
|
||||
};
|
||||
|
||||
Input.Global.MainMenu.performed += context =>
|
||||
|
|
@ -153,21 +153,21 @@ public sealed class AetheriaUnityGameplayInputShell : IDisposable
|
|||
{
|
||||
var currentEntity = ResolveCurrentEntity?.Invoke();
|
||||
if (currentEntity != null)
|
||||
PilotOperationAdapter.RequestOverrideShutdown(!currentEntity.OverrideShutdown);
|
||||
PilotOperationController.RequestOverrideShutdown(!currentEntity.OverrideShutdown);
|
||||
};
|
||||
|
||||
Input.Player.Ping.performed += context => PilotOperationAdapter.RequestSensorPing();
|
||||
Input.Player.Ping.performed += context => PilotOperationController.RequestSensorPing();
|
||||
Input.Player.ToggleHeatsinks.performed += context =>
|
||||
{
|
||||
var currentEntity = ResolveCurrentEntity?.Invoke();
|
||||
if (currentEntity != null)
|
||||
PilotOperationAdapter.RequestHeatsinksEnabled(!currentEntity.HeatsinksEnabled);
|
||||
PilotOperationController.RequestHeatsinksEnabled(!currentEntity.HeatsinksEnabled);
|
||||
};
|
||||
Input.Player.ToggleShield.performed += context => PilotOperationAdapter.RequestShieldToggle();
|
||||
Input.Player.TargetReticle.performed += context => PilotOperationAdapter.RequestTargetReticle();
|
||||
Input.Player.TargetNearest.performed += context => PilotOperationAdapter.RequestTargetNearest();
|
||||
Input.Player.TargetNext.performed += context => PilotOperationAdapter.RequestTargetNext();
|
||||
Input.Player.TargetPrevious.performed += context => PilotOperationAdapter.RequestTargetPrevious();
|
||||
Input.Player.ToggleShield.performed += context => PilotOperationController.RequestShieldToggle();
|
||||
Input.Player.TargetReticle.performed += context => PilotOperationController.RequestTargetReticle();
|
||||
Input.Player.TargetNearest.performed += context => PilotOperationController.RequestTargetNearest();
|
||||
Input.Player.TargetNext.performed += context => PilotOperationController.RequestTargetNext();
|
||||
Input.Player.TargetPrevious.performed += context => PilotOperationController.RequestTargetPrevious();
|
||||
}
|
||||
|
||||
private void RegisterActionBarInput()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public sealed class AetheriaUnityGameplayLoopShell
|
|||
public Func<bool> IsCurrentEntityUndocked { get; set; }
|
||||
public Action ApplyLatestZoneRender { get; set; }
|
||||
public AetheriaUnityCurrentEntityPresentation CurrentEntityPresentation { get; set; }
|
||||
public AetheriaUnityPilotFrameAdapter PilotFrameAdapter { get; set; }
|
||||
public AetheriaUnityPilotFrameController PilotFrameController { get; set; }
|
||||
public AetheriaUnityTargetPresentation TargetPresentation { get; set; }
|
||||
|
||||
public void Tick(float deltaTime, float time)
|
||||
|
|
@ -22,7 +22,7 @@ public sealed class AetheriaUnityGameplayLoopShell
|
|||
ApplyLatestZoneRender?.Invoke();
|
||||
CurrentEntityPresentation?.Tick(deltaTime);
|
||||
if (IsCurrentEntityUndocked?.Invoke() == true)
|
||||
PilotFrameAdapter?.Tick(ResolveCurrentEntity?.Invoke(), deltaTime, time);
|
||||
PilotFrameController?.Tick(ResolveCurrentEntity?.Invoke(), deltaTime, time);
|
||||
}
|
||||
|
||||
public void LateTick()
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ using UnityEngine.InputSystem;
|
|||
using UnityEngine.Rendering.PostProcessing;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
public sealed class AetheriaUnityPilotFrameAdapter
|
||||
public sealed class AetheriaUnityPilotFrameController
|
||||
{
|
||||
private float2 _entityYawPitch;
|
||||
private readonly Action<float3> _setViewDirection;
|
||||
|
||||
public AetheriaUnityPilotFrameAdapter(Action<float3> setViewDirection)
|
||||
public AetheriaUnityPilotFrameController(Action<float3> setViewDirection)
|
||||
{
|
||||
_setViewDirection = setViewDirection ?? (_ => { });
|
||||
}
|
||||
|
|
@ -6,14 +6,14 @@ using System;
|
|||
using GameCult.Aetheria.State.Verse;
|
||||
using Unity.Mathematics;
|
||||
|
||||
public sealed class AetheriaUnityPilotOperationAdapter
|
||||
public sealed class AetheriaUnityPilotOperationController
|
||||
{
|
||||
private readonly Func<AetheriaUnityPilotCommandSender> _resolvePilotCommands;
|
||||
private readonly AetheriaUnityObservedEntityIndex _observedEntityIndex;
|
||||
private readonly Func<float3> _resolveViewDirection;
|
||||
private readonly Func<Entity> _resolveCurrentEntity;
|
||||
|
||||
public AetheriaUnityPilotOperationAdapter(
|
||||
public AetheriaUnityPilotOperationController(
|
||||
Func<AetheriaUnityPilotCommandSender> resolvePilotCommands,
|
||||
AetheriaUnityObservedEntityIndex observedEntityIndex,
|
||||
Func<float3> resolveViewDirection,
|
||||
Loading…
Reference in a new issue