More work on DC grid

This commit is contained in:
Calclavia 2015-01-17 22:08:46 +08:00
parent bf182141da
commit c52bca4a12
2 changed files with 3 additions and 4 deletions

View file

@ -82,7 +82,7 @@ class TileBattery extends SpatialTile(Material.iron) with TIO with TElectric wit
//TODO: Voltage of battery should decrease over time.
//TODO: Test, remove this
if (doCharge)
dcNode.setVoltage(500)
dcNode.generateVoltage(500)
}
}

View file

@ -39,7 +39,7 @@ class TileSolarPanel extends TileElectric(Material.iron) with TIO with RenderCon
return SpatialBlock.icon.get("solarPanel_side")
}
override def update
override def update()
{
super.update()
@ -51,8 +51,7 @@ class TileSolarPanel extends TileElectric(Material.iron) with TIO with RenderCon
{
if (!(world.isThundering || world.isRaining))
{
println(dcNode)
dcNode.setVoltage(Settings.solarPower / 20)
dcNode.generateVoltage(Settings.solarPower / 20)
}
}
}