From 56473bee53c431dba70f8283b20e2ef37c13501b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 6 Jul 2026 01:12:47 +0100 Subject: [PATCH] Use shared projectile asset key --- .../Electron/aetheria-rts-local-documents.ts | 2 +- Aetheria.State.Verify/Program.cs | 19 +++++++++++++++++++ .../Tests/DaemonRuntimeDocumentTests.cs | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts index fca76486b..5d4c9bfe2 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts @@ -522,7 +522,7 @@ function toProjectileViewObject(projectile: unknown[]): ViewObject { targetEntityIndex: num(projectile[projectileSlots.targetEntityIndex], -1), isActive: projectile[projectileSlots.active] !== false, visibility: num(projectile[projectileSlots.radius]), - iconAsset: spriteAsset("aetheria.asset.sprite.rts.projectile", "Sprites/Icons/Lightning Bolt"), + iconAsset: spriteAsset("aetheria.asset.sprite.game.projectile", "Sprites/Icons/Lightning Bolt"), status: { hull: num(projectile[projectileSlots.damage]), shield: 0, diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 363ef19e4..5bf2c0c9a 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -16097,6 +16097,7 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) "AetheriaRuntimeClientTargetStore.cs"); var runtimeClientProviderPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityRuntimeClientProvider.cs"); var rtsLocalDocumentsPath = Path.Combine(root, "Aetheria.Rts.Web", "Electron", "aetheria-rts-local-documents.ts"); + var daemonRuntimeDocumentTestsPath = Path.Combine(root, "Assets", "Scripts", "Tests", "DaemonRuntimeDocumentTests.cs"); var authoritySmokePath = Path.Combine(root, "Aetheria.State.AuthoritySmoke", "Program.cs"); var freezePath = Path.Combine(root, "Aetheria.State.Freeze", "Program.cs"); var snapshotDocuments = File.Exists(snapshotDocumentsPath) @@ -16129,6 +16130,9 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) var rtsLocalDocuments = File.Exists(rtsLocalDocumentsPath) ? File.ReadAllText(rtsLocalDocumentsPath) : throw new InvalidOperationException("Cannot verify daemon projectile authority; Electron local projection is missing."); + var daemonRuntimeDocumentTests = File.Exists(daemonRuntimeDocumentTestsPath) + ? File.ReadAllText(daemonRuntimeDocumentTestsPath) + : throw new InvalidOperationException("Cannot verify daemon projectile authority; daemon runtime document tests are missing."); var authoritySmoke = File.Exists(authoritySmokePath) ? File.ReadAllText(authoritySmokePath) : throw new InvalidOperationException("Cannot verify daemon transport vocabulary; authority smoke harness is missing."); @@ -16306,6 +16310,21 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) string.Join(", ", sharedRuntimeAuthorityHits)); } + var staleRuntimeSpecificAssetSources = new Dictionary + { + ["Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts"] = rtsLocalDocuments, + ["Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs"] = daemonRuntimeDocumentTests + } + .Where(pair => pair.Value.Contains("aetheria.asset.sprite.rts.", StringComparison.Ordinal)) + .Select(pair => pair.Key) + .ToArray(); + if (staleRuntimeSpecificAssetSources.Length > 0) + { + throw new InvalidOperationException( + "Aetheria projectile and map assets must use daemon/shared game asset keys, not runtime-branded sprite keys: " + + string.Join(", ", staleRuntimeSpecificAssetSources)); + } + if (daemonTickRunner.Contains("AetheriaRuntimeDaemonFrameStore.PublishFrame", StringComparison.Ordinal)) { throw new InvalidOperationException( diff --git a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs index 26d613ab1..e6c04447f 100644 --- a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs +++ b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs @@ -1959,7 +1959,7 @@ public class DaemonRuntimeDocumentTests Assert.AreEqual(zone.Projectiles.Count, zoneRender.Projectiles.Count); Assert.IsTrue(objectsViewport.Objects.Any(obj => obj.Kind == "projectile" && - obj.IconAsset.AssetKey == "aetheria.asset.sprite.rts.projectile")); + obj.IconAsset.AssetKey == "aetheria.asset.sprite.game.projectile")); } [Test]