diff options
| author | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:13:49 +0100 |
|---|---|---|
| committer | Raven Szewczyk <git@eigenraven.me> | 2024-05-24 19:13:49 +0100 |
| commit | 9b6fc0420059c6b399506cee841290766b72bd53 (patch) | |
| tree | 9a769dda9b37d90d6cdb27e4f8b6b7b2293d5ec1 /gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java | |
| parent | 227856cdae4dae22fca53f2dc027cac476123bd0 (diff) | |
| parent | 75915e9e1fce7a8ee500add139b42e806e9497b5 (diff) | |
| download | GT5-Unofficial-9b6fc0420059c6b399506cee841290766b72bd53.tar.gz GT5-Unofficial-9b6fc0420059c6b399506cee841290766b72bd53.tar.bz2 GT5-Unofficial-9b6fc0420059c6b399506cee841290766b72bd53.zip | |
Merge in GTplusplus with history
git-subtree-dir: gtpp
git-subtree-mainline: 227856cdae4dae22fca53f2dc027cac476123bd0
git-subtree-split: 75915e9e1fce7a8ee500add139b42e806e9497b5
Diffstat (limited to 'gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java')
| -rw-r--r-- | gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java b/gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java new file mode 100644 index 0000000000..890a9020c9 --- /dev/null +++ b/gtpp/src/main/java/gtPlusPlus/plugin/agrichem/AlgaeDefinition.java @@ -0,0 +1,49 @@ +package gtPlusPlus.plugin.agrichem; + +public enum AlgaeDefinition { + + /* + * In general, the productivity of freshwater algae is primarily limited by the availability of the nutrient + * phosphate (PO4-3), while that of marine algae is limited by nitrate (NO3-) or ammonium (NH4+). Some algal + * species, however, may have unusual nutrient requirements, and their productivity may be limited by certain + * micronutrients, such as silica, in the case of diatoms. + */ + + Euglenophyta("Euglenophyta", "Euglenoids", true, false, getRGB(147, 168, 50)), + Chrysophyta("Chrysophyta", "Golden-Brown Algae", true, true, getRGB(186, 146, 0)), + Pyrrophyta("Pyrrophyta", "Fire Algae", true, true, getRGB(250, 118, 2)), + Chlorophyta("Chlorophyta", "Green Algae", true, true, getRGB(99, 181, 62)), + Rhodophyta("Rhodophyta", "Red Algae", false, true, getRGB(153, 5, 22)), + Paeophyta("Paeophyta", "Brown Algae", false, true, getRGB(94, 78, 47)), + Xanthophyta("Xanthophyta", "Yellow-Green Algae", true, false, getRGB(118, 138, 16)); + + public final String mScientificName; + public final String mSimpleName; + public final boolean mSaltWater; + public final boolean mFreshWater; + public final int mColour; + + AlgaeDefinition(String aScientificName, String aSimpleName, boolean aFresh, boolean aSalt, int aColour) { + mScientificName = aScientificName; + mSimpleName = aSimpleName; + mFreshWater = aFresh; + mSaltWater = aSalt; + mColour = aColour; + } + + public static AlgaeDefinition getByIndex(int aIndex) { + return switch (aIndex) { + default -> Euglenophyta; + case 1 -> Chrysophyta; + case 2 -> Pyrrophyta; + case 3 -> Chlorophyta; + case 4 -> Rhodophyta; + case 5 -> Paeophyta; + case 6 -> Xanthophyta; + }; + } + + private static int getRGB(int r, int g, int b) { + return AlgaeUtils.rgbtoHexValue(r, g, b); + } +} |
