Initial Efficiency is now zero. Blocks display efficiency.

This commit is contained in:
Timmeey86
2018-11-28 13:19:52 +01:00
parent cf3d2c3def
commit 2972780bed
5 changed files with 45 additions and 11 deletions
@@ -4,6 +4,7 @@ import io.anuke.mindustry.content.Liquids;
import io.anuke.mindustry.content.fx.BlockFx;
import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.world.Block;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.power.*;
public class PowerBlocks extends BlockList implements ContentList{
@@ -41,14 +42,26 @@ public class PowerBlocks extends BlockList implements ContentList{
itemDuration = 220f;
}};
solarPanel = new PowerGenerator("solar-panel"){{
powerProduction = 0.0045f;
}};
// TODO: Maybe reintroduce a class for the initial production efficiency
solarPanel = new PowerGenerator("solar-panel"){
{
powerProduction = 0.0045f;
}
@Override
public void update(Tile tile){
tile.<GeneratorEntity>entity().productionEfficiency = 1.0f;
}
};
largeSolarPanel = new PowerGenerator("solar-panel-large"){{
powerProduction = 0.055f;
size = 3;
}};
largeSolarPanel = new PowerGenerator("solar-panel-large"){
{
powerProduction = 0.055f;
}
@Override
public void update(Tile tile){
tile.<GeneratorEntity>entity().productionEfficiency = 1.0f;
}
};
thoriumReactor = new NuclearReactor("thorium-reactor"){{
size = 3;