update mantle, autogenerate the configs for pulsar modules

This commit is contained in:
progwml6 committed 2014-07-02 21:10:56 -04:00
1 parent 7ecd97ad8f
commit a5d7260c1f
6 files changed
+8 -38

No files matched your search

+3 -9
View File
@@ -3,6 +3,7 @@ package tconstruct;
import java.util.Random;
import mantle.lib.TabTools;
import mantle.pulsar.config.ForgeCFG;
import mantle.pulsar.control.PulseManager;
import mantle.pulsar.pulse.IPulse;
import net.minecraft.world.gen.structure.MapGenStructureIO;
@@ -80,7 +81,7 @@ public class TConstruct
public static TProxyCommon proxy;
/* Loads modules in a way that doesn't clutter the @Mod list */
private PulseManager pulsar = new PulseManager(modID);
private PulseManager pulsar = new PulseManager(modID, new ForgeCFG("TinkersModules", "Modules: Disabling these will disable a chunk of the mod"));
public TConstruct()
{
@@ -102,19 +103,12 @@ public class TConstruct
{
PHConstruct.initProps(event.getModConfigurationDirectory());
if (PHConstruct.worldModule)
pulsar.registerPulse(new TinkerWorld());
if (PHConstruct.toolModule)
pulsar.registerPulse(new TinkerTools());
if (PHConstruct.smelteryModule)
pulsar.registerPulse(new TinkerSmeltery());
if (PHConstruct.mechworksModule)
pulsar.registerPulse(new TinkerMechworks());
if (PHConstruct.armorModule)
pulsar.registerPulse(new TinkerArmor());
/*if (PHConstruct.prayerModule)
pulsar.registerPulse(new TinkerPrayers());
if (PHConstruct.cropifyModule)
/*pulsar.registerPulse(new TinkerPrayers());
pulsar.registerPulse(new TinkerCropify());*/
TConstructRegistry.materialTab = new TabTools("TConstructMaterials");
@@ -84,7 +84,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(TConstruct.modID)
@Pulse(id = "Tinker's Smeltery", description = "Liquid metals, casting, and the multiblock structure.")
@Pulse(id = "Tinkers' Smeltery", description = "Liquid metals, casting, and the multiblock structure.")
public class TinkerSmeltery
{
@PulseProxy(clientSide = "tconstruct.smeltery.SmelteryProxyClient", serverSide = "tconstruct.smeltery.SmelteryProxyCommon")
@@ -105,7 +105,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(TConstruct.modID)
@Pulse(id = "Tinker's Tools", description = "The main core of the mod! All of the tools, the tables, and the patterns are here.")
@Pulse(id = "Tinkers' Tools", description = "The main core of the mod! All of the tools, the tables, and the patterns are here.")
public class TinkerTools
{
/* Proxies for sides, used for graphics processing */
@@ -15,30 +15,6 @@ public class PHConstruct
public static void initProps (File location)
{
/* Before we do anything, let's set up which modules can and cannot load. */
File modules = new File(location + "/TinkersModules.cfg");
/* Some basic debugging will go a long way */
try
{
modules.createNewFile();
}
catch (IOException e)
{
TConstruct.logger.warn("Could not create module configuration file for TConstruct. Reason:");
TConstruct.logger.warn(e.getLocalizedMessage());
}
Configuration config = new Configuration(modules);
config.load();
worldModule = config.get("Modules: Disabling these will disable a chunk of the mod", "World", true, "Ores, slime islands, essence berries, and the like.").getBoolean(true);
toolModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Tools", true, "The main core of the mod! All of the tools, the tables, and the patterns are here.")
.getBoolean(true);
smelteryModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Liquid metals, casting, and the multiblock structure.").getBoolean(true);
mechworksModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Smeltery", true, "Mechanical machinations and steampunk inspired shenanigans.").getBoolean(true);
armorModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Armor", true, "Modifyable armors, such as the traveller's gear.").getBoolean(true);
prayerModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Prayers", true, "Area of effect and time delayed status changes. Scrolltastic!").getBoolean(true);
cropifyModule = config.get("Modules: Disabling these will disable a chunk of the mod", "Cropify", true, "Tinkering with the world never felt this bushy.").getBoolean(true);
config.save();
/* Here we will set up the config file for the mod
* First: Create a folder inside the config folder
@@ -64,7 +40,7 @@ public class PHConstruct
TConstruct.logger.warn(e.getLocalizedMessage());
}
config = new Configuration(mainFile);
Configuration config = new Configuration(mainFile);
//config.load(); /* Load happens in the constructor */
superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false);
@@ -89,7 +89,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(TConstruct.modID)
@Pulse(id = "Tinker's World", description = "Ores, slime islands, essence berries, and the like.")
@Pulse(id = "Tinkers' World", description = "Ores, slime islands, essence berries, and the like.")
public class TinkerWorld
{
@Instance("TinkerWorld")