expedition rewards (#16972)

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
deltanedas
2023-06-16 05:19:02 +00:00
committed by GitHub
parent f7e4a69b65
commit b9f24b2681
19 changed files with 845 additions and 1582 deletions

View File

@@ -68,7 +68,16 @@ public sealed class CargoGiftsRule : StationEventSystem<CargoGiftsRuleComponent>
var (productId, qty) = component.Gifts.First();
component.Gifts.Remove(productId);
if (!_cargoSystem.AddAndApproveOrder(cargoDb, productId, qty, Loc.GetString(component.Sender), Loc.GetString(component.Description), Loc.GetString(component.Dest)))
var product = _prototypeManager.Index<CargoProductPrototype>(productId);
if (!_cargoSystem.AddAndApproveOrder(
cargoDb,
product.Product,
product.PointCost,
qty,
Loc.GetString(component.Sender),
Loc.GetString(component.Description),
Loc.GetString(component.Dest)))
{
break;
}