fix Gatherable magic number (#31327)

Update GatherableSystem.cs
This commit is contained in:
Ed
2024-08-23 05:03:05 +03:00
committed by GitHub
parent a825418ad0
commit 171ace931a

View 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);
}
}
}
}