Generator can now reach up to 2 Megawatts, uses wires to limit
This commit is contained in:
parent
900b597e89
commit
2a35940949
2 changed files with 10 additions and 9 deletions
|
@ -27,7 +27,7 @@ public class TileGenerator extends TileElectrical implements IRotatable
|
|||
|
||||
public TileGenerator()
|
||||
{
|
||||
energy = new EnergyStorageHandler(10000);
|
||||
energy = new EnergyStorageHandler(100000);
|
||||
}
|
||||
|
||||
public byte toggleGearRatio()
|
||||
|
@ -67,9 +67,10 @@ public class TileGenerator extends TileElectrical implements IRotatable
|
|||
|
||||
if (receive > 0)
|
||||
{
|
||||
double percentageUsed = (double) receive / ((double) mech.getTorque() * (double) mech.getAngularVelocity());
|
||||
// TODO: Make sure this calculation/decrease is correct!
|
||||
mech.setTorque((long) (mech.getTorque() * 0.9));
|
||||
mech.setAngularVelocity(mech.getAngularVelocity() * 0.9f);
|
||||
mech.setTorque((long) (mech.getTorque() - (mech.getTorque() * percentageUsed)));
|
||||
mech.setAngularVelocity((float) (mech.getAngularVelocity() - (mech.getAngularVelocity() * percentageUsed)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +90,7 @@ public class TileGenerator extends TileElectrical implements IRotatable
|
|||
{
|
||||
if (extract > 0)
|
||||
{
|
||||
long torqueRatio = (long) ((gearRatio + 1) / 3d * (energy.getMaxExtract()));
|
||||
long torqueRatio = (long) ((gearRatio + 1) / 5d * (extract));
|
||||
|
||||
final float maxAngularVelocity = extract / (float) torqueRatio;
|
||||
|
||||
|
|
|
@ -17,15 +17,15 @@ import codechicken.lib.colour.ColourRGBA;
|
|||
public enum EnumWireMaterial
|
||||
{
|
||||
/** Copper: General. */
|
||||
COPPER("Copper", 1.68f, 5, 300, 184, 115, 51),
|
||||
COPPER("Copper", 1.68f, 5, 200, 184, 115, 51),
|
||||
/** Tin: Low shock, cheap */
|
||||
TIN("Tin", 3.1f, 1, 2000, 132, 132, 130),
|
||||
TIN("Tin", 3.1f, 1, 100, 132, 132, 130),
|
||||
/** Iron: High Capacity */
|
||||
IRON("Iron", 3f, 3, 8000, 97, 102, 105),
|
||||
IRON("Iron", 3f, 3, 800, 97, 102, 105),
|
||||
/** Aluminum: High Shock */
|
||||
ALUMINUM("Aluminum", 2.6f, 10, 3200, 215, 205, 181),
|
||||
ALUMINUM("Aluminum", 2.6f, 10, 600, 215, 205, 181),
|
||||
/** Aluminum: Low Resistance */
|
||||
SILVER("Silver", 1.59f, 5, 4000, 192, 192, 192),
|
||||
SILVER("Silver", 1.59f, 5, 700, 192, 192, 192),
|
||||
/** Superconductor: Over-powered */
|
||||
SUPERCONDUCTOR("Superconductor", 0, 10, 1000000, 255, 255, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue