public void ReadTopicalPassage( Topic topic )
		{
			m_Preaching = true;
			Say( "A Word from the Lord concerning {0}:", TopicReader.GetTopicName( topic ) );
			m_Timer = new RecitalTimer( this, BibleReader.GetRandomTopicVerses( topic ) );
			m_Timer.Start();
			m_NextPreach = DateTime.Now + PreachDelay;
		}
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			
			switch( version )
			{
				case 1: { m_Topic = (Topic)reader.ReadInt(); goto case 0; }
				case 0: {
					m_Book = (BookOf)reader.ReadInt();
					m_Chapter = reader.ReadInt();
					m_FirstVerse = reader.ReadInt();
					m_LastVerse = reader.ReadInt();
					m_Random = reader.ReadBool();
					
					m_NextPreach = DateTime.Now + PreachDelay;
					m_Preaching = false;
					break;
				}
			}
			
		}
 public virtual void SetEventTopic(string key, Topic topic)
 {
     // Don't call AddEvent since that's virtual
     AddEventCore(key);
 }
Exemple #4
0
		public static string[] GetRandomTopicVerses( Topic topic )
		{
			int y = 0;
			string[] output;
			int[] verses = TopicReader.RandomTopicVerse( topic );
			try
			{
				output = new string[(verses[3] - verses[2]) + 1];
				for ( int x = verses[2]; x <= verses[3]; x++ ) output[y++] = GetVerse( verses[0], verses[1], x );
				return output;
			}
			catch { output = new string[] { "No verses found with that reference." }; return output; }
		}
 public virtual bool AddEvent(string key, Topic topic)
 {
     return AddEventCore(key);
 }
Exemple #6
0
		public static string GetTopicName( Topic topic )
		{
			return m_TopicNames[(int)topic];
		}
Exemple #7
0
		public static int[] RandomTopicVerse( Topic topic )
		{
			int[] verse = new int[4];
			int[,] verses = m_Topics[(int)topic];
			int length = verses.GetLength( 0 );
			int pick = Utility.Random( length );
			for ( int x = 0; x < 4; x++ ) verse[x] = verses[pick,x];
			return verse;
		}
Exemple #8
0
		public static int[,] GetTopicVerses( Topic topic )
		{
			return m_Topics[(int)topic];
		}
Exemple #9
0
		public static int[] GetTopicVerse( Topic topic, int pick )
		{
			int[] verse = new int[4];
			for ( int x = 0; x < 4; x++ ) verse[x] = GetTopicVerses( topic )[pick,x];
			return verse;
		}