Пример #1
0
        public override void Tick()
        {
            base.Tick();
            if (this.OptionMorning)
            {
                if (Rand.RangeInclusive(6, 10) == GenLocalDate.HourInt(this.Map))
                {
                    if (!HeldSermon)
                    {
                        //        Log.Message("starting morning sermon");
                        SermonUtility.ForceSermon(this);
                        this.HeldSermon = true;
                    }
                }
            }

            if (this.OptionEvening)
            {
                if (Rand.RangeInclusive(18, 22) == GenLocalDate.HourInt(this.Map))
                {
                    if (!HeldSermon)
                    {
                        SermonUtility.ForceSermon(this);
                        this.HeldSermon = true;
                    }
                }
            }

            if (GenLocalDate.HourInt(this.Map) == 1 || GenLocalDate.HourInt(this.Map) == 12)
            {
                this.HeldSermon = false;
            }
        }