Added config option to set the base energy usage of the Controller (default is 0)
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
- Fixed not being able to clear exporter row in interface
|
||||
- Fixed interface having weird extraction / insertion rules. It can now take items from any side, or extract items from any side depending on the block that is inserting or extracting the item (like conduits).
|
||||
|
||||
**Features**
|
||||
- Added config option to set the base energy usage of the Controller (default is 0)
|
||||
|
||||
### 0.8.12
|
||||
**Bugfixes**
|
||||
- Fixed dupe bug when shift clicking output slot in grid
|
||||
|
@@ -47,6 +47,7 @@ public final class RefinedStorage {
|
||||
|
||||
public List<ClientStack> items = new ArrayList<ClientStack>();
|
||||
|
||||
public int controllerUsage;
|
||||
public int cableUsage;
|
||||
public int constructorUsage;
|
||||
public int crafterUsage;
|
||||
@@ -69,7 +70,7 @@ public final class RefinedStorage {
|
||||
public int craftingGridUsage;
|
||||
public int patternGridUsage;
|
||||
|
||||
public int controller;
|
||||
public int controllerCapacity;
|
||||
public boolean controllerUsesEnergy;
|
||||
|
||||
public int wirelessTransmitterBaseRange;
|
||||
@@ -86,6 +87,7 @@ public final class RefinedStorage {
|
||||
|
||||
Configuration config = new Configuration(e.getSuggestedConfigurationFile());
|
||||
|
||||
controllerUsage = config.getInt("controller", "energy", 20, 0, Integer.MAX_VALUE, "The base energy used by the Controller");
|
||||
cableUsage = config.getInt("cable", "energy", 0, 0, Integer.MAX_VALUE, "The energy used by Cables");
|
||||
constructorUsage = config.getInt("constructor", "energy", 1, 0, Integer.MAX_VALUE, "The energy used by Constructors");
|
||||
crafterUsage = config.getInt("crafter", "energy", 2, 0, Integer.MAX_VALUE, "The base energy used by Crafters");
|
||||
@@ -108,8 +110,8 @@ public final class RefinedStorage {
|
||||
craftingGridUsage = config.getInt("craftingGrid", "energy", 4, 0, Integer.MAX_VALUE, "The energy used by Crafting Grids");
|
||||
patternGridUsage = config.getInt("patternGrid", "energy", 3, 0, Integer.MAX_VALUE, "The energy used by Pattern Grids");
|
||||
|
||||
controller = config.getInt("controller", "energy", 32000, 0, Integer.MAX_VALUE, "The energy capacity of the controller");
|
||||
controllerUsesEnergy = config.getBoolean("controllerUsesEnergy", "energy", true, "Whether the controller uses RF");
|
||||
controllerCapacity = config.getInt("capacity", "controller", 32000, 0, Integer.MAX_VALUE, "The energy capacity of the Controller");
|
||||
controllerUsesEnergy = config.getBoolean("usesEnergy", "controller", true, "Whether the Controller uses energy");
|
||||
|
||||
wirelessTransmitterBaseRange = config.getInt("range", "wirelessTransmitter", 16, 0, Integer.MAX_VALUE, "The base range of the Wireless Transmitter");
|
||||
wirelessTransmitterRangePerUpgrade = config.getInt("rangePerUpgrade", "wirelessTransmitter", 8, 0, Integer.MAX_VALUE, "The additional range per Range Upgrade in the Wireless Transmitter");
|
||||
|
@@ -53,9 +53,9 @@ public abstract class ContainerBase extends Container {
|
||||
int amount = slot.getStack().stackSize;
|
||||
|
||||
if (clickedButton == 0) {
|
||||
amount = Math.max(1, --amount);
|
||||
amount = Math.max(1, amount - 1);
|
||||
} else if (clickedButton == 1) {
|
||||
amount = Math.min(64, ++amount);
|
||||
amount = Math.min(64, amount + 1);
|
||||
}
|
||||
|
||||
slot.getStack().stackSize = amount;
|
||||
|
@@ -21,7 +21,7 @@ public class ItemBlockController extends ItemBlockBase {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
||||
if (stack.getMetadata() != EnumControllerType.CREATIVE.getId()) {
|
||||
int energyStored = 0;
|
||||
int energyCapacity = RefinedStorage.INSTANCE.controller;
|
||||
int energyCapacity = RefinedStorage.INSTANCE.controllerCapacity;
|
||||
|
||||
if (stack.getTagCompound() != null) {
|
||||
if (stack.getTagCompound().hasKey(TileController.NBT_ENERGY)) {
|
||||
@@ -51,7 +51,7 @@ public class ItemBlockController extends ItemBlockBase {
|
||||
tag = new NBTTagCompound();
|
||||
}
|
||||
|
||||
tag.setInteger(TileController.NBT_ENERGY, stack.getMetadata() == EnumControllerType.CREATIVE.getId() ? RefinedStorage.INSTANCE.controller : 0);
|
||||
tag.setInteger(TileController.NBT_ENERGY, stack.getMetadata() == EnumControllerType.CREATIVE.getId() ? RefinedStorage.INSTANCE.controllerCapacity : 0);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
@@ -102,7 +102,7 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
||||
private List<ICraftingTask> craftingTasksToAdd = new ArrayList<ICraftingTask>();
|
||||
private List<ICraftingTask> craftingTasksToCancel = new ArrayList<ICraftingTask>();
|
||||
|
||||
private EnergyStorage energy = new EnergyStorage(RefinedStorage.INSTANCE.controller);
|
||||
private EnergyStorage energy = new EnergyStorage(RefinedStorage.INSTANCE.controllerCapacity);
|
||||
private IC2Energy IC2Energy;
|
||||
private int energyUsage;
|
||||
|
||||
@@ -696,7 +696,7 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
||||
@Override
|
||||
public int getEnergyUsage() {
|
||||
if (!worldObj.isRemote) {
|
||||
int usage = 0;
|
||||
int usage = RefinedStorage.INSTANCE.controllerUsage;
|
||||
|
||||
for (INetworkNode node : nodes) {
|
||||
if (node.canUpdate()) {
|
||||
|
Reference in New Issue
Block a user