From 615d5480216705947daff778974efbb6aa88be7d Mon Sep 17 00:00:00 2001 From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:38:40 +0300 Subject: [PATCH] Cleanup: Pass in ``IComponentFactory`` in ``EntityPrototype.TryGetComponent`` calls inside ``MaterialStorageSystem`` (#35458) * Cleanup * Update --- Content.Server/Materials/MaterialStorageSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Materials/MaterialStorageSystem.cs b/Content.Server/Materials/MaterialStorageSystem.cs index 9f43a22049..8c50d5fe9a 100644 --- a/Content.Server/Materials/MaterialStorageSystem.cs +++ b/Content.Server/Materials/MaterialStorageSystem.cs @@ -69,7 +69,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem if (material.StackEntity != null) { - if (!_prototypeManager.Index(material.StackEntity).TryGetComponent(out var composition)) + if (!_prototypeManager.Index(material.StackEntity).TryGetComponent(out var composition, EntityManager.ComponentFactory)) return; var volumePerSheet = composition.MaterialComposition.FirstOrDefault(kvp => kvp.Key == msg.Material).Value; @@ -169,7 +169,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem return new List(); var entProto = _prototypeManager.Index(materialProto.StackEntity); - if (!entProto.TryGetComponent(out var composition)) + if (!entProto.TryGetComponent(out var composition, EntityManager.ComponentFactory)) return new List(); var materialPerStack = composition.MaterialComposition[materialProto.ID]; -- 2.51.2