Generalized material spawning (#12489)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user