From ce6292cc5360008257ceaa07d6bbfcd4df9a6194 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 18 Oct 2020 11:53:36 -0400 Subject: [PATCH] Recipe display for reconstructors --- build.gradle | 2 +- core/src/mindustry/content/Blocks.java | 2 +- core/src/mindustry/world/Block.java | 2 +- .../world/blocks/units/Reconstructor.java | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 1fa4087b6c..c94a79598a 100644 --- a/build.gradle +++ b/build.gradle @@ -305,7 +305,7 @@ project(":core"){ compileOnly project(":annotations") annotationProcessor project(":annotations") - annotationProcessor 'com.github.Anuken:jabel:40eec868af' + annotationProcessor 'com.github.Anuken:jabel:34e4c172e65b3928cd9eabe1993654ea79c409cd' } } diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index a70280f81f..fcad9b888f 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1353,7 +1353,7 @@ public class Blocks implements ContentList{ size = 5; unitCapModifier = 20; - researchCostMultiplier = 0.06f; + researchCostMultiplier = 0.05f; }}; vault = new StorageBlock("vault"){{ diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 53dde34460..2f559267a8 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -617,7 +617,7 @@ public class Block extends UnlockableContent{ public ItemStack[] researchRequirements(){ ItemStack[] out = new ItemStack[requirements.length]; for(int i = 0; i < out.length; i++){ - int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20 * researchCostMultiplier, 10); + int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.15f) * 20 * researchCostMultiplier, 10); out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity)); } diff --git a/core/src/mindustry/world/blocks/units/Reconstructor.java b/core/src/mindustry/world/blocks/units/Reconstructor.java index 326a9f06eb..ed21b6dc11 100644 --- a/core/src/mindustry/world/blocks/units/Reconstructor.java +++ b/core/src/mindustry/world/blocks/units/Reconstructor.java @@ -64,6 +64,22 @@ public class Reconstructor extends UnitBlock{ super.setStats(); stats.add(BlockStat.productionTime, constructTime / 60f, StatUnit.seconds); + stats.add(BlockStat.output, table -> { + table.row(); + for(var upgrade : upgrades){ + float size = 8*3; + if(upgrade[0].unlockedNow() && upgrade[1].unlockedNow()){ + table.image(upgrade[0].icon(Cicon.small)).size(size).padRight(4).padLeft(10).scaling(Scaling.fit).right(); + table.add(upgrade[0].localizedName).left(); + + table.add("[lightgray] -> "); + + table.image(upgrade[1].icon(Cicon.small)).size(size).padRight(4).scaling(Scaling.fit); + table.add(upgrade[1].localizedName).left(); + table.row(); + } + } + }); } @Override