Cleanup: Pass in `IComponentFactory in EntityPrototype.TryGetComponent calls inside MaterialStorageSystem` (#35458)
* Cleanup * Update
This commit is contained in:
@@ -69,7 +69,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
|
|||||||
|
|
||||||
if (material.StackEntity != null)
|
if (material.StackEntity != null)
|
||||||
{
|
{
|
||||||
if (!_prototypeManager.Index<EntityPrototype>(material.StackEntity).TryGetComponent<PhysicalCompositionComponent>(out var composition))
|
if (!_prototypeManager.Index<EntityPrototype>(material.StackEntity).TryGetComponent<PhysicalCompositionComponent>(out var composition, EntityManager.ComponentFactory))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var volumePerSheet = composition.MaterialComposition.FirstOrDefault(kvp => kvp.Key == msg.Material).Value;
|
var volumePerSheet = composition.MaterialComposition.FirstOrDefault(kvp => kvp.Key == msg.Material).Value;
|
||||||
@@ -169,7 +169,7 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
|
|||||||
return new List<EntityUid>();
|
return new List<EntityUid>();
|
||||||
|
|
||||||
var entProto = _prototypeManager.Index<EntityPrototype>(materialProto.StackEntity);
|
var entProto = _prototypeManager.Index<EntityPrototype>(materialProto.StackEntity);
|
||||||
if (!entProto.TryGetComponent<PhysicalCompositionComponent>(out var composition))
|
if (!entProto.TryGetComponent<PhysicalCompositionComponent>(out var composition, EntityManager.ComponentFactory))
|
||||||
return new List<EntityUid>();
|
return new List<EntityUid>();
|
||||||
|
|
||||||
var materialPerStack = composition.MaterialComposition[materialProto.ID];
|
var materialPerStack = composition.MaterialComposition[materialProto.ID];
|
||||||
|
|||||||
Reference in New Issue
Block a user