mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 20:33:50 +07:00
Recipe display for reconstructors
This commit is contained in:
parent
ef58111cc3
commit
ce6292cc53
@ -305,7 +305,7 @@ project(":core"){
|
||||
|
||||
compileOnly project(":annotations")
|
||||
annotationProcessor project(":annotations")
|
||||
annotationProcessor 'com.github.Anuken:jabel:40eec868af'
|
||||
annotationProcessor 'com.github.Anuken:jabel:34e4c172e65b3928cd9eabe1993654ea79c409cd'
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1353,7 +1353,7 @@ public class Blocks implements ContentList{
|
||||
size = 5;
|
||||
|
||||
unitCapModifier = 20;
|
||||
researchCostMultiplier = 0.06f;
|
||||
researchCostMultiplier = 0.05f;
|
||||
}};
|
||||
|
||||
vault = new StorageBlock("vault"){{
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user