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 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).
|
- 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
|
### 0.8.12
|
||||||
**Bugfixes**
|
**Bugfixes**
|
||||||
- Fixed dupe bug when shift clicking output slot in grid
|
- 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 List<ClientStack> items = new ArrayList<ClientStack>();
|
||||||
|
|
||||||
|
public int controllerUsage;
|
||||||
public int cableUsage;
|
public int cableUsage;
|
||||||
public int constructorUsage;
|
public int constructorUsage;
|
||||||
public int crafterUsage;
|
public int crafterUsage;
|
||||||
@@ -69,7 +70,7 @@ public final class RefinedStorage {
|
|||||||
public int craftingGridUsage;
|
public int craftingGridUsage;
|
||||||
public int patternGridUsage;
|
public int patternGridUsage;
|
||||||
|
|
||||||
public int controller;
|
public int controllerCapacity;
|
||||||
public boolean controllerUsesEnergy;
|
public boolean controllerUsesEnergy;
|
||||||
|
|
||||||
public int wirelessTransmitterBaseRange;
|
public int wirelessTransmitterBaseRange;
|
||||||
@@ -86,6 +87,7 @@ public final class RefinedStorage {
|
|||||||
|
|
||||||
Configuration config = new Configuration(e.getSuggestedConfigurationFile());
|
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");
|
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");
|
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");
|
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");
|
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");
|
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");
|
controllerCapacity = config.getInt("capacity", "controller", 32000, 0, Integer.MAX_VALUE, "The energy capacity of the Controller");
|
||||||
controllerUsesEnergy = config.getBoolean("controllerUsesEnergy", "energy", true, "Whether the controller uses RF");
|
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");
|
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");
|
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;
|
int amount = slot.getStack().stackSize;
|
||||||
|
|
||||||
if (clickedButton == 0) {
|
if (clickedButton == 0) {
|
||||||
amount = Math.max(1, --amount);
|
amount = Math.max(1, amount - 1);
|
||||||
} else if (clickedButton == 1) {
|
} else if (clickedButton == 1) {
|
||||||
amount = Math.min(64, ++amount);
|
amount = Math.min(64, amount + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
slot.getStack().stackSize = amount;
|
slot.getStack().stackSize = amount;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class ItemBlockController extends ItemBlockBase {
|
|||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
||||||
if (stack.getMetadata() != EnumControllerType.CREATIVE.getId()) {
|
if (stack.getMetadata() != EnumControllerType.CREATIVE.getId()) {
|
||||||
int energyStored = 0;
|
int energyStored = 0;
|
||||||
int energyCapacity = RefinedStorage.INSTANCE.controller;
|
int energyCapacity = RefinedStorage.INSTANCE.controllerCapacity;
|
||||||
|
|
||||||
if (stack.getTagCompound() != null) {
|
if (stack.getTagCompound() != null) {
|
||||||
if (stack.getTagCompound().hasKey(TileController.NBT_ENERGY)) {
|
if (stack.getTagCompound().hasKey(TileController.NBT_ENERGY)) {
|
||||||
@@ -51,7 +51,7 @@ public class ItemBlockController extends ItemBlockBase {
|
|||||||
tag = new NBTTagCompound();
|
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;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
|||||||
private List<ICraftingTask> craftingTasksToAdd = new ArrayList<ICraftingTask>();
|
private List<ICraftingTask> craftingTasksToAdd = new ArrayList<ICraftingTask>();
|
||||||
private List<ICraftingTask> craftingTasksToCancel = 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 IC2Energy IC2Energy;
|
||||||
private int energyUsage;
|
private int energyUsage;
|
||||||
|
|
||||||
@@ -696,7 +696,7 @@ public class TileController extends TileBase implements INetworkMaster, IEnergyR
|
|||||||
@Override
|
@Override
|
||||||
public int getEnergyUsage() {
|
public int getEnergyUsage() {
|
||||||
if (!worldObj.isRemote) {
|
if (!worldObj.isRemote) {
|
||||||
int usage = 0;
|
int usage = RefinedStorage.INSTANCE.controllerUsage;
|
||||||
|
|
||||||
for (INetworkNode node : nodes) {
|
for (INetworkNode node : nodes) {
|
||||||
if (node.canUpdate()) {
|
if (node.canUpdate()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user