diff --git a/Game1/Content/BarleyIcon.png b/Game1/Content/BarleyIcon.png new file mode 100644 index 0000000..1c7b5af Binary files /dev/null and b/Game1/Content/BarleyIcon.png differ diff --git a/Game1/Content/Content.mgcb b/Game1/Content/Content.mgcb index c286d3c..2a9708d 100644 --- a/Game1/Content/Content.mgcb +++ b/Game1/Content/Content.mgcb @@ -13,6 +13,18 @@ #---------------------------------- Content ---------------------------------# +#begin BarleyIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:BarleyIcon.png + #begin BerriesIcon.png /importer:TextureImporter /processor:TextureProcessor @@ -37,6 +49,18 @@ /processorParam:TextureFormat=Color /build:CarronIcon.png;CarrotIcon.png +#begin CottonIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:CottonIcon.png + #begin Crop.png /importer:TextureImporter /processor:TextureProcessor @@ -56,6 +80,18 @@ /processorParam:TextureFormat=Compressed /build:Font.spritefont +#begin GroundNutsIcon.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:GroundNutsIcon.png + #begin house.png /importer:TextureImporter /processor:TextureProcessor diff --git a/Game1/Content/CottonIcon.png b/Game1/Content/CottonIcon.png new file mode 100644 index 0000000..eab2fb3 Binary files /dev/null and b/Game1/Content/CottonIcon.png differ diff --git a/Game1/Content/GroundNutsIcon.png b/Game1/Content/GroundNutsIcon.png new file mode 100644 index 0000000..de2cf45 Binary files /dev/null and b/Game1/Content/GroundNutsIcon.png differ diff --git a/Game1/Game1.cs b/Game1/Game1.cs index a1372d0..0fb937c 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -97,12 +97,14 @@ namespace Game1 tile[2] = Content.Load("Plantable"); tile[3] = Content.Load("Crop"); - Crops[0] = Content.Load("CarrotIcon"); - Crops[1] = Content.Load("WheatIcon"); - Crops[2] = Content.Load("BerriesIcon"); + + + Crops[0] = Content.Load("BarleyIcon"); + Crops[1] = Content.Load("CottonIcon"); + Crops[2] = Content.Load("GroundNutsIcon"); Crops[3] = Content.Load("MaizeIcon"); Crops[4] = Content.Load("MilletsIcon"); Crops[5] = Content.Load("SeedOilIcon"); diff --git a/Game1/Sources/Crops/Crops.cs b/Game1/Sources/Crops/Crops.cs index 357864c..9e060c1 100644 --- a/Game1/Sources/Crops/Crops.cs +++ b/Game1/Sources/Crops/Crops.cs @@ -28,7 +28,7 @@ class Crops getProductionRate(); if (Status == 3 && Timer != 1) { - Timer = Timer - 1 * ProductionRate; + Timer = Timer - 1f * ProductionRate; } Size = newSize; UpdateCrop++; @@ -198,33 +198,31 @@ class Crops ProductionRate = 1; if (DataSet != null) { - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Temperature, DataSet.Temparature)); - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Moisture, DataSet.Moisture)); - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Humidity, DataSet.Humidity)); - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Phosphorous, DataSet.Phosphorous)); - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Potassium, DataSet.Potassium)); - ProductionRate = (ProductionRate * compareToDatset(soilProperties.Nitrogen, DataSet.Nitrogen)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Temperature, DataSet.Temparature)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Moisture, DataSet.Moisture)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Humidity, DataSet.Humidity)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Phosphorous, DataSet.Phosphorous)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Potassium, DataSet.Potassium)); + ProductionRate = ProductionRate + (ProductionRate * compareToDatset(soilProperties.Nitrogen, DataSet.Nitrogen)); if (ProductionRate < 0) { ProductionRate = 0; } + ProductionRate = ProductionRate / 20; } } public float compareToDatset(float i, float j) { - if (i > j) + if (i < j) { - return (i / j) * 0.15f; - } - else if (i < j / 2) - { - return (i / j) * 2f; + return (i / j); } else { - return i / j; + return (j / i); } + } diff --git a/Game1/Sources/Crops/SoilProperties.cs b/Game1/Sources/Crops/SoilProperties.cs index bf3e3b7..c8dcffe 100644 --- a/Game1/Sources/Crops/SoilProperties.cs +++ b/Game1/Sources/Crops/SoilProperties.cs @@ -17,9 +17,9 @@ class SoilProperties public float Nitrogen; public float Potassium; public float Phosphorous; - public float NitrogenDegradeRate = 0.001f; - public float PotassiumDegradeRate = 0.001f; - public float PhosphorousDegradeRate = 0.001f; + public float NitrogenDegradeRate = 0.01f; + public float PotassiumDegradeRate = 0.01f; + public float PhosphorousDegradeRate = 0.01f; public void setSoilProperties() {