Bill_Production_AquacultureBasin class.
Inheritance: Bill_Production
Example #1
0
        public void RequestTailteethBreeding()
        {
            RemoveAllBills();
            Bill_Production_AquacultureBasin bill = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyTailteethEggsRecipeDef);

            bill.repeatMode  = BillRepeatModeDefOf.RepeatCount;
            bill.repeatCount = 1;
            this.billStack.AddBill(bill);
            bool eggIsFound = false;

            foreach (Thing meat in this.Map.listerThings.ThingsOfDef(Util_FishIndustry.TailteethMeatDef))
            {
                if (meat.IsInAnyStorage())
                {
                    eggIsFound = true;
                    break;
                }
            }
            if (eggIsFound)
            {
                Messages.Message("FishIndustry.BreedingRequestedTailteeth".Translate(), this, MessageTypeDefOf.SilentInput);
            }
            else
            {
                Messages.Message("FishIndustry.BreedingRequestedButNoEggsTailteeth".Translate(), this, MessageTypeDefOf.NeutralEvent);
            }
        }
        /// <summary>
        /// Reset the aquaculture bills if the user has messed with it (cancelled a bill for example).
        /// We need  to set custom Bill_Production_AquacultureBasin to call the StartNewBreedCycle function upon bill completion.
        /// </summary>
        public void  ResetBillsIfNecessary()
        {
            if (this.billStack.Count != 3)
            {
                this.billStack.Clear();
                Bill_Production_AquacultureBasin bill1 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyMashgonEggsRecipeDef);
                bill1.repeatMode  = BillRepeatMode.RepeatCount;
                bill1.repeatCount = 0;
                this.billStack.AddBill(bill1);

                Bill_Production_AquacultureBasin bill2 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyBluebladeEggsRecipeDef);
                bill2.repeatMode  = BillRepeatMode.RepeatCount;
                bill2.repeatCount = 0;
                this.billStack.AddBill(bill2);

                Bill_Production_AquacultureBasin bill3 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyTailteethEggsRecipeDef);
                bill3.repeatMode  = BillRepeatMode.RepeatCount;
                bill3.repeatCount = 0;
                this.billStack.AddBill(bill3);
            }
        }
        /// <summary>
        /// Reset the aquaculture bills if the user has messed with it (cancelled a bill for example).
        /// We need  to set custom Bill_Production_AquacultureBasin to call the StartNewBreedCycle function upon bill completion.
        /// </summary>
        public void  ResetBillsIfNecessary()
        {
            if (this.billStack.Count != 3)
            {
                this.billStack.Clear();
                Bill_Production_AquacultureBasin bill1 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyMashgonEggsRecipeDef);
                bill1.repeatMode = BillRepeatMode.RepeatCount;
                bill1.repeatCount = 0;
                this.billStack.AddBill(bill1);

                Bill_Production_AquacultureBasin bill2 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyBluebladeEggsRecipeDef);
                bill2.repeatMode = BillRepeatMode.RepeatCount;
                bill2.repeatCount = 0;
                this.billStack.AddBill(bill2);

                Bill_Production_AquacultureBasin bill3 = new Bill_Production_AquacultureBasin(Util_FishIndustry.SupplyTailteethEggsRecipeDef);
                bill3.repeatMode = BillRepeatMode.RepeatCount;
                bill3.repeatCount = 0;
                this.billStack.AddBill(bill3);
            }
        }