]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix Gatherable magic number (#31327)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Fri, 23 Aug 2024 02:03:05 +0000 (05:03 +0300)
committerGitHub <noreply@github.com>
Fri, 23 Aug 2024 02:03:05 +0000 (22:03 -0400)
Update GatherableSystem.cs

Content.Server/Gatherable/GatherableSystem.cs

index d6a3be451b6aa30078ac6fb128ade60242ce4567..b939b098cbbe63d5c0dbf8df02574f50165f0aee 100644 (file)
@@ -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);
+            }
         }
     }
 }