bool Process(object[] Params) { if (CargoQueue.Any()) { CurrentCargoAction = CargoQueue.Last(); CargoQueue.RemoveLast(); } else { CurrentCargoAction = null; return(true); } Move.Bookmark(CurrentCargoAction.Bookmark); QueueState(Traveling); QueueState(WarpFleetMember); QueueState(Traveling); QueueState(CurrentCargoAction.Action); if (CurrentCargoAction.Compress) { QueueState(Stack); QueueState(Compress); } QueueState(Stack); QueueState(Process); return(true); }
/// <summary> /// Specify the location to perform the cargo operation /// </summary> /// <param name="Bookmark">Bookmark object for the location to perform the cargo operation</param> /// <param name="Source">InventoryContainer to use for the operation (load source for Load, unload destination for Unload) Default: Station Item Hangar</param> /// <param name="ContainerName">Name of the entity to use for the operation (for entities with inventory containers in space)</param> /// <returns></returns> public Cargo At(Bookmark Bookmark, Func <InventoryContainer> Source = null, string ContainerName = "") { BuildCargoAction = new CargoAction(null, Bookmark, Source ?? (() => Station.ItemHangar), ContainerName, null, 0, null); return(this); }