Modified setVoltage method

This commit is contained in:
Calclavia 2015-01-16 23:10:38 +08:00
parent fcd6bcc68c
commit c336930ab4
3 changed files with 3 additions and 3 deletions

View file

@ -79,7 +79,7 @@ class TileBattery extends SpatialTile(Material.iron) with TIO with TElectric wit
//TODO: Test, remove this
if (doCharge)
{
dcNode.generateVoltage(100)
dcNode.setVoltage(100)
}
if (markDistributionUpdate && ticks % 5 == 0)

View file

@ -80,7 +80,7 @@ class TileMotor extends SpatialTile(Material.iron) with TElectric with TSpatialN
if (false && mechNode.power > dcNode.power)
{
//Produce electricity
dcNode.generateVoltage(deltaPower)
dcNode.setVoltage(deltaPower)
//TODO: Resist mech energy
}
// else if (dcNode.power > mechNode.power)

View file

@ -52,7 +52,7 @@ class TileSolarPanel extends TileElectric(Material.iron) with TIO with RenderCon
if (!(world.isThundering || world.isRaining))
{
println(dcNode)
dcNode.generateVoltage(Settings.solarPower / 20)
dcNode.setVoltage(Settings.solarPower / 20)
}
}
}