Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Pass in IComponentFactory in EntityPrototype.TryGetComponent calls inside MaterialStorageSystem #35458

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Content.Server/Materials/MaterialStorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void OnEjectMessage(EjectMaterialMessage msg, EntitySessionEventArgs arg

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;

var volumePerSheet = composition.MaterialComposition.FirstOrDefault(kvp => kvp.Key == msg.Material).Value;
Expand Down Expand Up @@ -169,7 +169,7 @@ public List<EntityUid> SpawnMultipleFromMaterial(int amount, MaterialPrototype m
return new List<EntityUid>();

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>();

var materialPerStack = composition.MaterialComposition[materialProto.ID];
Expand Down
Loading