From 171ace931a485a3414e69af3ff40531b58ea29ec Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Fri, 23 Aug 2024 05:03:05 +0300 Subject: [PATCH] fix Gatherable magic number (#31327) Update GatherableSystem.cs --- Content.Server/Gatherable/GatherableSystem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); + } } } } -- 2.51.2