public virtual void DetermineBreed(PigBreed pb) { if (m_MotherBreed == m_FatherBreed) { this.Title = "[" + m_MotherBreed + "]"; } else { this.Title = "[Mixed]"; } if (pb == PigBreed.Duroc) { Body = 0x122; Hue = 250; } else if (pb == PigBreed.Iberian) { Hue = 2306; } else if (pb == PigBreed.Tamworth) { Hue = 1710; } else if (pb == PigBreed.White) { Hue = 0; } else if (pb == PigBreed.Feral) { Hue = 2312; } }
public override void OnAfterSpawn() { base.OnAfterSpawn(); Female = true; m_MotherBreed = (PigBreed)(int)Utility.Random(4); m_FatherBreed = (PigBreed)(int)Utility.Random(4); if (Utility.RandomBool()) { DetermineBreed(m_MotherBreed); } else { DetermineBreed(m_FatherBreed); } //HueMod = ((Hue == 0)? ((Body == 216) ? 1141: 1109): 0);//test TypeName = "a pig"; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_MotherBreed = (PigBreed)reader.ReadInt(); m_FatherBreed = (PigBreed)reader.ReadInt(); goto case 0; } case 0: { break; } } }