Exemplo n.º 1
0
        public static void AddSectionPrefix(TransferableOneWayWidget __instance, string title, IEnumerable <TransferableOneWay> transferables)
        {
            List <TransferableOneWay> tmp = transferables.ToList();

            for (int i = 0; i < tmp.Count; i++)
            {
                Dialog_LoadShipCargo.RemoveExistingTransferable(tmp[i], Find.VisibleMap);
                //tmp[i].AdjustTo(tmp[i].GetMinimum());
            }
        }
Exemplo n.º 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_LoadShipCargo.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);
        }