diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-09-09 22:04:09 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-09-09 22:04:09 +1000 |
commit | aa22ec0e5fd495c942689cd5862e88fea66b74a2 (patch) | |
tree | 06aea596f466c61b57149d4b74051e5d4c8eb84b /src/Java/gtPlusPlus | |
parent | 6aafa5e038bb61d05ee915452a9aa7ae95b55029 (diff) | |
download | GT5-Unofficial-aa22ec0e5fd495c942689cd5862e88fea66b74a2.tar.gz GT5-Unofficial-aa22ec0e5fd495c942689cd5862e88fea66b74a2.tar.bz2 GT5-Unofficial-aa22ec0e5fd495c942689cd5862e88fea66b74a2.zip |
+ Added update checker config option.
$ Fixed pollution related content loading when GT .08 is loaded.
Diffstat (limited to 'src/Java/gtPlusPlus')
5 files changed, 36 insertions, 26 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 6479a1d447..bfa264085c 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -58,6 +58,9 @@ public class GTplusplus implements ActionListener { new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); config.load(); + CORE.configSwitches.enableUpdateChecker = config.getBoolean("enableUpdateChecker", "debug", true, + "Stops mod checking for updates."); + // Debug DEBUG = config.getBoolean("debugMode", "debug", false, "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)"); @@ -158,7 +161,7 @@ public class GTplusplus implements ActionListener { "gregtech", true, "Large scale sifting."); CORE.configSwitches.enableMachine_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler", "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources."); - + // Options RF2EU_Battery.rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000, "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)"); @@ -176,8 +179,8 @@ public class GTplusplus implements ActionListener { "BlacklistedTileEntiyClassNames", "gregtech", BlacklistedTileEntiyClassNames, "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator"); - - + + config.save(); } @@ -196,20 +199,22 @@ public class GTplusplus implements ActionListener { @Mod.EventHandler public void preInit(final FMLPreInitializationEvent event) { Utils.LOG_INFO("Loading " + CORE.name + " V" + CORE.VERSION); - + if(!Utils.isServer()){ CORE.mEnableCape = true; } - + //HTTP Requests CORE.MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase(); CORE.USER_COUNTRY = GeoUtils.determineUsersCountry(); - + // Handle GT++ Config handleConfigFile(event); - + CORE.DEVENV = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); - Utils.LOG_INFO("Latest is " + CORE.MASTER_VERSION + ". Updated? " + Utils.isModUpToDate()); + if (CORE.configSwitches.enableUpdateChecker){ + Utils.LOG_INFO("Latest is " + CORE.MASTER_VERSION + ". Updated? " + Utils.isModUpToDate()); + } Utils.LOG_INFO("User's Country: " + CORE.USER_COUNTRY); // FirstCall(); @@ -220,11 +225,11 @@ public class GTplusplus implements ActionListener { /*try { CustomGTMaterials.run(); } catch (Throwable t){}*/ - + if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ removeCircuitRecipeMap(); //Bye shitty recipes. } - + // HANDLER_GT.mMaterialProperties = new GT_Config(new Configuration(new // File(new File(event.getModConfigurationDirectory(), "GTplusplus"), // "MaterialProperties.cfg"))); @@ -258,7 +263,7 @@ public class GTplusplus implements ActionListener { this.dumpGtRecipeMap(Gregtech_Recipe_Map.sMatterFab2Recipes); this.dumpGtRecipeMap(Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes); } - + /*for (Materials s : gtPlusPlus.core.material.gregtech.CustomGTMaterials.Custom_GT_Materials){ Utils.LOG_INFO("Verification for New Material: "+s.mName); }*/ diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java index 464b825177..eac8757b0e 100644 --- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java @@ -39,16 +39,18 @@ public class LoginEventHandler { if (!this.localPlayerRef.worldObj.isRemote){ PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); - if (!Utils.isModUpToDate()){ - Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating."); - if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) { - Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION); + if (CORE.configSwitches.enableUpdateChecker){ + if (!Utils.isModUpToDate()){ + Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating."); + if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) { + Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION); + } + Utils.LOG_INFO("You currently have: "+CORE.VERSION); + ShortTimer(this.localPlayerRef, 20); + } + else { + Utils.LOG_INFO("You're using the latest recommended version of GT++."); } - Utils.LOG_INFO("You currently have: "+CORE.VERSION); - ShortTimer(this.localPlayerRef, 20); - } - else { - Utils.LOG_INFO("You're using the latest recommended version of GT++."); } } @@ -100,7 +102,7 @@ public class LoginEventHandler { } } - + //Handles notifying the player about a version update. public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) { Timer timer; @@ -108,7 +110,7 @@ public class LoginEventHandler { timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000); return timer; } - + //Timer Task for notifying the player. class NotifyPlayer extends TimerTask { final EntityPlayer toMessage; diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index a45db02fe6..37f9894e05 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -95,6 +95,9 @@ public class CORE { public static class configSwitches { + //Updates + public static boolean enableUpdateChecker = true; + //Debug public static boolean disableEnderIOIntegration = false; public static boolean MACHINE_INFO = true; diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index bd6f2833cc..dc4791ca0f 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -779,7 +779,7 @@ public class RECIPES_Machines { GregtechItemList.SimpleDustWasher.get(1)); } - if (CORE.configSwitches.enableMachine_Pollution){ + if (CORE.configSwitches.enableMachine_Pollution && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ RecipeUtils.addShapedGregtechRecipe( "plateCarbon", "plateCarbon", "plateCarbon", "dustCarbon", "dustCarbon", "dustCarbon", diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java index 7bbef48891..ee1164d0f9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java @@ -47,16 +47,16 @@ public class GTPP_CapeRenderer tResource = this.mCapes[1]; } else if (aPlayer.getDisplayName().equalsIgnoreCase("doomsquirter")) { - tResource = this.mCapes[0]; + tResource = this.mCapes[1]; } else if (aPlayer.getDisplayName().equalsIgnoreCase("ukdunc")) { - tResource = this.mCapes[0]; + tResource = this.mCapes[1]; } else if (aPlayer.getDisplayName().equalsIgnoreCase("cantankerousrex")) { tResource = this.mCapes[1]; } else if (aPlayer.getDisplayName().equalsIgnoreCase("123_456_789")) { - tResource = this.mCapes[0]; + tResource = this.mCapes[1]; } else if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) { tResource = this.mCapes[0]; |