From 09a435320add6ccd723afd8c70591988db0628b0 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 4 Apr 2019 15:14:45 -0400 Subject: [PATCH] Impact reactor display bugfix --- core/assets/bundles/bundle_cs.properties | 1 + core/assets/bundles/bundle_de.properties | 1 + core/assets/bundles/bundle_es.properties | 1 + core/assets/bundles/bundle_fr.properties | 1 + core/assets/bundles/bundle_fr_BE.properties | 1 + core/assets/bundles/bundle_in_ID.properties | 1 + core/assets/bundles/bundle_it.properties | 1 + core/assets/bundles/bundle_ja.properties | 1 + core/assets/bundles/bundle_ko.properties | 1 + core/assets/bundles/bundle_nl.properties | 1 + core/assets/bundles/bundle_pl.properties | 1 + core/assets/bundles/bundle_pt_BR.properties | 1 + core/assets/bundles/bundle_ru.properties | 1 + core/assets/bundles/bundle_tk.properties | 1 + core/assets/bundles/bundle_tr.properties | 1 + core/assets/bundles/bundle_uk_UA.properties | 1 + core/assets/bundles/bundle_zh_CN.properties | 1 + core/assets/bundles/bundle_zh_TW.properties | 1 + .../anuke/mindustry/world/blocks/power/ImpactReactor.java | 6 ++++-- 19 files changed, 22 insertions(+), 2 deletions(-) diff --git a/core/assets/bundles/bundle_cs.properties b/core/assets/bundles/bundle_cs.properties index 38d44d7a5e..e6ae1ad361 100644 --- a/core/assets/bundles/bundle_cs.properties +++ b/core/assets/bundles/bundle_cs.properties @@ -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 diff --git a/core/assets/bundles/bundle_de.properties b/core/assets/bundles/bundle_de.properties index 8f5ac43f07..10d3657902 100644 --- a/core/assets/bundles/bundle_de.properties +++ b/core/assets/bundles/bundle_de.properties @@ -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 diff --git a/core/assets/bundles/bundle_es.properties b/core/assets/bundles/bundle_es.properties index defbccee44..017f90e397 100644 --- a/core/assets/bundles/bundle_es.properties +++ b/core/assets/bundles/bundle_es.properties @@ -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 diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index 433c0f01ac..269ff3c7df 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -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 diff --git a/core/assets/bundles/bundle_fr_BE.properties b/core/assets/bundles/bundle_fr_BE.properties index 06c1d415e8..8713ecbf89 100644 --- a/core/assets/bundles/bundle_fr_BE.properties +++ b/core/assets/bundles/bundle_fr_BE.properties @@ -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 diff --git a/core/assets/bundles/bundle_in_ID.properties b/core/assets/bundles/bundle_in_ID.properties index 0d04b55f8b..edc7221b4c 100644 --- a/core/assets/bundles/bundle_in_ID.properties +++ b/core/assets/bundles/bundle_in_ID.properties @@ -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 diff --git a/core/assets/bundles/bundle_it.properties b/core/assets/bundles/bundle_it.properties index c7387672a7..50ce00f123 100644 --- a/core/assets/bundles/bundle_it.properties +++ b/core/assets/bundles/bundle_it.properties @@ -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 diff --git a/core/assets/bundles/bundle_ja.properties b/core/assets/bundles/bundle_ja.properties index 1b5e5c2863..10dfada1dd 100644 --- a/core/assets/bundles/bundle_ja.properties +++ b/core/assets/bundles/bundle_ja.properties @@ -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 = 液体 diff --git a/core/assets/bundles/bundle_ko.properties b/core/assets/bundles/bundle_ko.properties index 20d3523fe9..3fd7c49540 100644 --- a/core/assets/bundles/bundle_ko.properties +++ b/core/assets/bundles/bundle_ko.properties @@ -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 = 액체 diff --git a/core/assets/bundles/bundle_nl.properties b/core/assets/bundles/bundle_nl.properties index f3f8058c9e..7c0a5e8176 100644 --- a/core/assets/bundles/bundle_nl.properties +++ b/core/assets/bundles/bundle_nl.properties @@ -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 diff --git a/core/assets/bundles/bundle_pl.properties b/core/assets/bundles/bundle_pl.properties index c254f18fc9..716ac5c50a 100644 --- a/core/assets/bundles/bundle_pl.properties +++ b/core/assets/bundles/bundle_pl.properties @@ -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 diff --git a/core/assets/bundles/bundle_pt_BR.properties b/core/assets/bundles/bundle_pt_BR.properties index 52e474a134..a36696def4 100644 --- a/core/assets/bundles/bundle_pt_BR.properties +++ b/core/assets/bundles/bundle_pt_BR.properties @@ -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 diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index a94d923a71..73739af8e5 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -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 = Жидкость diff --git a/core/assets/bundles/bundle_tk.properties b/core/assets/bundles/bundle_tk.properties index 29222e70eb..7dfd3d76e3 100644 --- a/core/assets/bundles/bundle_tk.properties +++ b/core/assets/bundles/bundle_tk.properties @@ -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 diff --git a/core/assets/bundles/bundle_tr.properties b/core/assets/bundles/bundle_tr.properties index 718d088b97..802f6cfe7a 100644 --- a/core/assets/bundles/bundle_tr.properties +++ b/core/assets/bundles/bundle_tr.properties @@ -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 diff --git a/core/assets/bundles/bundle_uk_UA.properties b/core/assets/bundles/bundle_uk_UA.properties index 1286290d86..ebcee62237 100644 --- a/core/assets/bundles/bundle_uk_UA.properties +++ b/core/assets/bundles/bundle_uk_UA.properties @@ -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 = Рідина diff --git a/core/assets/bundles/bundle_zh_CN.properties b/core/assets/bundles/bundle_zh_CN.properties index 32626a8502..340b62c350 100644 --- a/core/assets/bundles/bundle_zh_CN.properties +++ b/core/assets/bundles/bundle_zh_CN.properties @@ -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 = 液体 diff --git a/core/assets/bundles/bundle_zh_TW.properties b/core/assets/bundles/bundle_zh_TW.properties index f51b5dae55..d8fec14e43 100644 --- a/core/assets/bundles/bundle_zh_TW.properties +++ b/core/assets/bundles/bundle_zh_TW.properties @@ -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 = 液體 diff --git a/core/src/io/anuke/mindustry/world/blocks/power/ImpactReactor.java b/core/src/io/anuke/mindustry/world/blocks/power/ImpactReactor.java index 0cce064722..a9700cb272 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/ImpactReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/ImpactReactor.java @@ -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();