// If scrap list need to be populated, do it private static void BeforeSetupQueue_AddVehicleToScrap(GeoscapeViewContext ____context, ItemStorage ____scrapStorage) { try { if (!NeedToAddVehicles) { return; } LoadVehicleDefs(); GeoPhoenixFaction faction = ____context.ViewerFaction as GeoPhoenixFaction; foreach (GeoVehicle v in faction.Vehicles) { Verbo("Add {0} to item list", v.Name); ____scrapStorage.AddItem(new GeoPlaneWrapper(v)); } NeedToAddVehicles = false; } catch (Exception ex) { Error(ex); } }
public IActionResult AddItem(Item item) { return(Ok(_itemStorage.AddItem(item))); }