From b89bbdd02220ffe2295f9d0d931422d5f576011a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 29 Jun 2026 01:24:04 +0100 Subject: [PATCH] Remove action bar binding adapter --- Aetheria.State.Verify/Program.cs | 10 +++++++-- Assets/Scripts/Gameplay/ActionGameManager.cs | 5 +---- .../AetheriaUnityActionBarBindingAdapter.cs | 22 ------------------- ...theriaUnityActionBarBindingAdapter.cs.meta | 2 -- 4 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs delete mode 100644 Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs.meta diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 9c979d5bb..742095390 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -16819,8 +16819,7 @@ static void RequireActionBarBindingRequestAuthority(string root) { "ActionBarPresentation = _actionBarPresentation", "SceneWiring.ConfigureActionBarPresentation(", - "private AetheriaUnityActionBarBindingAdapter ActionBarBindings =>", - "ApplyActionBarBindings = ActionBarBindings.ApplyBindings" + "ApplyActionBarBindings = _ => _actionBarPresentation?.ApplyLocalBindings()" }; var missingManagerSymbols = requiredManagerSymbols @@ -16834,6 +16833,13 @@ static void RequireActionBarBindingRequestAuthority(string root) string.Join(", ", missingManagerSymbols)); } + if (actionGameManager.Contains("AetheriaUnityActionBarBindingAdapter", StringComparison.Ordinal) || + File.Exists(Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityActionBarBindingAdapter.cs"))) + { + throw new InvalidOperationException( + "Action-bar binding restore must go straight to AetheriaUnityActionBarPresentation; the old adapter owned no authority."); + } + var requiredSceneWiringSymbols = new[] { "public void ConfigureActionBarPresentation(", diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index c549df722..597fe0c5e 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -25,7 +25,6 @@ public class ActionGameManager : MonoBehaviour private AetheriaUnityObservedTargetQuery _observedTargetQuery; private AetheriaUnityObservedFrameApplier _observedFrameApplier; private AetheriaUnityEntityBlueprintMaterializer _entityBlueprintMaterializer; - private AetheriaUnityActionBarBindingAdapter _actionBarBindingAdapter; private AetheriaUnityMenuShell _menuShell; private AetheriaUnityGameplayInputShell _gameplayInputShell; private AetheriaUnityCockpitHudShell _cockpitHudShell; @@ -66,7 +65,7 @@ public class ActionGameManager : MonoBehaviour GetViewDirection = () => _viewDirection, SetViewDirection = direction => _viewDirection = direction, ResolveZoneRender = () => ResolveDaemonObserver()?.LastObservedState?.ZoneRender, - ApplyActionBarBindings = ActionBarBindings.ApplyBindings, + ApplyActionBarBindings = _ => _actionBarPresentation?.ApplyLocalBindings(), EnablePlayerInput = EnablePlayerInput, DisablePlayerInput = DisablePlayerInput, PlayMusic = PlayMusic, @@ -108,8 +107,6 @@ public class ActionGameManager : MonoBehaviour Debug.LogWarning); private AetheriaUnityEntityBlueprintMaterializer EntityBlueprintMaterializer => _entityBlueprintMaterializer ??= new AetheriaUnityEntityBlueprintMaterializer(_loadoutItemFactory); - private AetheriaUnityActionBarBindingAdapter ActionBarBindings => - _actionBarBindingAdapter ??= new AetheriaUnityActionBarBindingAdapter(_actionBarPresentation); private AetheriaUnityMenuShell MenuShell => _menuShell ??= new AetheriaUnityMenuShell { diff --git a/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs b/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs deleted file mode 100644 index 6f107daa8..000000000 --- a/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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 System; -using System.Collections.Generic; - -public sealed class AetheriaUnityActionBarBindingAdapter -{ - private readonly AetheriaUnityActionBarPresentation _presentation; - - public AetheriaUnityActionBarBindingAdapter( - AetheriaUnityActionBarPresentation presentation) - { - _presentation = presentation ?? throw new ArgumentNullException(nameof(presentation)); - } - - public void ApplyBindings(IReadOnlyList bindings) - { - _presentation.ApplyLocalBindings(); - } -} diff --git a/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs.meta b/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs.meta deleted file mode 100644 index 9136cef68..000000000 --- a/Assets/Scripts/Gameplay/AetheriaUnityActionBarBindingAdapter.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: c70aab770e351924eb213421f9096e22 \ No newline at end of file