Skip to content

Commit

Permalink
update mantle, autogenerate the configs for pulsar modules
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jul 3, 2014
1 parent 7ecd97a commit a5d7260
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 38 deletions.
2 changes: 1 addition & 1 deletion build.properties
@@ -1,7 +1,7 @@
minecraft_version=1.7.10
minecraft_version_old=1.7.2
forge_version=10.13.0.1151
mantle_version=155.504b639
mantle_version=161.45beb09
FMP_version=1.1.0.268
CCLIB_version=1.1.0.77
NEI_version=1.0.1
Expand Down
12 changes: 3 additions & 9 deletions src/main/java/tconstruct/TConstruct.java
Expand Up @@ -3,6 +3,7 @@
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;
Expand Down Expand Up @@ -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()
{
Expand All @@ -102,19 +103,12 @@ public void preInit (FMLPreInitializationEvent event)
{
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");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/smeltery/TinkerSmeltery.java
Expand Up @@ -84,7 +84,7 @@
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")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/tools/TinkerTools.java
Expand Up @@ -105,7 +105,7 @@
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 */
Expand Down
26 changes: 1 addition & 25 deletions src/main/java/tconstruct/util/config/PHConstruct.java
Expand Up @@ -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
Expand All @@ -64,7 +40,7 @@ public static void initProps (File location)
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);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/world/TinkerWorld.java
Expand Up @@ -89,7 +89,7 @@
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")
Expand Down

0 comments on commit a5d7260

Please sign in to comment.