Skip to content

Commit

Permalink
Config option to disable the flux modifier battery restriction in cas…
Browse files Browse the repository at this point in the history
…e ti's needed somewhere. (Looking at you there, HQM Maps.)
  • Loading branch information
bonii-xx committed Oct 25, 2014
1 parent 735360f commit f027de5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/modifiers/tools/ModFlux.java
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.library.tools.ToolCore;
import tconstruct.util.config.PHConstruct;

/* TE3 support */

Expand Down Expand Up @@ -49,7 +50,7 @@ public boolean matches (ItemStack[] input, ItemStack tool)
int maxEnergy = ((IEnergyContainerItem) foundBattery.getItem()).getMaxEnergyStored(foundBattery);

// battery too big for our tool?
if(tags.getInteger("TotalDurability") < maxEnergy/1000) // durability needs to be at least 1/1000th of the charge
if(PHConstruct.balancedFluxModifier && tags.getInteger("TotalDurability") < maxEnergy/1000) // durability needs to be at least 1/1000th of the charge
return false;

// check if we already have a flux modifier
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/util/config/PHConstruct.java
Expand Up @@ -44,6 +44,7 @@ public static void initProps (File location)
keepLevels = config.get("Difficulty Changes", "Keep levels on death", true).getBoolean(true);
beginnerBook = config.get("Difficulty Changes", "Spawn beginner book", true).getBoolean(true);
deathPenality = config.get("Difficulty Changes", "Tools lose 10% durability on death", true).getBoolean(true);
balancedFluxModifier = config.get("Difficulty Changes", "Balanced Flux Modifier", true).getBoolean(true);

enableTWood = config.get("Difficulty Changes", "Enable mod wooden tools", true).getBoolean(true);
enableTStone = config.get("Difficulty Changes", "Enable mod stone tools", true).getBoolean(true);
Expand Down Expand Up @@ -290,6 +291,7 @@ public static void initProps (File location)
public static boolean deathPenality;
public static boolean alphaRegen;
public static boolean alphaHunger;
public static boolean balancedFluxModifier;

public static boolean disableWoodTools;
public static boolean disableStoneTools;
Expand Down

0 comments on commit f027de5

Please sign in to comment.