Beispiel #1
0
        public GridCargo ReadAllCargo()
        {
            var inventoryBlocks = GridBlocksHelper.Get(GTS).GetAllInventoryBlocks();
            var inventories     = inventoryBlocks.SelectMany(t => InventoryHelper.GetInventories(t));

            Items = CargoHelper.GetItemsInInventories(inventories);
            return(this);
        }
Beispiel #2
0
        public void Sort(string groupName)
        {
            var groupBlocks      = GridBlocksHelper.Get(GTS).GetGroupBlocks(groupName);
            var groupInventories = groupBlocks.SelectMany(t => InventoryHelper.GetInventories(t));
            var groupCargo       = CargoHelper.GetItemsInInventories(groupInventories);

            var oresBlocks       = GridBlocksHelper.Get(GTS).GetGroupBlocks(oresGroup);
            var ingotsBlocks     = GridBlocksHelper.Get(GTS).GetGroupBlocks(ingotsGroup);
            var componentsBlocks = GridBlocksHelper.Get(GTS).GetGroupBlocks(componentsGroup);
        }
        public string StringifyGroupContent(string groupName)
        {
            var inventories = GridBlocksHelper.Get(GTS).GetGroupBlocks(groupName).Where(t => t.HasInventory).ToList();

            if (inventories.Count == 0)
            {
                return(string.Format("There are no blocks in group {0} with inventory.", groupName));
            }

            return(StringifyContainerContent(inventories));
        }