public void Display()
 {
     InformationManager.ShowInquiry(new InquiryData(day.ToString(), "Goods Produced: " + _goodsProduced + "\nSlaves Died: " + _slavesDied + "\nTools Used: " + _toolsUsed, true, true, (_nextDay == null) ? "Close" : "Next", (_previousDay == null) ? "Close" : "Previous", (Action)(() => {
         InformationManager.HideInquiry();
         if (_nextDay != null)
         {
             _nextDay.Display();
         }
     }), (Action)(() => {
         InformationManager.HideInquiry();
         if (_previousDay != null)
         {
             _previousDay.Display();
         }
     })));
 }
示例#2
0
        public void RecordPrePregnantInfo(Hero sexPartner1, Hero sexPartner2)
        {
            if ((double)MBRandom.RandomFloatRanged(0.0f, 1f) > (double)Config.Instance.PregnancyProbability || sexPartner1 == null || sexPartner2 == null || !Config.Instance.EnableLesbianPregnancy && sexPartner1.IsFemale && sexPartner2.IsFemale)
            {
                return;
            }
            Hero key    = (Hero)null;
            Hero father = (Hero)null;

            if (sexPartner1.IsAlive && sexPartner1.IsFemale && (sexPartner1.IsPregnant == false && (double)sexPartner1.Age > (double)Config.Instance.MinAge))
            {
                key    = sexPartner1;
                father = sexPartner2;
            }
            if (sexPartner2.IsAlive && sexPartner2.IsFemale && (sexPartner2.IsPregnant == false && (double)sexPartner2.Age > (double)Config.Instance.MinAge) && (key == null || MBRandom.RandomInt(0, 1) == 0))
            {
                key    = sexPartner2;
                father = sexPartner1;
            }
            if (key == null || father == null)
            {
                return;
            }
            CampaignTime pregnantDate = CampaignTime.DaysFromNow((float)MBRandom.RandomInt(Config.Instance.MinPregnancyDelayDays, Config.Instance.MaxPregnancyDelayDays));

            if (this.m_prePregnancyInfoMap.ContainsKey(key))
            {
                if (this.m_prePregnancyInfoMap[key].m_pregnantDate > pregnantDate)
                {
                    this.m_prePregnancyInfoMap[key].m_father       = father;
                    this.m_prePregnancyInfoMap[key].m_pregnantDate = pregnantDate;
                }
            }
            else
            {
                this.m_prePregnancyInfoMap.Add(key, new PregnancyControlBehavior.PrePregnancyInfo(father, pregnantDate));
            }
            Utillty.DebugDisplayMessage("_recordPrePregnantInfo Success! Mother : " + ((object)key.Name).ToString() + " Father : " + ((object)father.Name).ToString() + " PregnantDate : " + pregnantDate.ToString());
        }
示例#3
0
        public void RecordSexInfo(Hero sexPartner1, Hero sexPartner2)
        {
            if (sexPartner1 == null || sexPartner1.IsDead || (sexPartner2 == null || sexPartner2.IsDead))
            {
                return;
            }
            CampaignTime nextSexEnableDate = CampaignTime.DaysFromNow((float)MBRandom.RandomInt(Config.Instance.MinSexDelayDays, Config.Instance.MaxSexDelayDays));

            if (this.m_dailySexTimeCountMap.ContainsKey(sexPartner1))
            {
                ++this.m_dailySexTimeCountMap[sexPartner1];
            }
            else
            {
                this.m_dailySexTimeCountMap.Add(sexPartner1, 1);
            }
            if (this.m_dailySexTimeCountMap.ContainsKey(sexPartner2))
            {
                ++this.m_dailySexTimeCountMap[sexPartner2];
            }
            else
            {
                this.m_dailySexTimeCountMap.Add(sexPartner2, 1);
            }
            int index = this.m_sexInformationList.FindIndex((Predicate <PregnancyControlBehavior.SexInfo>)(info => info.m_sexPartner1 == sexPartner1 && info.m_sexPartner2 == sexPartner2 || info.m_sexPartner2 == sexPartner1 && info.m_sexPartner1 == sexPartner2));

            if (index >= 0)
            {
                this.m_sexInformationList[index].m_nextSexEnableDate = (this.m_sexInformationList[index].m_nextSexEnableDate >= nextSexEnableDate) ? this.m_sexInformationList[index].m_nextSexEnableDate : nextSexEnableDate;
            }
            else
            {
                this.m_sexInformationList.Add(new PregnancyControlBehavior.SexInfo(sexPartner1, sexPartner2, nextSexEnableDate));
            }
            Utillty.DebugDisplayMessage("_recordSexInfo Success! Partner1 : " + ((object)sexPartner1.Name).ToString() + " Partner2 : " + ((object)sexPartner2.Name).ToString() + " NexSexEnableDate : " + nextSexEnableDate.ToString());
        }