From c336930ab4743265a1796efb2e2893debf564be8 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Fri, 16 Jan 2015 23:10:38 +0800 Subject: [PATCH] Modified setVoltage method --- src/main/scala/edx/electrical/battery/TileBattery.scala | 2 +- src/main/scala/edx/electrical/generator/TileMotor.scala | 2 +- src/main/scala/edx/electrical/generator/TileSolarPanel.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/edx/electrical/battery/TileBattery.scala b/src/main/scala/edx/electrical/battery/TileBattery.scala index fbf7389b3..7051a8124 100644 --- a/src/main/scala/edx/electrical/battery/TileBattery.scala +++ b/src/main/scala/edx/electrical/battery/TileBattery.scala @@ -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) diff --git a/src/main/scala/edx/electrical/generator/TileMotor.scala b/src/main/scala/edx/electrical/generator/TileMotor.scala index 7af7acf8c..f3623549e 100644 --- a/src/main/scala/edx/electrical/generator/TileMotor.scala +++ b/src/main/scala/edx/electrical/generator/TileMotor.scala @@ -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) diff --git a/src/main/scala/edx/electrical/generator/TileSolarPanel.scala b/src/main/scala/edx/electrical/generator/TileSolarPanel.scala index 18581ed58..7936b746b 100644 --- a/src/main/scala/edx/electrical/generator/TileSolarPanel.scala +++ b/src/main/scala/edx/electrical/generator/TileSolarPanel.scala @@ -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) } } }