public override void OnAfterSpawn() { base.OnAfterSpawn(); Name = (this.Female ? "a mare": "a stallion"); m_MotherBreed = (HorseBreed)Utility.Random(6); m_FatherBreed = (HorseBreed)Utility.Random(6); if (Utility.RandomBool()) { DetermineBreed(m_MotherBreed); } else { DetermineBreed(m_FatherBreed); } TypeName = "a horse"; }
public virtual void DetermineBreed(HorseBreed cb) { if (m_MotherBreed == m_FatherBreed) { this.Title = "[" + m_MotherBreed + "]"; } else { this.Title = "[Mixed]"; } if (cb == HorseBreed.Andalusian) { Body = 204; Hue = Utility.RandomList(1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863); //raw sienna } else if (cb == HorseBreed.Arabian) { Body = 226; Hue = Utility.RandomList(2308, 2309, 2310, 2311, 2312); //raw umber } else if (cb == HorseBreed.Appaloosa) { Body = 200; Hue = Utility.RandomList(2313, 2314, 2315, 2316, 2317, 2318); //burnt sienna } else if (cb == HorseBreed.Haflinger) { Body = 228; Hue = Utility.RandomList(1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890); //bland brown } else if (cb == HorseBreed.Thoroughbred) { Body = 200; Hue = Utility.RandomList(2500, 2301, 2302, 2303, 2304, 2305, 2306); //grays } else if (cb == HorseBreed.Hackney) { Body = 226; Hue = Utility.RandomList(1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908); //gray blue } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_FoalFatherBreed = (HorseBreed)reader.ReadInt(); m_MotherBreed = (HorseBreed)reader.ReadInt(); m_FatherBreed = (HorseBreed)reader.ReadInt(); goto case 0; } case 0: { break; } } }