public static void AddSectionPrefix(TransferableOneWayWidget __instance, string title, IEnumerable <TransferableOneWay> transferables)
        {
            //Log.Error("4");
            List <TransferableOneWay> tmp = transferables.ToList();

            for (int i = 0; i < tmp.Count; i++)
            {
                Dialog_LoadShip.RemoveExistingTransferable(tmp[i], Find.CurrentMap);
                //tmp[i].AdjustTo(tmp[i].GetMinimum());
            }
        }
Example #2
0
        private bool AssignTransferablesToShip()
        {
            this.ship.compShip.leftToLoad = new List <TransferableOneWay>();
            this.ship.compShip.leftToLoad.Clear();

            //     this.RemoveExistingTransferables();
            for (int i = 0; i < this.transferables.Count; i++)
            {
                Dialog_LoadShip.RemoveExistingTransferable(this.transferables[i], null, this.ship);
                if (this.transferables[i].CountToTransfer > 0)
                {
                    this.ship.compShip.AddToTheToLoadList(this.transferables[i], this.transferables[i].CountToTransfer);
                    //                   TransferableUIUtility.ClearEditBuffer(this.transferables[i]);
                }
            }
            return(true);
        }