From 27cb97a17c96de8f749198b5e50b6834e5d1cbba Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Wed, 11 Jun 2025 14:15:47 -0400 Subject: [PATCH] Cleanup 2 `SpriteComponent.GetPrototypeTextures` uses (#38263) Cleanup 2 SpriteComponent.GetPrototypeTextures uses --- Content.Client/Mapping/MappingState.cs | 2 +- Content.IntegrationTests/Tests/DummyIconTest.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Client/Mapping/MappingState.cs b/Content.Client/Mapping/MappingState.cs index 57b45036e3..6430f1db1e 100644 --- a/Content.Client/Mapping/MappingState.cs +++ b/Content.Client/Mapping/MappingState.cs @@ -454,7 +454,7 @@ public sealed class MappingState : GameplayStateBase switch (prototype) { case EntityPrototype entity: - textures.AddRange(SpriteComponent.GetPrototypeTextures(entity, _resources).Select(t => t.Default)); + textures.AddRange(_sprite.GetPrototypeTextures(entity).Select(t => t.Default)); break; case DecalPrototype decal: textures.Add(_sprite.Frame0(decal.Sprite)); diff --git a/Content.IntegrationTests/Tests/DummyIconTest.cs b/Content.IntegrationTests/Tests/DummyIconTest.cs index df2d28a2ea..62197bb319 100644 --- a/Content.IntegrationTests/Tests/DummyIconTest.cs +++ b/Content.IntegrationTests/Tests/DummyIconTest.cs @@ -16,6 +16,7 @@ namespace Content.IntegrationTests.Tests var client = pair.Client; var prototypeManager = client.ResolveDependency(); var resourceCache = client.ResolveDependency(); + var spriteSys = client.System(); await client.WaitAssertion(() => { @@ -26,7 +27,7 @@ namespace Content.IntegrationTests.Tests Assert.DoesNotThrow(() => { - var _ = SpriteComponent.GetPrototypeTextures(proto, resourceCache).ToList(); + var _ = spriteSys.GetPrototypeTextures(proto).ToList(); }, "Prototype {0} threw an exception when getting its textures.", proto.ID); }