mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-05 16:37:38 +07:00
All power blocks now produce power as stated in v63 tool tips
This commit is contained in:
parent
149f7a1d9d
commit
b4aba3d263
@ -20,7 +20,7 @@ public class PowerBlocks extends BlockList implements ContentList{
|
||||
|
||||
thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{
|
||||
maxLiquidGenerate = 2f;
|
||||
powerProduction = 4f;
|
||||
powerProduction = 2f;
|
||||
generateEffect = BlockFx.redgeneratespark;
|
||||
size = 2;
|
||||
}};
|
||||
@ -42,14 +42,14 @@ public class PowerBlocks extends BlockList implements ContentList{
|
||||
powerProduction = 0.0045f;
|
||||
}};
|
||||
|
||||
largeSolarPanel = new PowerGenerator("solar-panel-large"){{
|
||||
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
|
||||
powerProduction = 0.055f;
|
||||
}};
|
||||
|
||||
thoriumReactor = new NuclearReactor("thorium-reactor"){{
|
||||
size = 3;
|
||||
health = 700;
|
||||
powerMultiplier = 1.1f;
|
||||
powerProduction = 1.1f;
|
||||
}};
|
||||
|
||||
fusionReactor = new FusionReactor("fusion-reactor"){{
|
||||
|
@ -34,7 +34,6 @@ public class NuclearReactor extends PowerGenerator{
|
||||
protected Color coolColor = new Color(1, 1, 1, 0f);
|
||||
protected Color hotColor = Color.valueOf("ff9575a3");
|
||||
protected int fuelUseTime = 120; //time to consume 1 fuel
|
||||
protected float powerMultiplier = 0.45f; //power per frame, depends on full capacity
|
||||
protected float heating = 0.013f; //heating per frame
|
||||
protected float coolantPower = 0.015f; //how much heat decreases per coolant unit
|
||||
protected float smokeThreshold = 0.3f; //threshold at which block starts smoking
|
||||
@ -49,8 +48,6 @@ public class NuclearReactor extends PowerGenerator{
|
||||
super(name);
|
||||
itemCapacity = 30;
|
||||
liquidCapacity = 50;
|
||||
// TODO Adapt to new power system
|
||||
//powerCapacity = 80f;
|
||||
hasItems = true;
|
||||
hasLiquids = true;
|
||||
|
||||
@ -77,9 +74,9 @@ public class NuclearReactor extends PowerGenerator{
|
||||
super.setStats();
|
||||
stats.add(BlockStat.inputLiquid, new LiquidFilterValue(liquid -> liquid.temperature <= 0.5f));
|
||||
|
||||
// TODO Verify for new power system
|
||||
stats.remove(BlockStat.basePowerGeneration);
|
||||
stats.add(BlockStat.basePowerGeneration, powerMultiplier * 60f * 0.5f, StatUnit.powerSecond);
|
||||
// Display the power which will be produced at 50% efficiency
|
||||
stats.add(BlockStat.basePowerGeneration, powerProduction * 60f * 0.5f, StatUnit.powerSecond);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -88,12 +85,11 @@ public class NuclearReactor extends PowerGenerator{
|
||||
|
||||
int fuel = entity.items.get(consumes.item());
|
||||
float fullness = (float) fuel / itemCapacity;
|
||||
entity.productionEfficiency = fullness / 2.0f; // Currently, efficiency of 0.5 = 100%
|
||||
|
||||
if(fuel > 0){
|
||||
entity.heat += fullness * heating * Math.min(entity.delta(), 4f);
|
||||
// TODO Adapt to new power system
|
||||
//entity.power.amount += powerMultiplier * fullness * entity.delta();
|
||||
//entity.power.amount = Mathf.clamp(entity.power.amount, 0f, powerCapacity);
|
||||
|
||||
if(entity.timer.get(timerFuel, fuelUseTime)){
|
||||
entity.items.remove(consumes.item(), 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user