Made ordering multiple crates at cargo order multiple crates (#25518)
* please tell me this is empty * it wasn't empty, fixing that * This should fix it * fix for the fix * address changes * fix * Added some comments, hoping that failed test was a fluke.
This commit is contained in:
@@ -209,15 +209,19 @@ namespace Content.Server.Cargo.Systems
|
||||
_random.Shuffle(tradePads);
|
||||
|
||||
var freePads = GetFreeCargoPallets(trade, tradePads);
|
||||
|
||||
foreach (var pad in freePads)
|
||||
if (freePads.Count >= order.OrderQuantity) //check if the station has enough free pallets
|
||||
{
|
||||
var coordinates = new EntityCoordinates(trade, pad.Transform.LocalPosition);
|
||||
|
||||
if (FulfillOrder(order, coordinates, orderDatabase.PrinterOutput))
|
||||
foreach (var pad in freePads)
|
||||
{
|
||||
tradeDestination = trade;
|
||||
break;
|
||||
var coordinates = new EntityCoordinates(trade, pad.Transform.LocalPosition);
|
||||
|
||||
if (FulfillOrder(order, coordinates, orderDatabase.PrinterOutput))
|
||||
{
|
||||
tradeDestination = trade;
|
||||
order.NumDispatched++;
|
||||
if (order.OrderQuantity <= order.NumDispatched) //Spawn a crate on free pellets until the order is fulfilled.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user