Added power cost for sending liquids via transceiver

This commit is contained in:
CrazyPants committed 2013-09-25 17:14:46 +08:00
1 parent cea7ae3a2f
commit f7ebbd81e6
2 files changed
+9 -6

No files matched your search

+4 -1
View File
@@ -23,6 +23,8 @@ public final class Config {
public static double transceiverUpkeepCost = 0.25;
public static double transceiverBucketTransmissionCost = 1;
public static int transceiverMaxIO = 256;
public static File configDirectory;
@@ -49,7 +51,8 @@ public final class Config {
"Number of MJ/t required to a Dimensional Transceiver connection open").getDouble(transceiverUpkeepCost);
transceiverMaxIO = config.get("Settings", "transceiverMaxIO", transceiverMaxIO,
"Maximum MJ/t sent and recieved by a Dimensional Transceiver per tick. Input and output limites are no cumulative").getInt(transceiverMaxIO);
transceiverBucketTransmissionCost = config.get("Settings", "transceiverBucketTransmissionCost", transceiverBucketTransmissionCost,
"The cost in MJ of trasporting a bucket of fluid via a Dimensional Transceiver.").getDouble(transceiverBucketTransmissionCost);
configDirectory = event.getModConfigurationDirectory();
}
@@ -33,6 +33,8 @@ public class TileHyperCube extends TileEntity implements IInternalPowerReceptor,
private static final float ENERGY_UPKEEP = (float) Config.transceiverUpkeepCost;
private static final float MILLIBUCKET_TRANSMISSION_COST = (float) Config.transceiverBucketTransmissionCost / 1000F;
private RedstoneControlMode inputControlMode = RedstoneControlMode.IGNORE;
private RedstoneControlMode outputControlMode = RedstoneControlMode.IGNORE;
@@ -176,12 +178,10 @@ public class TileHyperCube extends TileEntity implements IInternalPowerReceptor,
// to make sure we dont both send and recieve to the same source
powerHandler.getPowerReceiver().receiveEnergy(Type.STORAGE, 1, null);
//Pay update
//Pay upkeep cost
stored -= ENERGY_UPKEEP;
// if(milliBucketsTransfered > 0) {
// System.out.println("TileHyperCube.updateEntity: Buckets sent=" + milliBucketsTransfered);
// }
//Pay fluid transmission cost
stored -= (MILLIBUCKET_TRANSMISSION_COST * milliBucketsTransfered);
milliBucketsTransfered = 0;