From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:14:01 +0000 (-0700) Subject: Fix stacks only recycling one instead of the stack amount (#38433) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=72ea94a2336a6d966a2e832938a3bf790dc3a22b;p=space-station-14.git Fix stacks only recycling one instead of the stack amount (#38433) * fix * Fixes --- diff --git a/Content.Server/Materials/MaterialReclaimerSystem.cs b/Content.Server/Materials/MaterialReclaimerSystem.cs index 60b1a99e31..1e9acbd568 100644 --- a/Content.Server/Materials/MaterialReclaimerSystem.cs +++ b/Content.Server/Materials/MaterialReclaimerSystem.cs @@ -19,6 +19,7 @@ using Content.Shared.Materials; using Content.Shared.Mind; using Content.Shared.Nutrition.EntitySystems; using Content.Shared.Power; +using Content.Shared.Stacks; using Robust.Server.GameObjects; using Robust.Shared.Player; using Robust.Shared.Prototypes; @@ -214,9 +215,12 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem if (!Resolve(item, ref composition, false)) return; + // If more of these checks are needed, use an event instead + var modifier = CompOrNull(item)?.Count ?? 1.0f; + foreach (var (material, amount) in composition.MaterialComposition) { - var outputAmount = (int) (amount * efficiency); + var outputAmount = (int) (amount * efficiency * modifier); _materialStorage.TryChangeMaterialAmount(reclaimer, material, outputAmount, storage); }