MaterialComponent cleanup (#13326)

This commit is contained in:
Leon Friedrich
2023-01-08 11:36:32 +13:00
committed by GitHub
parent 89301629f5
commit 1f5bae751f
12 changed files with 70 additions and 75 deletions

View File

@@ -27,6 +27,9 @@ public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
private void OnDeconstructed(EntityUid uid, MaterialStorageComponent component, MachineDeconstructedEvent args)
{
if (!component.DropOnDeconstruct)
return;
foreach (var (material, amount) in component.Storage)
{
_stackSystem.SpawnMultipleFromMaterial(amount, material, Transform(uid).Coordinates);