Prove deterministic released Aetheria session
This commit is contained in:
parent
002fbdf357
commit
b274bb0cf8
5 changed files with 59 additions and 39 deletions
|
|
@ -384,30 +384,26 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
}
|
||||
};
|
||||
|
||||
var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding(
|
||||
playerFact.AssetRef,
|
||||
playerFact.EntityKind,
|
||||
"provider-asset-ref"));
|
||||
Assert.That(playerPrefab, Is.Not.Null,
|
||||
$"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'.");
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind,
|
||||
Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping),
|
||||
"The first requested provider bundle was not negotiated as a mapped body.");
|
||||
var marker = FindMarker(root, playerId);
|
||||
Assert.That(
|
||||
marker.GetComponentsInChildren<Transform>(includeInactive: true).Length,
|
||||
Is.GreaterThan(1),
|
||||
"The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab.");
|
||||
|
||||
if (requireSessionGameplay)
|
||||
{
|
||||
EveUnitySceneCommandReceipt observedDockReceipt = null;
|
||||
string dockCommandId = null;
|
||||
runtime.ReceiptAvailable += receipt =>
|
||||
{
|
||||
if (receipt.CommandId == dockCommandId)
|
||||
observedDockReceipt = receipt;
|
||||
};
|
||||
host.SubmitAdvertisedActionIntent(playerId, "simulation.step");
|
||||
var dockVersion = runtime.ActiveVersion;
|
||||
var dock = host.SubmitAdvertisedActionIntent(playerId, "pilot.dock");
|
||||
dockCommandId = dock.CommandId;
|
||||
var dockDeadline = Time.realtimeSinceStartup + 12f;
|
||||
while (Time.realtimeSinceStartup < dockDeadline &&
|
||||
(runtime.LastReceipt == null || runtime.LastReceipt.CommandId != dock.CommandId ||
|
||||
!string.Equals(runtime.LastReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) ||
|
||||
runtime.ActiveVersion < runtime.LastReceipt.SourceVersion ||
|
||||
(observedDockReceipt == null ||
|
||||
!string.Equals(observedDockReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) ||
|
||||
runtime.ActiveVersion < observedDockReceipt.SourceVersion ||
|
||||
!(host.InputCapability?.Actions ?? Array.Empty<EveInputActionDocument>()).Any(candidate =>
|
||||
candidate != null &&
|
||||
candidate.ActionId.StartsWith("trade.buy.", StringComparison.Ordinal) &&
|
||||
|
|
@ -416,7 +412,7 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
runtime.Refresh();
|
||||
}
|
||||
AssertReconciledProviderReceipt(runtime.LastReceipt, dock.CommandId,
|
||||
AssertReconciledProviderReceipt(observedDockReceipt, dock.CommandId,
|
||||
provider.Selection.ProviderId, provider.Selection.SurfaceId, dockVersion);
|
||||
var buyAction = (host.InputCapability?.Actions ?? Array.Empty<EveInputActionDocument>())
|
||||
.FirstOrDefault(candidate => candidate != null &&
|
||||
|
|
@ -516,6 +512,20 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
provider.Selection.ProviderId, provider.Selection.SurfaceId, undockVersion);
|
||||
}
|
||||
|
||||
var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding(
|
||||
playerFact.AssetRef,
|
||||
playerFact.EntityKind,
|
||||
"provider-asset-ref"));
|
||||
Assert.That(playerPrefab, Is.Not.Null,
|
||||
$"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'.");
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind,
|
||||
Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping),
|
||||
"The first requested provider bundle was not negotiated as a mapped body.");
|
||||
Assert.That(
|
||||
marker.GetComponentsInChildren<Transform>(includeInactive: true).Length,
|
||||
Is.GreaterThan(1),
|
||||
"The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab.");
|
||||
|
||||
var initialPosition = marker.transform.position;
|
||||
initialVersion = runtime.ActiveVersion;
|
||||
var request = runtime.SubmitMoveVectorIntent(playerId, 1f, 0f, 1f);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.38",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.3",
|
||||
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.4",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.97",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.98",
|
||||
"org.gamecult.eve.unity-uitoolkit": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.1"
|
||||
},
|
||||
"testables": [
|
||||
|
|
|
|||
|
|
@ -144,18 +144,18 @@
|
|||
"hash": "e08fa08335f99e9edddeb706912eecfad07cb281"
|
||||
},
|
||||
"org.gamecult.eve.unity-scene": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.97",
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.98",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.36",
|
||||
"org.gamecult.cultlib": "1.0.38",
|
||||
"org.gamecult.eve.plugin-fields": "0.2.3",
|
||||
"org.gamecult.eve.surface": "0.2.4",
|
||||
"com.unity.mathematics": "1.3.2",
|
||||
"com.unity.render-pipelines.universal": "17.4.0",
|
||||
"com.unity.modules.particlesystem": "1.0.0"
|
||||
},
|
||||
"hash": "44e338bd9eb4997f2235f7aa711b79bc5d5c12ff"
|
||||
"hash": "002fbdf3570f533a8728d2a8f808025065d99532"
|
||||
},
|
||||
"org.gamecult.eve.unity-uitoolkit": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.1",
|
||||
|
|
|
|||
|
|
@ -384,30 +384,26 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
}
|
||||
};
|
||||
|
||||
var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding(
|
||||
playerFact.AssetRef,
|
||||
playerFact.EntityKind,
|
||||
"provider-asset-ref"));
|
||||
Assert.That(playerPrefab, Is.Not.Null,
|
||||
$"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'.");
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind,
|
||||
Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping),
|
||||
"The first requested provider bundle was not negotiated as a mapped body.");
|
||||
var marker = FindMarker(root, playerId);
|
||||
Assert.That(
|
||||
marker.GetComponentsInChildren<Transform>(includeInactive: true).Length,
|
||||
Is.GreaterThan(1),
|
||||
"The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab.");
|
||||
|
||||
if (requireSessionGameplay)
|
||||
{
|
||||
EveUnitySceneCommandReceipt observedDockReceipt = null;
|
||||
string dockCommandId = null;
|
||||
runtime.ReceiptAvailable += receipt =>
|
||||
{
|
||||
if (receipt.CommandId == dockCommandId)
|
||||
observedDockReceipt = receipt;
|
||||
};
|
||||
host.SubmitAdvertisedActionIntent(playerId, "simulation.step");
|
||||
var dockVersion = runtime.ActiveVersion;
|
||||
var dock = host.SubmitAdvertisedActionIntent(playerId, "pilot.dock");
|
||||
dockCommandId = dock.CommandId;
|
||||
var dockDeadline = Time.realtimeSinceStartup + 12f;
|
||||
while (Time.realtimeSinceStartup < dockDeadline &&
|
||||
(runtime.LastReceipt == null || runtime.LastReceipt.CommandId != dock.CommandId ||
|
||||
!string.Equals(runtime.LastReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) ||
|
||||
runtime.ActiveVersion < runtime.LastReceipt.SourceVersion ||
|
||||
(observedDockReceipt == null ||
|
||||
!string.Equals(observedDockReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) ||
|
||||
runtime.ActiveVersion < observedDockReceipt.SourceVersion ||
|
||||
!(host.InputCapability?.Actions ?? Array.Empty<EveInputActionDocument>()).Any(candidate =>
|
||||
candidate != null &&
|
||||
candidate.ActionId.StartsWith("trade.buy.", StringComparison.Ordinal) &&
|
||||
|
|
@ -416,7 +412,7 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
runtime.Refresh();
|
||||
}
|
||||
AssertReconciledProviderReceipt(runtime.LastReceipt, dock.CommandId,
|
||||
AssertReconciledProviderReceipt(observedDockReceipt, dock.CommandId,
|
||||
provider.Selection.ProviderId, provider.Selection.SurfaceId, dockVersion);
|
||||
var buyAction = (host.InputCapability?.Actions ?? Array.Empty<EveInputActionDocument>())
|
||||
.FirstOrDefault(candidate => candidate != null &&
|
||||
|
|
@ -516,6 +512,20 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
provider.Selection.ProviderId, provider.Selection.SurfaceId, undockVersion);
|
||||
}
|
||||
|
||||
var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding(
|
||||
playerFact.AssetRef,
|
||||
playerFact.EntityKind,
|
||||
"provider-asset-ref"));
|
||||
Assert.That(playerPrefab, Is.Not.Null,
|
||||
$"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'.");
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind,
|
||||
Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping),
|
||||
"The first requested provider bundle was not negotiated as a mapped body.");
|
||||
Assert.That(
|
||||
marker.GetComponentsInChildren<Transform>(includeInactive: true).Length,
|
||||
Is.GreaterThan(1),
|
||||
"The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab.");
|
||||
|
||||
var initialPosition = marker.transform.position;
|
||||
initialVersion = runtime.ActiveVersion;
|
||||
var request = runtime.SubmitMoveVectorIntent(playerId, 1f, 0f, 1f);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ param(
|
|||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$expectedEveUnityCommit = "44e338bd9eb4997f2235f7aa711b79bc5d5c12ff"
|
||||
$expectedEveUnityCommit = "002fbdf3570f533a8728d2a8f808025065d99532"
|
||||
$expectedEveFieldsCommit = "c5a4a75c1b727499b16c2dae1895f29e2a9f72f0"
|
||||
$expectedEveUnityUiToolkitCommit = "4d0cbe0185bdc4fc65eb63503a7c5cb578539669"
|
||||
$expectedCultLibCommit = "c6cf04a342a013afab52063a9b5445a3683700d4"
|
||||
|
|
|
|||
Reference in a new issue