private void CalculateAndRecacheTransferables() { this.transferables = new List <TransferableOneWay>(); this.AddPawnsToTransferables(); this.AddItemsToTransferables(); this.AddContentsToTransferables(); IEnumerable <TransferableOneWay> enumerable = null; string text = null; string destinationLabel = null; string text2 = "FormCaravanColonyThingCountTip".Translate(); bool flag = true; IgnorePawnsInventoryMode ignorePawnInventoryMass = IgnorePawnsInventoryMode.IgnoreIfAssignedToUnload; bool flag2 = true; Func <float> availableMassGetter = () => this.MassCapacity - this.MassUsage; int tile = this.map.Tile; this.pawnsTransfer = new TransferableOneWayWidget(enumerable, text, destinationLabel, text2, flag, ignorePawnInventoryMass, flag2, availableMassGetter, 0f, false, tile, true, true, true, false, true, false, false); CaravanUIUtility.AddPawnsSections(this.pawnsTransfer, this.transferables); enumerable = from x in this.transferables where x.ThingDef.category != ThingCategory.Pawn select x; text2 = null; destinationLabel = null; text = "FormCaravanColonyThingCountTip".Translate(); flag2 = true; ignorePawnInventoryMass = IgnorePawnsInventoryMode.IgnoreIfAssignedToUnload; flag = true; availableMassGetter = (() => this.MassCapacity - this.MassUsage); tile = this.map.Tile; this.itemsTransfer = new TransferableOneWayWidget(enumerable, text2, destinationLabel, text, flag2, ignorePawnInventoryMass, flag, availableMassGetter, 0f, false, tile, true, false, false, true, false, true, false); this.CountToTransferChanged(); }
private void CalculateAndRecacheTransferables() { this.transferables = new List <TransferableOneWay>(); this.AddItemsToTransferables(); IEnumerable <TransferableOneWay> enumerable = null; string text = null; string text2 = null; string text3 = "FormCaravanColonyThingCountTip".Translate(); bool flag = true; IgnorePawnsInventoryMode ignorePawnsInventoryMode = (IgnorePawnsInventoryMode)1; bool flag2 = true; Func <float> func = () => this.MassCapacity - this.MassUsage; int tile = this.map.Tile; this.pawnsTransfer = new TransferableOneWayWidget(enumerable, text, text2, text3, flag, ignorePawnsInventoryMode, flag2, func, 0f, false, tile, true, true, true, false, true, false, false); CaravanUIUtility.AddPawnsSections(this.pawnsTransfer, this.transferables); enumerable = from x in this.transferables where x.ThingDef.category != ThingCategory.Pawn select x; text3 = null; text2 = null; text = "FormCaravanColonyThingCountTip".Translate(); flag2 = true; ignorePawnsInventoryMode = (IgnorePawnsInventoryMode)1; flag = true; func = (() => this.MassCapacity - this.MassUsage); tile = this.map.Tile; this.itemsTransfer = new TransferableOneWayWidget(enumerable, text3, text2, text, flag2, ignorePawnsInventoryMode, flag, func, 0f, false, tile, true, false, false, true, false, true, false); this.CountToTransferChanged(); }
private void CalculateAndRecacheTransferables() { this.transferables = new List <TransferableOneWay>(); this.AddPawnsToTransferables(); this.AddItemsToTransferables(); this.pawnsTransfer = new TransferableOneWayWidget(null, Faction.OfPlayer.Name, this.TransportersLabelShort, "FormCaravanColonyThingCountTip".Translate(), true, false, true, () => this.MassCapacity - this.MassUsage, 24f, false, true); CaravanUIUtility.AddPawnsSections(this.pawnsTransfer, this.transferables); this.itemsTransfer = new TransferableOneWayWidget(from x in this.transferables where x.ThingDef.category != ThingCategory.Pawn select x, Faction.OfPlayer.Name, this.TransportersLabelShort, "FormCaravanColonyThingCountTip".Translate(), true, false, true, () => this.MassCapacity - this.MassUsage, 24f, false, true); this.CountToTransferChanged(); }
private void CalculateAndRecacheTransferables() { transferables = new List <TransferableOneWay>(); AddPawnsToTransferables(); AddItemsToTransferables(); pawnsTransfer = new TransferableOneWayWidget(null, Faction.OfPlayer.Name, TransportersLabelCap, "FormCaravanColonyThingCountTip".Translate(), true, IgnorePawnsInventoryMode.IgnoreIfAssignedToUnload, true, () => MassCapacity - MassUsage, 24f, false, map.Tile, true); CaravanUIUtility.AddPawnsSections(pawnsTransfer, transferables); itemsTransfer = new TransferableOneWayWidget(from x in transferables where x.ThingDef.category != ThingCategory.Pawn select x, Faction.OfPlayer.Name, TransportersLabelCap, "FormCaravanColonyThingCountTip".Translate(), true, IgnorePawnsInventoryMode.IgnoreIfAssignedToUnload, true, () => MassCapacity - MassUsage, 24f, false, map.Tile, true); CountToTransferChanged(); }