Made the Cleanroom optional.
This disables the Low Grav option if the Cleanroom is disabled.
This commit is contained in:
parent
96b1cb31ce
commit
d1eea59fe7
5 changed files with 28 additions and 4 deletions
|
@ -254,6 +254,7 @@ public class GT_Mod implements IGT_Mod {
|
|||
gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false);
|
||||
gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true);
|
||||
gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid");
|
||||
gregtechproxy.mEnableCleanroom = tMainConfig.get("general", "EnableCleanroom", true).getBoolean(true);
|
||||
gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true);
|
||||
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);
|
||||
|
@ -509,6 +510,11 @@ public class GT_Mod implements IGT_Mod {
|
|||
} catch (Throwable e) {e.printStackTrace(GT_Log.err);}
|
||||
|
||||
new GT_Bees();
|
||||
|
||||
//Disable Low Grav regardless of config if Cleanroom is disabled.
|
||||
if (!gregtechproxy.mEnableCleanroom){
|
||||
gregtechproxy.mLowGravProcessing = false;
|
||||
}
|
||||
|
||||
gregtechproxy.onLoad();
|
||||
if (gregtechproxy.mSortToTheEnd) {
|
||||
|
|
|
@ -200,6 +200,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
public boolean mEnableAllMaterials = false;
|
||||
public boolean mEnableAllComponents = false;
|
||||
public boolean mAddGTRecipesToIC2Machines = true;
|
||||
public boolean mEnableCleanroom = true;
|
||||
public boolean mLowGravProcessing = false;
|
||||
public boolean mAprilFool = false;
|
||||
public boolean mCropNeedBlock = true;
|
||||
|
|
|
@ -631,6 +631,9 @@ public class GT_RecipeAdder
|
|||
if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (!GT_Mod.gregtechproxy.mEnableCleanroom){
|
||||
aCleanroom = false;
|
||||
}
|
||||
GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -100 : 0);
|
||||
return true;
|
||||
}
|
||||
|
@ -659,6 +662,9 @@ public class GT_RecipeAdder
|
|||
if ((aDuration = GregTech_API.sRecipeFile.get("laserengraving", aEngravedItem, aDuration)) <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (!GT_Mod.gregtechproxy.mEnableCleanroom){
|
||||
aCleanroom = false;
|
||||
}
|
||||
GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, aCleanroom ? -200 : 0);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package gregtech.loaders.preload;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import codechicken.nei.api.API;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.*;
|
||||
|
@ -38,6 +39,8 @@ public class GT_Loader_MetaTileEntities implements Runnable {
|
|||
private final static String aTextWireHull = "WMW"; private final static String aTextWireChest = "WTW"; private final static String aTextWireCoil = "WCW"; private final static String aTextMotorWire = "EWE";
|
||||
private final static String aTextWirePump = "WPW";
|
||||
private final static boolean aBoolConst_0 = false;
|
||||
private final static Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems");
|
||||
|
||||
private static void run1() {
|
||||
long bits = GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED;
|
||||
long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED;
|
||||
|
@ -1240,9 +1243,17 @@ public class GT_Loader_MetaTileEntities implements Runnable {
|
|||
GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_DieselEngine.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_EV, 'P', ItemList.Electric_Piston_EV, 'E', ItemList.Electric_Motor_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGt.get(Materials.Titanium)});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Casing_EngineIntake.get(2L, new Object[0]), bitsd, new Object[]{"PhP", "RFR", aTextPlateWrench, 'R', OrePrefixes.pipeMedium.get(Materials.Titanium), 'F', ItemList.Casing_StableTitanium, 'P', OrePrefixes.rotor.get(Materials.Titanium)});
|
||||
|
||||
ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L, new Object[0]), bitsd, new Object[]{"FFF", "RHR", "MCM", 'H', ItemList.Hull_HV, 'F', ItemList.Component_Filter, 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced)});
|
||||
|
||||
ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1));
|
||||
//If Cleanroom is enabled, add a recipe, else hide from NEI.
|
||||
if (GT_Mod.gregtechproxy.mEnableCleanroom){
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L, new Object[0]), bitsd, new Object[]{"FFF", "RHR", "MCM", 'H', ItemList.Hull_HV, 'F', ItemList.Component_Filter, 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced)});
|
||||
}
|
||||
else {
|
||||
if (isNEILoaded){
|
||||
API.hideItem(ItemList.Machine_Multi_Cleanroom.get(1L, new Object[0]));
|
||||
}
|
||||
}
|
||||
|
||||
ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1180, "basicmachine.circuitassembler.tier.01", "Basic Circuit Assembling Machine", 1, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L));
|
||||
ItemList.Machine_MV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1181, "basicmachine.circuitassembler.tier.02", "Advanced Circuit Assembling Machine", 2, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L));
|
||||
ItemList.Machine_HV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1182, "basicmachine.circuitassembler.tier.03", "Advanced Circuit Assembling Machine II", 3, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L));
|
||||
|
|
|
@ -220,7 +220,7 @@ public class GT_NEI_DefaultHandler
|
|||
int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue;
|
||||
if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) {
|
||||
drawText(10, 123, trans("159","Needs Low Gravity"), -16777216);
|
||||
} else if (tSpecial == -200) {
|
||||
} else if (tSpecial == -200 && GT_Mod.gregtechproxy.mEnableCleanroom) {
|
||||
drawText(10, 123, trans("160","Needs Cleanroom"), -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);
|
||||
|
|
Loading…
Reference in a new issue