Added config for automation

This commit is contained in:
Yuriy Shnitkovskiy 2017-05-16 19:49:46 +03:00
parent 4e3ed071dc
commit bc7eaaa762
3 changed files with 7 additions and 4 deletions

View file

@ -239,6 +239,7 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true);
gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true);
gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true);
gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true);
gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true);
gregtechproxy.mImmersiveEngineeringRecipes = tMainConfig.get(aTextGeneral, "EnableImmersiveEngineeringRSupport", true).getBoolean(true);
@ -258,6 +259,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.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", true).getBoolean(true);
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);
GregTech_API.mEUtoRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "100EUtoRF", 360);

View file

@ -99,7 +99,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
@Override
public boolean isValidSlot(int aIndex) {
return mAuto;
return mAuto && GT_Mod.gregtechproxy.mAMHInteraction;
}
@Override
@ -179,7 +179,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
this.mSoftHammer = true;
this.mSolderingTool = true;
this.mWrench = true;
updateSlots()
updateSlots();
return true;
}
return false;
@ -214,11 +214,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
@Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return mAuto;
return mAuto && GT_Mod.gregtechproxy.mAMHInteraction;
}
@Override
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return mAuto;
return mAuto && GT_Mod.gregtechproxy.mAMHInteraction;
}
}

View file

@ -196,6 +196,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 mAMHInteraction = true;
public GT_Proxy() {
GameRegistry.registerFuelHandler(this);