Remove dead target client resolver
This commit is contained in:
parent
faf1d31a43
commit
b09b7b43e0
4 changed files with 32 additions and 6 deletions
|
|
@ -13663,6 +13663,21 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
string.Join(", ", missingTargetPresentationSymbols));
|
||||
}
|
||||
|
||||
var forbiddenTargetPresentationSymbols = new[]
|
||||
{
|
||||
"Func<AetheriaClient>",
|
||||
"ResolveClient"
|
||||
};
|
||||
var targetPresentationAccessHits = forbiddenTargetPresentationSymbols
|
||||
.Where(symbol => targetPresentation.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (targetPresentationAccessHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaUnityTargetPresentation must consume observed typed target data, not hold a runtime client resolver: " +
|
||||
string.Join(", ", targetPresentationAccessHits));
|
||||
}
|
||||
|
||||
var requiredPilotFrameControllerSymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityPilotFrameController",
|
||||
|
|
@ -13883,6 +13898,21 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
string.Join(", ", missingGameplaySceneWiringSymbols));
|
||||
}
|
||||
|
||||
var forbiddenGameplaySceneWiringSymbols = new[]
|
||||
{
|
||||
"Func<AetheriaClient> resolveClient",
|
||||
"presentation.ResolveClient = resolveClient"
|
||||
};
|
||||
var gameplaySceneWiringAccessHits = forbiddenGameplaySceneWiringSymbols
|
||||
.Where(symbol => gameplaySceneWiring.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (gameplaySceneWiringAccessHits.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaUnityGameplaySceneWiring must wire typed observed target query delegates instead of passing runtime client resolvers: " +
|
||||
string.Join(", ", gameplaySceneWiringAccessHits));
|
||||
}
|
||||
|
||||
var forbiddenGameplaySymbols = new[]
|
||||
{
|
||||
"if (run == null ||\r\n run.CurrentZoneIndex < 0 ||\r\n run.CurrentZoneEntityIndex < 0)",
|
||||
|
|
|
|||
|
|
@ -314,8 +314,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
_targetPresentation,
|
||||
boot.RuntimeCatalog,
|
||||
_observedEntityIndex,
|
||||
ObservedTargetQuery,
|
||||
() => ResolveDaemonObserver()?.Client);
|
||||
ObservedTargetQuery);
|
||||
SceneWiring.ConfigureInventoryDragSession(_dragSession);
|
||||
SceneWiring.ConfigureActionBarPresentation(
|
||||
_actionBarPresentation,
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ public sealed class AetheriaUnityGameplaySceneWiring
|
|||
AetheriaUnityTargetPresentation presentation,
|
||||
AetheriaRuntimeCatalogSnapshot runtimeCatalog,
|
||||
AetheriaUnityObservedEntityIndex observedEntityIndex,
|
||||
AetheriaUnityObservedTargetQuery observedTargetQuery,
|
||||
Func<AetheriaClient> resolveClient)
|
||||
AetheriaUnityObservedTargetQuery observedTargetQuery)
|
||||
{
|
||||
if (presentation == null)
|
||||
return;
|
||||
|
|
@ -95,7 +94,6 @@ public sealed class AetheriaUnityGameplaySceneWiring
|
|||
presentation.TargetVisibilityFill = TargetVisibilityFill;
|
||||
presentation.VisibilityToTargetFill = VisibilityToTargetFill;
|
||||
presentation.TargetShieldsFill = TargetShieldsFill;
|
||||
presentation.ResolveClient = resolveClient;
|
||||
presentation.ResolveEntity = daemonEntityIndex =>
|
||||
observedEntityIndex != null &&
|
||||
observedEntityIndex.TryResolveEntityByDaemonIndex(daemonEntityIndex, out var entity)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ public sealed class AetheriaUnityTargetPresentation
|
|||
public Image VisibilityToTargetFill { get; set; }
|
||||
public Image TargetShieldsFill { get; set; }
|
||||
public AetheriaRuntimeCatalogSnapshot RuntimeCatalog { get; set; }
|
||||
public Func<AetheriaClient> ResolveClient { get; set; }
|
||||
public Func<int, Entity> ResolveEntity { get; set; }
|
||||
public Func<Entity, Entity> ResolveTarget { get; set; }
|
||||
public Func<Entity, Entity, float> ResolveInfoGathered { get; set; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue