Impact reactor display bugfix

This commit is contained in:
Anuken
2019-04-04 15:14:45 -04:00
parent bf56200c06
commit 09a435320a
19 changed files with 22 additions and 2 deletions
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = 弾薬
bar.drillspeed = 採掘速度: {0}/秒
bar.efficiency = 効率: {0}%
bar.powerbalance = 電力: {0}
bar.poweramount = Power: {0}
bar.poweroutput = 電力発電量: {0}
bar.items = アイテム: {0}
bar.liquid = 液体
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = 탄약
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = 효율성: {0}%
bar.powerbalance = 전력: {0}
bar.poweramount = Power: {0}
bar.poweroutput = 전력 출력: {0}
bar.items = Items: {0}
bar.liquid = 액체
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Płyn
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Боеприпасы
bar.drillspeed = Скорость сверления: {0}/с
bar.efficiency = Эффективность: {0}%
bar.powerbalance = Энергия: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Выходная энергия: {0}
bar.items = Предметы: {0}
bar.liquid = Жидкость
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
+1
View File
@@ -370,6 +370,7 @@ blocks.ammo = Ammo
bar.drillspeed = Drill Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.powerbalance = Power: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.items = Items: {0}
bar.liquid = Liquid
@@ -370,6 +370,7 @@ blocks.ammo = Боєприпаси
bar.drillspeed = Швидкість свердління: {0}/с
bar.efficiency = Ефективність: {0}%
bar.powerbalance = Енергія: {0}
bar.poweramount = Power: {0}
bar.poweroutput = Вихідна енергія: {0}
bar.items = Предмети: {0}
bar.liquid = Рідина
@@ -370,6 +370,7 @@ blocks.ammo = 子弹
bar.drillspeed = 挖掘速度: {0}/s
bar.efficiency = 效率: {0}%
bar.powerbalance = 能量: {0}
bar.poweramount = Power: {0}
bar.poweroutput = 能量输出: {0}
bar.items = 物体: {0}
bar.liquid = 液体
@@ -370,6 +370,7 @@ blocks.ammo = 彈藥
bar.drillspeed = 鑽頭速度:{0}/秒
bar.efficiency = 效率:{0}%
bar.powerbalance = 能量變化:{0}
bar.poweramount = Power: {0}
bar.poweroutput = 能量輸出:{0}
bar.items = 物品:{0}
bar.liquid = 液體
@@ -41,7 +41,6 @@ public class ImpactReactor extends PowerGenerator{
super(name);
hasPower = true;
hasLiquids = true;
powerProduction = 2.0f;
liquidCapacity = 30f;
hasItems = true;
outputsPower = consumesPower = true;
@@ -53,7 +52,7 @@ public class ImpactReactor extends PowerGenerator{
bars.add("poweroutput", entity -> new Bar(() ->
Core.bundle.format("bar.poweroutput",
Strings.fixed(Math.max(entity.block.getPowerProduction(entity.tile) - consumes.getPower().powerPerTick, 0)*60 * entity.delta(), 1)),
Strings.fixed(Math.max(entity.block.getPowerProduction(entity.tile) - consumes.getPower().powerPerTick, 0)*60 * entity.timeScale, 1)),
() -> Pal.powerBar,
() -> ((GeneratorEntity)entity).productionEfficiency));
}
@@ -73,6 +72,9 @@ public class ImpactReactor extends PowerGenerator{
if(entity.cons.valid()){
entity.warmup = Mathf.lerpDelta(entity.warmup, 1f, warmupSpeed);
if(Mathf.isEqual(entity.warmup, 1f, 0.001f)){
entity.warmup =1f;
}
if(entity.timer.get(timerUse, itemDuration)){
entity.cons.trigger();