Made output of solar panels configurable.

This commit is contained in:
CrazyPants committed 2013-10-29 13:34:06 +08:00
1 parent a0f38b5f38
commit b4d01ccbc0
2 files changed
+9 -1

No files matched your search

+7
View File
@@ -40,6 +40,8 @@ public final class Config {
public static boolean useHardRecipes = false;
public static boolean detailedPowerTrackingEnabled = true;
public static double maxPhotovoltaicOutput = 1.0;
public static void load(FMLPreInitializationEvent event) {
configDirectory = new File(event.getModConfigurationDirectory(), "enderio");
@@ -87,6 +89,9 @@ public final class Config {
"If set to false Photovoltaic Cells will not be craftable.")
.getBoolean(photovoltaicCellEnabled);
maxPhotovoltaicOutput = config.get("Settings", "maxPhotovoltaicOutput", maxPhotovoltaicOutput,
"Maximum output in MJ/t of the Photovoltaic Panels.").getDouble(maxPhotovoltaicOutput);
useAlternateBinderRecipe = config.get("Settings", "useAlternateBinderRecipe", false, "Create conduit binder in crafting table instead of furnace")
.getBoolean(useAlternateBinderRecipe);
@@ -110,6 +115,8 @@ public final class Config {
detailedPowerTrackingEnabled = config.get("Settings", "detailedPowerTrackingEnabled", detailedPowerTrackingEnabled,
"Enable per tick sampling on individual power inputs and outputs")
.getBoolean(detailedPowerTrackingEnabled);
}
@@ -14,6 +14,7 @@ import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
import crazypants.enderio.Config;
import crazypants.enderio.power.BasicCapacitor;
import crazypants.enderio.power.IInternalPowerReceptor;
import crazypants.enderio.power.PowerHandlerUtil;
@@ -28,7 +29,7 @@ public class TileEntitySolarPanel extends TileEntity implements IInternalPowerRe
private ListIterator<Receptor> receptorIterator = receptors.listIterator();
private boolean receptorsDirty = true;
private float energyPerTick = 1;
private float energyPerTick = (float) Config.maxPhotovoltaicOutput;;
public TileEntitySolarPanel() {
capacitor = new BasicCapacitor(0, 10000, 10);