diff options
author | chochem <40274384+chochem@users.noreply.github.com> | 2023-06-15 18:40:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 19:40:54 +0200 |
commit | 03d5284b6bfd866554f315a192e75cd7586b86f2 (patch) | |
tree | f05c8b6abc9b5544ede14ff0821b6726cb71419a /src/main/java/com | |
parent | d0da64f4bd8ef61065e9795f58d0e149875ffc9c (diff) | |
download | GT5-Unofficial-03d5284b6bfd866554f315a192e75cd7586b86f2.tar.gz GT5-Unofficial-03d5284b6bfd866554f315a192e75cd7586b86f2.tar.bz2 GT5-Unofficial-03d5284b6bfd866554f315a192e75cd7586b86f2.zip |
Ebf Noble Gas Overhaul (#336)
* try with og and arg
* adjust all
* work relative to starting gas
Former-commit-id: d5747ce95acc53fda473deabfa69158aa9b34140
Diffstat (limited to 'src/main/java/com')
2 files changed, 23 insertions, 8 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java index d392dd452f..dc68b5e33a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java @@ -86,6 +86,11 @@ public class StaticRecipeChangeLoaders { gtEbfGasRecipeTimeMultipliers = new TObjectDoubleHashMap<>(10, 0.5F, -1.0D); // keep default value as -1 // Example to make Argon cut recipe times into a third of the original: // gtEbfGasRecipeTimeMultipliers.put(Materials.Argon, 1.0D / 3.0D); + + gtEbfGasRecipeTimeMultipliers.put(Materials.Nitrogen, 1.0D); + gtEbfGasRecipeTimeMultipliers.put(Materials.Helium, 0.9D); + gtEbfGasRecipeTimeMultipliers.put(Materials.Argon, 0.8D); + gtEbfGasRecipeTimeMultipliers.put(Materials.Radon, 0.7D); } if (gtEbfGasRecipeConsumptionMultipliers == null) { // For Werkstoff gases, use Werkstoff.Stats.setEbfGasRecipeConsumedAmountMultiplier @@ -94,6 +99,10 @@ public class StaticRecipeChangeLoaders { // Example to make Argon recipes use half the gas amount of the primary recipe (1000L->500L, 2000L->1000L // etc.): // gtEbfGasRecipeConsumptionMultipliers.put(Materials.Argon, 1.0D / 2.0D); + gtEbfGasRecipeConsumptionMultipliers.put(Materials.Nitrogen, 1.0D); + gtEbfGasRecipeConsumptionMultipliers.put(Materials.Helium, 1.0D); + gtEbfGasRecipeConsumptionMultipliers.put(Materials.Argon, 0.85D); + gtEbfGasRecipeConsumptionMultipliers.put(Materials.Radon, 0.7D); } ArrayListMultimap<SubTag, GT_Recipe> toChange = getRecipesToChange(NOBLE_GAS, ANAEROBE_GAS); editRecipes(toChange, getNoGasItems(toChange)); @@ -399,22 +408,24 @@ public class StaticRecipeChangeLoaders { private static int transformEBFGasRecipeTime(GT_Recipe recipe, Materials originalGas, Materials newGas) { double newEbfMul = gtEbfGasRecipeTimeMultipliers.get(newGas); - if (newEbfMul < 0.0D) { + double originalEbfMul = gtEbfGasRecipeTimeMultipliers.get(originalGas); + if (newEbfMul < 0.0D || originalEbfMul < 0.0D) { return transformEBFGasRecipeTime(recipe.mDuration, originalGas.getProtons(), newGas.getProtons()); } else { - return Math.max(1, (int) ((double) recipe.mDuration * newEbfMul)); + return Math.max(1, (int) ((double) recipe.mDuration * newEbfMul / originalEbfMul)); } } private static int transformEBFGasRecipeTime(GT_Recipe recipe, Materials originalGas, Werkstoff newGas) { double newEbfMul = newGas.getStats().getEbfGasRecipeTimeMultiplier(); - if (newEbfMul < 0.0D) { + double originalEbfMul = gtEbfGasRecipeTimeMultipliers.get(originalGas); + if (newEbfMul < 0.0D || originalEbfMul < 0.0D) { return transformEBFGasRecipeTime( recipe.mDuration, originalGas.getProtons(), newGas.getStats().getProtons()); } else { - return Math.max(1, (int) ((double) recipe.mDuration * newEbfMul)); + return Math.max(1, (int) ((double) recipe.mDuration * newEbfMul / originalEbfMul)); } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index 6a6d849947..23c0331b9a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -631,7 +631,8 @@ public class WerkstoffLoader { new short[] { 0x14, 0x39, 0x7F, 0 }, "Xenon", "Xe", - new Werkstoff.Stats().setProtons(54).setMass(131).setGas(true), + new Werkstoff.Stats().setProtons(54).setMass(131).setGas(true).setEbfGasRecipeTimeMultiplier(0.4d) + .setEbfGasRecipeConsumedAmountMultiplier(0.25d), Werkstoff.Types.ELEMENT, new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(), 37, @@ -643,7 +644,8 @@ public class WerkstoffLoader { new short[] { 0x14, 0x39, 0x7F, 0 }, "Oganesson", "Og", - new Werkstoff.Stats().setProtons(118).setMass(294).setGas(true), + new Werkstoff.Stats().setProtons(118).setMass(294).setGas(true).setEbfGasRecipeTimeMultiplier(0.3d) + .setEbfGasRecipeConsumedAmountMultiplier(0.1d), Werkstoff.Types.ELEMENT, new Werkstoff.GenerationFeatures().disable().addCells(), 38, @@ -679,7 +681,8 @@ public class WerkstoffLoader { new short[] { 0xff, 0x07, 0x3a }, "Neon", "Ne", - new Werkstoff.Stats().setProtons(Element.Ne.mProtons).setMass(Element.Ne.getMass()).setGas(true), + new Werkstoff.Stats().setProtons(Element.Ne.mProtons).setMass(Element.Ne.getMass()).setGas(true) + .setEbfGasRecipeTimeMultiplier(0.6d).setEbfGasRecipeConsumedAmountMultiplier(0.55d), Werkstoff.Types.ELEMENT, new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(), 41, @@ -691,7 +694,8 @@ public class WerkstoffLoader { new short[] { 0xb1, 0xff, 0x32 }, "Krypton", "Kr", - new Werkstoff.Stats().setProtons(Element.Kr.mProtons).setMass(Element.Kr.getMass()).setGas(true), + new Werkstoff.Stats().setProtons(Element.Kr.mProtons).setMass(Element.Kr.getMass()).setGas(true) + .setEbfGasRecipeTimeMultiplier(0.5d).setEbfGasRecipeConsumedAmountMultiplier(0.4d), Werkstoff.Types.ELEMENT, new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(), 42, |