Merge branch 'hide-numbers' of https://github.com/immibis/BuildCraft into 6.3.x

This commit is contained in:
asiekierka 2015-01-18 10:47:50 +01:00
commit 464ac75428
5 changed files with 26 additions and 9 deletions

View file

@ -141,6 +141,8 @@ public class BuildCraftCore extends BuildCraftMod {
public static boolean modifyWorld = false;
public static boolean colorBlindMode = false;
public static boolean dropBrokenBlocks = true; // Set to false to prevent the filler from dropping broken blocks.
public static boolean hidePowerNumbers = false;
public static boolean hideFluidNumbers = false;
public static int itemLifespan = 1200;
public static int updateFactor = 10;
public static long longUpdateFactor = 40;
@ -259,6 +261,14 @@ public class BuildCraftCore extends BuildCraftMod {
Property dropBlock = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "dropBrokenBlocks", true);
dropBlock.comment = "set to false to prevent fillers from dropping blocks.";
dropBrokenBlocks = dropBlock.getBoolean(true);
Property hideRFNumbers = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "hidePowerNumbers", false);
hideRFNumbers.comment = "set to true to not display any RF or RF/t numbers.";
hidePowerNumbers = hideRFNumbers.getBoolean(false);
Property hideMBNumbers = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "hideFluidNumbers", false);
hideMBNumbers.comment = "set to true to not display any mB or mB/t numbers.";
hideFluidNumbers = hideMBNumbers.getBoolean(false);
Property lifespan = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "itemLifespan", itemLifespan);
lifespan.comment = "the lifespan in ticks of items dropped on the ground by pipes and machines, vanilla = 6000, default = 1200";

View file

@ -76,6 +76,7 @@ public abstract class GuiEngine extends GuiBuildCraft {
@Override
protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory);
ledgerManager.add(new EngineLedger((TileEngine) tile));
if(!BuildCraftCore.hidePowerNumbers)
ledgerManager.add(new EngineLedger((TileEngine) tile));
}
}

View file

@ -184,6 +184,7 @@ public class GuiAssemblyTable extends GuiAdvancedInterface {
@Override
protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory);
ledgerManager.add(new LaserTableLedger());
if(!BuildCraftCore.hidePowerNumbers)
ledgerManager.add(new LaserTableLedger());
}
}

View file

@ -81,6 +81,7 @@ public abstract class GuiLaserTable extends GuiBuildCraft {
@Override
protected void initLedgers(IInventory inventory) {
super.initLedgers(inventory);
ledgerManager.add(new LaserTableLedger());
if(!BuildCraftCore.hidePowerNumbers)
ledgerManager.add(new LaserTableLedger());
}
}

View file

@ -17,7 +17,7 @@ import net.minecraft.client.gui.GuiScreen;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.BuildCraftCore;
import buildcraft.core.utils.StringUtils;
@SideOnly(Side.CLIENT)
@ -26,13 +26,17 @@ public final class PipeToolTipManager {
private static final Map<Class<? extends Pipe<?>>, String> toolTips = new HashMap<Class<? extends Pipe<?>>, String>();
static {
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportPower.powerCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d RF/t", pipe.getValue()));
if(!BuildCraftCore.hidePowerNumbers) {
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportPower.powerCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d RF/t", pipe.getValue()));
}
}
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportFluids.fluidCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d mB/t", pipe.getValue()));
}
if(!BuildCraftCore.hideFluidNumbers) {
for (Map.Entry<Class<? extends Pipe<?>>, Integer> pipe : PipeTransportFluids.fluidCapacities.entrySet()) {
PipeToolTipManager.addToolTip(pipe.getKey(), String.format("%d mB/t", pipe.getValue()));
}
}
}
/**