Generalized material spawning (#12489)

This commit is contained in:
Rane
2023-01-07 13:09:05 -05:00
committed by GitHub
parent f1cb0ca37a
commit fecd60e98a
13 changed files with 177 additions and 60 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.SpawnMultiple(cashId, amountToSpawn, coordinates);
var ents = _stack.SpawnMultipleFromMaterial(amountToSpawn, cashId, coordinates);
_hands.PickupOrDrop(buyer, ents.First());
amountRemaining -= value * amountToSpawn;
}