Remove action bar binding adapter
This commit is contained in:
parent
7eda899f74
commit
b89bbdd022
4 changed files with 9 additions and 30 deletions
|
|
@ -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(",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<AetheriaUnityActionBarBinding> bindings)
|
||||
{
|
||||
_presentation.ApplyLocalBindings();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c70aab770e351924eb213421f9096e22
|
||||
Loading…
Reference in a new issue