Old chemical recipes are now enabled by default, marked as deprecated

This commit is contained in:
Johannes Gäßler 2017-08-19 10:43:07 +02:00
parent 54437dc8f1
commit 1b5047df4f
7 changed files with 37 additions and 9 deletions

View file

@ -260,7 +260,7 @@ public class GT_Mod implements IGT_Mod {
Calendar now = Calendar.getInstance();
gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1);
gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true);
gregtechproxy.mReenableSimplifiedChemicalRecipes = tMainConfig.get("general", "ReenableSimplifiedChemicalRecipes", false).getBoolean(false);
gregtechproxy.mDisableOldChemicalRecipes = tMainConfig.get("general", "DisableOldChemicalRecipes", false).getBoolean(false);
gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", false).getBoolean(false);
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);

View file

@ -662,4 +662,17 @@ public interface IGT_RecipeAdder {
* @return true if the Sound got added, otherwise false.
*/
public boolean addSonictronSound(ItemStack aItemStack, String aSoundName);
/**
* Returns whether the recipes added are currently being marked as deprecated.
* Currently only affects Chemical Reactor Recipes.
*/
public boolean isAddingDeprecatedRecipes();
/**
* Sets whether the recipes added from this point on should be marked as deprecated or not.
* Currently only affects Chemical Reactor Recipes.
*/
public void setIsAddingDeprecatedRecipes(boolean isAddingDeprecatedRecipes);
}

View file

@ -188,7 +188,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mLowGravProcessing = false;
public boolean mAprilFool = false;
public boolean mCropNeedBlock = true;
public boolean mReenableSimplifiedChemicalRecipes = false;
public boolean mDisableOldChemicalRecipes = false;
public boolean mAMHInteraction = true;
public boolean mForceFreeFace = false;
public boolean mEasierIVPlusCables = false;

View file

@ -23,6 +23,9 @@ import net.minecraftforge.fluids.FluidStack;
public class GT_RecipeAdder
implements IGT_RecipeAdder {
private boolean isAddingDeprecatedRecipes = false;
@Deprecated
public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) {
return false;
@ -134,10 +137,10 @@ public class GT_RecipeAdder
if (aEUtick <= 0) {
return false;
}
GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0);
GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, isAddingDeprecatedRecipes ? -300 : 0);
if (!(aInput1 != null && aInput1.getItem() instanceof GT_IntegratedCircuit_Item && aInput1.getItemDamage() >= 10)
&& !(aInput2 != null && aInput2.getItem() instanceof GT_IntegratedCircuit_Item && aInput2.getItemDamage() >= 10)) {
GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0);
GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, isAddingDeprecatedRecipes ? -300 : 0);
}
return true;
}
@ -1002,4 +1005,12 @@ public class GT_RecipeAdder
}
public boolean isAddingDeprecatedRecipes() {
return isAddingDeprecatedRecipes;
}
public void setIsAddingDeprecatedRecipes(boolean isAddingDeprecatedRecipes) {
this.isAddingDeprecatedRecipes = isAddingDeprecatedRecipes;
}
}

View file

@ -26,12 +26,12 @@ public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegist
if (aMaterial.contains(SubTag.WASHING_MERCURY))
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
if (aMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE))
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mReenableSimplifiedChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 100L : 1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
for (Materials tMaterial : aMaterial.mOreByProducts) {
if (tMaterial.contains(SubTag.WASHING_MERCURY))
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Mercury.getFluid(1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
if (tMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE))
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mReenableSimplifiedChemicalRecipes ? 1000L : 100L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 100L : 1000L), GT_OreDictUnificator.get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), new int[]{10000, 7000, 4000}, 800, 8);
}
}
}

View file

@ -1698,8 +1698,8 @@ if(Loader.isModLoaded("Railcraft")){
addProcess(tCrop, Materials.Beryllium, 100, false);
addRecipesApril2017ChemistryUpdate();
if (GT_Mod.gregtechproxy.mReenableSimplifiedChemicalRecipes) {
addSimplifiedChemicalRecipes();
if (!GT_Mod.gregtechproxy.mDisableOldChemicalRecipes) {
addOldChemicalRecipes();
} else {
GT_Values.RA.addChemicalRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), Materials.SodiumSulfide.getDust(1), 60);
GT_Values.RA.addChemicalRecipe(Materials.HydricSulfide.getCells(1), GT_Values.NI, Materials.Water.getFluid(1000), Materials.DilutedSulfuricAcid.getFluid(750), Materials.Empty.getCells(1), 60);
@ -2991,7 +2991,8 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addChemicalRecipe( Materials.NitrationMixture.getCells(3), GT_Utility.getIntegratedCircuit(11), Materials.Glycerol.getFluid(1000), Materials.Glyceryl.getFluid(1000), Materials.DilutedSulfuricAcid.getCells(3), 180);
}
private void addSimplifiedChemicalRecipes() {
private void addOldChemicalRecipes() {
GT_Values.RA.setIsAddingDeprecatedRecipes(true);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.Oxygen.getGas(2000L), Materials.NitrogenDioxide.getGas(1000L), ItemList.Cell_Empty.get(1L, new Object[0]), 1250);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 2L), ItemList.Circuit_Integrated.getWithDamage(0, 1, new Object[0]), Materials.Nitrogen.getGas(1000L), Materials.NitrogenDioxide.getGas(1000L), ItemList.Cell_Empty.get(2L, new Object[0]), 1250);
@ -3026,6 +3027,7 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addMixerRecipe(Materials.Sodium.getDust(2), Materials.Sulfur.getDust(1), GT_Utility.getIntegratedCircuit(2), null, null, null, Materials.SodiumSulfide.getDust(1), 60, 30);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Nitrogen, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1L), Materials.Water.getFluid(2000L), Materials.Glyceryl.getFluid(4000L), ItemList.Cell_Empty.get(1L, new Object[0]), 2700);
GT_Values.RA.setIsAddingDeprecatedRecipes(false);
}
private void addRecipesMay2017OilRefining() {

View file

@ -225,6 +225,8 @@ public class GT_NEI_DefaultHandler
drawText(10, 123, trans("159","Needs Low Gravity"), -16777216);
} else if (tSpecial == -200 && GT_Mod.gregtechproxy.mEnableCleanroom) {
drawText(10, 123, trans("160","Needs Cleanroom"), -16777216);
} else if (tSpecial == -300) {
drawText(10, 123, trans("161","Deprecated Recipe"), -16777216);
} else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) {
drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216);
}