fix Gatherable magic number (#31327)

Update GatherableSystem.cs
This commit is contained in:
Ed 2024-08-23 05:03:05 +03:00 committed by deltanedas
parent 3d6b775c6c
commit 248af8f15d
1 changed files with 5 additions and 2 deletions

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