Exemple #1
0
        public void CheckPlantGrowth()
        {
            List<FarmSoil> removeSoil = new List<FarmSoil>();
            List<FarmSoil> bloomSoil = new List<FarmSoil>();

            foreach (Item i in World.Items.Values)
            {
                if (i is FarmSoil)
                {
                    FarmSoil cropSoil = i as FarmSoil;

                    cropSoil.WaterHueCheck();

                    if (!cropSoil.FullGrown && cropSoil.Occupied && (cropSoil.Bloomed <= DateTime.Now))
                    {
                        if (cropSoil.PlantType != null)
                        {
                            bloomSoil.Add(cropSoil);
                        }
                    }
                    else if (cropSoil.FullGrown)
                    {
                        if (DateTime.Now > cropSoil.PlantDeathCheck)
                        {
                            removeSoil.Add(cropSoil);
                        }
                    }
                }
            }

            for (int i = bloomSoil.Count - 1; i > -1; i--)
            {
                FarmSoil cropSoil = bloomSoil[i];
                Type parent = cropSoil.PlantType;
                #region Blooming Plant & Moving It To the Soil
                if (parent == typeof(AlmondTree))
                {
                    AlmondTree newCrop = new AlmondTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(AppleTree))
                {
                    AppleTree newCrop = new AppleTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(ApricotTree))
                {
                    ApricotTree newCrop = new ApricotTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(AsparagusCrop))
                {
                    AsparagusCrop newCrop = new AsparagusCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(AvocadoTree))
                {
                    AvocadoTree newCrop = new AvocadoTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BananaTree))
                {
                    BananaTree newCrop = new BananaTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BarleyCrop))
                {
                    BarleyCrop newCrop = new BarleyCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BeetCrop))
                {
                    BeetCrop newCrop = new BeetCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BitterHopsCrop))
                {
                    BitterHopsCrop newCrop = new BitterHopsCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BlackberryTree))
                {
                    BlackberryTree newCrop = new BlackberryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BlackRaspberryTree))
                {
                    BlackRaspberryTree newCrop = new BlackRaspberryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BlueberryTree))
                {
                    BlueberryTree newCrop = new BlueberryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(BroccoliCrop))
                {
                    BroccoliCrop newCrop = new BroccoliCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CabbageCrop))
                {
                    CabbageCrop newCrop = new CabbageCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CantaloupeCrop))
                {
                    CantaloupeCrop newCrop = new CantaloupeCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CarrotCrop))
                {
                    CarrotCrop newCrop = new CarrotCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CauliflowerCrop))
                {
                    CauliflowerCrop newCrop = new CauliflowerCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CeleryCrop))
                {
                    CeleryCrop newCrop = new CeleryCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CherryTree))
                {
                    CherryTree newCrop = new CherryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(ChiliPepperCrop))
                {
                    ChiliPepperCrop newCrop = new ChiliPepperCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CocoaTree))
                {
                    CocoaTree newCrop = new CocoaTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CoconutPalm))
                {
                    CoconutPalm newCrop = new CoconutPalm();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CoffeeCrop))
                {
                    CoffeeCrop newCrop = new CoffeeCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CornCrop))
                {
                    CornCrop newCrop = new CornCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CottonCrop))
                {
                    CottonCrop newCrop = new CottonCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CranberryTree))
                {
                    CranberryTree newCrop = new CranberryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(CucumberCrop))
                {
                    CucumberCrop newCrop = new CucumberCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(DatePalm))
                {
                    DatePalm newCrop = new DatePalm();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(EggplantCrop))
                {
                    EggplantCrop newCrop = new EggplantCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(FieldCornCrop))
                {
                    FieldCornCrop newCrop = new FieldCornCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(FlaxCrop))
                {
                    FlaxCrop newCrop = new FlaxCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GarlicCrop))
                {
                    GarlicCrop newCrop = new GarlicCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GingerCrop))
                {
                    GingerCrop newCrop = new GingerCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GinsengCrop))
                {
                    GinsengCrop newCrop = new GinsengCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GrapefruitTree))
                {
                    GrapefruitTree newCrop = new GrapefruitTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GreenBeanCrop))
                {
                    GreenBeanCrop newCrop = new GreenBeanCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GreenPepperCrop))
                {
                    GreenPepperCrop newCrop = new GreenPepperCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(GreenSquashCrop))
                {
                    GreenSquashCrop newCrop = new GreenSquashCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(HayCrop))
                {
                    HayCrop newCrop = new HayCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(HoneydewMelonCrop))
                {
                    HoneydewMelonCrop newCrop = new HoneydewMelonCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(KiwiCrop))
                {
                    KiwiCrop newCrop = new KiwiCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(LemonTree))
                {
                    LemonTree newCrop = new LemonTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(LettuceCrop))
                {
                    LettuceCrop newCrop = new LettuceCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(LimeTree))
                {
                    LimeTree newCrop = new LimeTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(MaltCrop))
                {
                    MaltCrop newCrop = new MaltCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(MandrakeCrop))
                {
                    MandrakeCrop newCrop = new MandrakeCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(MangoTree))
                {
                    MangoTree newCrop = new MangoTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(NightshadeCrop))
                {
                    NightshadeCrop newCrop = new NightshadeCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(OatsCrop))
                {
                    OatsCrop newCrop = new OatsCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(OnionCrop))
                {
                    OnionCrop newCrop = new OnionCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(OrangePepperCrop))
                {
                    OrangePepperCrop newCrop = new OrangePepperCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(OrangeTree))
                {
                    OrangeTree newCrop = new OrangeTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PeachTree))
                {
                    PeachTree newCrop = new PeachTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PeanutCrop))
                {
                    PeanutCrop newCrop = new PeanutCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PearTree))
                {
                    PearTree newCrop = new PearTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PeasCrop))
                {
                    PeasCrop newCrop = new PeasCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PineappleTree))
                {
                    PineappleTree newCrop = new PineappleTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PistacioTree))
                {
                    PistacioTree newCrop = new PistacioTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PomegranateTree))
                {
                    PomegranateTree newCrop = new PomegranateTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PotatoCrop))
                {
                    PotatoCrop newCrop = new PotatoCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(PumpkinCrop))
                {
                    PumpkinCrop newCrop = new PumpkinCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(RadishCrop))
                {
                    RadishCrop newCrop = new RadishCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(RedPepperCrop))
                {
                    RedPepperCrop newCrop = new RedPepperCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(RedRaspberryTree))
                {
                    RedRaspberryTree newCrop = new RedRaspberryTree(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(RiceCrop))
                {
                    RiceCrop newCrop = new RiceCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SnowHopsCrop))
                {
                    SnowHopsCrop newCrop = new SnowHopsCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SnowPeasCrop))
                {
                    SnowPeasCrop newCrop = new SnowPeasCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SoyCrop))
                {
                    SoyCrop newCrop = new SoyCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SpinachCrop))
                {
                    SpinachCrop newCrop = new SpinachCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SquashCrop))
                {
                    SquashCrop newCrop = new SquashCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(StrawberryCrop))
                {
                    StrawberryCrop newCrop = new StrawberryCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SugarCrop))
                {
                    SugarCrop newCrop = new SugarCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SunFlowerCrop))
                {
                    SunFlowerCrop newCrop = new SunFlowerCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SweetHopsCrop))
                {
                    SweetHopsCrop newCrop = new SweetHopsCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(SweetPotatoCrop))
                {
                    SweetPotatoCrop newCrop = new SweetPotatoCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(TeaCrop))
                {
                    TeaCrop newCrop = new TeaCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(TomatoCrop))
                {
                    TomatoCrop newCrop = new TomatoCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(TurnipCrop))
                {
                    TurnipCrop newCrop = new TurnipCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(WatermelonCrop))
                {
                    WatermelonCrop newCrop = new WatermelonCrop(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(WheatCrop))
                {
                    WheatCrop newCrop = new WheatCrop(cropSoil.Owner);
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                }
                else if (parent == typeof(QatPlant))
                {
                    QatPlant newCrop = new QatPlant();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(PoppyPlant))
                {
                    PoppyPlant newCrop = new PoppyPlant();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(SwampweedPlant))
                {
                    SwampweedPlant newCrop = new SwampweedPlant();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(TobaccoPlant))
                {
                    TobaccoPlant newCrop = new TobaccoPlant();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Pusantia))
                {
                    Pusantia newCrop = new Pusantia();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(WillowBark))
                {
                    WillowBark newCrop = new WillowBark();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(WolfLichen))
                {
                    WolfLichen newCrop = new WolfLichen();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Yarrow))
                {
                    Yarrow newCrop = new Yarrow();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(AlpineSorrel))
                {
                    AlpineSorrel newCrop = new AlpineSorrel();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(MyrrhaTree))
                {
                    MyrrhaTree newCrop = new MyrrhaTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(DesertSage))
                {
                    DesertSage newCrop = new DesertSage();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Chia))
                {
                    Chia newCrop = new Chia();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Cliffrose))
                {
                    Cliffrose newCrop = new Cliffrose();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Datura))
                {
                    Datura newCrop = new Datura();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Dogbane))
                {
                    Dogbane newCrop = new Dogbane();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Agrimony))
                {
                    Agrimony newCrop = new Agrimony();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Echinacea))
                {
                    Echinacea newCrop = new Echinacea();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Goldenseal))
                {
                    Goldenseal newCrop = new Goldenseal();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Mullein))
                {
                    Mullein newCrop = new Mullein();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(SkullcapMushroom))
                {
                    SkullcapMushroom newCrop = new SkullcapMushroom();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Hyssop))
                {
                    Hyssop newCrop = new Hyssop();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(SphagnumMoss))
                {
                    SphagnumMoss newCrop = new SphagnumMoss();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(MarshMallow))
                {
                    MarshMallow newCrop = new MarshMallow();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(GingkoTree))
                {
                    GingkoTree newCrop = new GingkoTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Ginger))
                {
                    Ginger newCrop = new Ginger();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(PinonTree))
                {
                    PinonTree newCrop = new PinonTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(CopalTree))
                {
                    CopalTree newCrop = new CopalTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(SacraTree))
                {
                    SacraTree newCrop = new SacraTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(JuniperBush))
                {
                    JuniperBush newCrop = new JuniperBush();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(RedValerian))
                {
                    RedValerian newCrop = new RedValerian();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Belladonna))
                {
                    Belladonna newCrop = new Belladonna();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Comfrey))
                {
                    Comfrey newCrop = new Comfrey();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Purslane))
                {
                    Purslane newCrop = new Purslane();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Aloe))
                {
                    Aloe newCrop = new Aloe();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Cinchona))
                {
                    Cinchona newCrop = new Cinchona();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Lousewort))
                {
                    Lousewort newCrop = new Lousewort();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(BlueLily))
                {
                    BlueLily newCrop = new BlueLily();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(CatsClaw))
                {
                    CatsClaw newCrop = new CatsClaw();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Damiana))
                {
                    Damiana newCrop = new Damiana();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Foxglove))
                {
                    Foxglove newCrop = new Foxglove();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Wormwood))
                {
                    Wormwood newCrop = new Wormwood();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(Passionflower))
                {
                    Passionflower newCrop = new Passionflower();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(ChaulmoograTree))
                {
                    ChaulmoograTree newCrop = new ChaulmoograTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else if (parent == typeof(CamphorTree))
                {
                    CamphorTree newCrop = new CamphorTree();
                    newCrop.MoveToWorld(cropSoil.Location, cropSoil.Map);
                    cropSoil.Plant = newCrop;
                    (cropSoil.Plant as BasePlant).Planted = true;
                    (cropSoil.Plant as BasePlant).Soil = cropSoil;
                }
                else
                    removeSoil.Add(cropSoil);

                //editing the planted soil
                if (cropSoil != null && !cropSoil.Deleted && !removeSoil.Contains(cropSoil))
                {
                    cropSoil.PlantType = parent;
                    cropSoil.FullGrown = true;
                }
                #endregion
            }

            for (int i = removeSoil.Count - 1; i > -1; i--)
            {
                removeSoil[i].Delete();
            }
        }