SpawnMultiple cleanup in stacksystem (#13441)

This commit is contained in:
Nemanja
2023-01-11 17:03:18 -05:00
committed by GitHub
parent ec606ec41b
commit c2fd5665af
5 changed files with 59 additions and 80 deletions

View File

@@ -200,7 +200,7 @@ public sealed partial class StoreSystem : EntitySystem
{
var cashId = proto.Cash[value];
var amountToSpawn = (int) MathF.Floor((float) (amountRemaining / value));
var ents = _stack.SpawnMultipleFromMaterial(amountToSpawn, cashId, coordinates);
var ents = _stack.SpawnMultiple(cashId, amountToSpawn, coordinates);
_hands.PickupOrDrop(buyer, ents.First());
amountRemaining -= value * amountToSpawn;
}