Use shared projectile asset key

This commit is contained in:
Meta Vens 2026-07-06 01:12:47 +01:00
commit 56473bee53
3 changed files with 21 additions and 2 deletions

View file

@ -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,

View file

@ -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<string, string>
{
["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(

View file

@ -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]