public static Seed RandomBonsaiSeed(double increaseRatio) { return(new Seed(PlantTypeInfo.RandomBonsai(increaseRatio), PlantHue.Plain, false)); }
public Seed() : this(PlantTypeInfo.RandomFirstGeneration(), PlantHueInfo.RandomFirstGeneration(), false) { }
private void DrawPlant() { PlantStatus status = m_Plant.PlantStatus; if (status < PlantStatus.FullGrownPlant) { AddImage(110, 85, 0x589); AddItem(122, 94, 0x914); AddItem(135, 94, 0x914); AddItem(120, 112, 0x914); AddItem(135, 112, 0x914); if (status >= PlantStatus.Stage2) { AddItem(127, 112, 0xC62); } if (status == PlantStatus.Stage3 || status == PlantStatus.Stage4) { AddItem(129, 85, 0xC7E); } if (status >= PlantStatus.Stage4) { AddItem(121, 117, 0xC62); AddItem(133, 117, 0xC62); } if (status >= PlantStatus.Stage5) { AddItem(110, 100, 0xC62); AddItem(140, 100, 0xC62); AddItem(110, 130, 0xC62); AddItem(140, 130, 0xC62); } if (status >= PlantStatus.Stage6) { AddItem(105, 115, 0xC62); AddItem(145, 115, 0xC62); AddItem(125, 90, 0xC62); AddItem(125, 135, 0xC62); } } else { PlantTypeInfo typeInfo = PlantTypeInfo.GetInfo(m_Plant.PlantType); PlantHueInfo hueInfo = PlantHueInfo.GetInfo(m_Plant.PlantHue); // The large images for these trees trigger a client crash, so use a smaller, generic tree. if (m_Plant.PlantType == PlantType.CypressTwisted || m_Plant.PlantType == PlantType.CypressStraight) { AddItem(130 + typeInfo.OffsetX, 96 + typeInfo.OffsetY, 0x0CCA, hueInfo.Hue); } else { AddItem(130 + typeInfo.OffsetX, 96 + typeInfo.OffsetY, typeInfo.ItemID, hueInfo.Hue); } } if (status != PlantStatus.BowlOfDirt) { int message = m_Plant.PlantSystem.GetLocalizedHealth(); switch (m_Plant.PlantSystem.Health) { case PlantHealth.Dying: { AddItem(92, 167, 0x1B9D); AddItem(161, 167, 0x1B9D); AddHtmlLocalized(136, 167, 42, 20, message, 0x00FC00, false, false); break; } case PlantHealth.Wilted: { AddItem(91, 164, 0x18E6); AddItem(161, 164, 0x18E6); AddHtmlLocalized(132, 167, 42, 20, message, 0x00C207, false, false); break; } case PlantHealth.Healthy: { AddItem(96, 168, 0xC61); AddItem(162, 168, 0xC61); AddHtmlLocalized(129, 167, 42, 20, message, 0x008200, false, false); break; } case PlantHealth.Vibrant: { AddItem(93, 162, 0x1A99); AddItem(162, 162, 0x1A99); AddHtmlLocalized(129, 167, 42, 20, message, 0x0083E0, false, false); break; } } } }