Exemplo n.º 1
0
 private double CalcShrineApproval(MapComponent_AncestorTicker ancestorDriver)
 {
     if (ancestorDriver.CurrentSpawner == null)
     {
         if (this.previousShrineStatus != ShrineStatus.none)
         {
             this.previousShrineStatus = ShrineStatus.none;
             // TODO: Not hardcoded strings!
             Find.LetterStack.ReceiveLetter("No Shrines!", "Your Ancestors are displeased that you have no " +
                                            "shrines! You will lose approval with them until you build a shrine.", LetterType.BadNonUrgent);
         }
         return(NoShrinesLossPerInterval);
     }
     else if (ancestorDriver.NumSpawners > 1)
     {
         if (this.previousShrineStatus != ShrineStatus.many)
         {
             this.previousShrineStatus = ShrineStatus.many;
             // TODO: Not hardcoded strings!
             Find.LetterStack.ReceiveLetter("Too many Shrines!", "Your Ancestors are displeased that you have " +
                                            "too many shrines! You should have one shrine, and one shrine only! You will lose approval with " +
                                            "them until you demolish the extras.", LetterType.BadNonUrgent);
         }
         return(ManyShrinesLossPerInterval);
     }
     else
     {
         this.previousShrineStatus = ShrineStatus.one;
         return(0);
     }
 }
Exemplo n.º 2
0
        public void ApprovalTrackerTickInterval(MapComponent_AncestorTicker ancestorDriver)
        {
            double approvalDelta = 0;

            if (Find.TickManager.TicksGame > ShrineLossDelayTicks)
            {
                approvalDelta += this.CalcShrineApproval(ancestorDriver);
            }

            this.UpdateHistory(approvalDelta);
        }