Unit req tweaks

This commit is contained in:
Anuken
2022-02-14 15:38:05 -05:00
parent 9a54abf0ba
commit cfd37d3cb0
2 changed files with 8 additions and 6 deletions

View File

@@ -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;

View File

@@ -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<TechTreeNode> 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);