From cfd37d3cb0db0e1c2ea80c149cc36899367a1339 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 14 Feb 2022 15:38:05 -0500 Subject: [PATCH] Unit req tweaks --- core/src/mindustry/content/Blocks.java | 6 +++--- core/src/mindustry/ui/dialogs/ResearchDialog.java | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index d2a17312bd..f96543fee2 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2617,7 +2617,7 @@ public class Blocks{ unitCapModifier = 6; researchCostMultipliers.put(Items.silicon, 0.3f); - researchCostMultiplier = 0.1f; + researchCostMultiplier = 0.2f; }}; container = new StorageBlock("container"){{ @@ -3585,7 +3585,7 @@ public class Blocks{ requirements(Category.units, with(Items.graphite, 600, Items.beryllium, 600, Items.oxide, 250, Items.tungsten, 400, Items.silicon, 500)); size = 5; //TODO remove ducts and crushers, replace with 2-3 high cost special blocks with silicon requirements - plans.add(new AssemblerUnitPlan(UnitTypes.vanquish, 60f * 50f, BlockStack.list(Blocks.tungstenWallLarge, 12, Blocks.primeControlCore, 2))); + plans.add(new AssemblerUnitPlan(UnitTypes.vanquish, 60f * 50f, BlockStack.list(Blocks.tungstenWallLarge, 10, Blocks.primeControlCore, 2))); consumes.power(3f); areaSize = 13; researchCostMultiplier = 0.4f; @@ -3597,7 +3597,7 @@ public class Blocks{ shipAssembler = new UnitAssembler("ship-assembler"){{ requirements(Category.units, with(Items.beryllium, 700, Items.oxide, 300, Items.tungsten, 500, Items.silicon, 800)); size = 5; - plans.add(new AssemblerUnitPlan(UnitTypes.quell, 60f * 60f, BlockStack.list(Blocks.berylliumWallLarge, 12, Blocks.primeControlCore, 2))); + plans.add(new AssemblerUnitPlan(UnitTypes.quell, 60f * 60f, BlockStack.list(Blocks.berylliumWallLarge, 20, Blocks.primeControlCore, 2))); consumes.power(3f); areaSize = 13; diff --git a/core/src/mindustry/ui/dialogs/ResearchDialog.java b/core/src/mindustry/ui/dialogs/ResearchDialog.java index d194f4f4e5..18cbc03e4e 100644 --- a/core/src/mindustry/ui/dialogs/ResearchDialog.java +++ b/core/src/mindustry/ui/dialogs/ResearchDialog.java @@ -32,6 +32,8 @@ import java.util.*; import static mindustry.Vars.*; public class ResearchDialog extends BaseDialog{ + public static boolean debugShowRequirements = false; + public final float nodeSize = Scl.scl(60f); public ObjectSet nodes = new ObjectSet<>(); public TechTreeNode root = new TechTreeNode(TechTree.roots.first(), null); @@ -584,7 +586,7 @@ public class ResearchDialog extends BaseDialog{ desc.left().defaults().left(); desc.add(selectable ? node.content.localizedName : "[accent]???"); desc.row(); - if(locked(node)){ + if(locked(node) || debugShowRequirements){ desc.table(t -> { t.left(); @@ -618,11 +620,11 @@ public class ResearchDialog extends BaseDialog{ ItemStack completed = node.finishedRequirements[i]; //skip finished stacks - if(req.amount <= completed.amount) continue; + if(req.amount <= completed.amount && !debugShowRequirements) continue; boolean shiny = shine != null && shine[i]; t.table(list -> { - int reqAmount = req.amount - completed.amount; + int reqAmount = debugShowRequirements ? req.amount : req.amount - completed.amount; list.left(); list.image(req.item.uiIcon).size(8 * 3).padRight(3);