From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Fri, 23 Aug 2024 02:03:05 +0000 (+0300) Subject: fix Gatherable magic number (#31327) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=171ace931a485a3414e69af3ff40531b58ea29ec;p=space-station-14.git fix Gatherable magic number (#31327) Update GatherableSystem.cs --- diff --git a/Content.Server/Gatherable/GatherableSystem.cs b/Content.Server/Gatherable/GatherableSystem.cs index d6a3be451b..b939b098cb 100644 --- a/Content.Server/Gatherable/GatherableSystem.cs +++ b/Content.Server/Gatherable/GatherableSystem.cs @@ -78,8 +78,11 @@ public sealed partial class GatherableSystem : EntitySystem } var getLoot = _proto.Index(table); var spawnLoot = getLoot.GetSpawns(_random); - var spawnPos = pos.Offset(_random.NextVector2(component.GatherOffset)); - Spawn(spawnLoot[0], spawnPos); + foreach (var loot in spawnLoot) + { + var spawnPos = pos.Offset(_random.NextVector2(component.GatherOffset)); + Spawn(loot, spawnPos); + } } } }