mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Fixed #12677
This commit is contained in:
@@ -6484,7 +6484,7 @@ public class Blocks{
|
||||
regionSuffix = "-dark";
|
||||
|
||||
size = 3;
|
||||
configurable = false;
|
||||
showAllCommands = false;
|
||||
consumePower(3f);
|
||||
consumeLiquid(Liquids.hydrogen, 3f / 60f);
|
||||
consumeItems(with(Items.silicon, 40, Items.tungsten, 30));
|
||||
@@ -6502,7 +6502,7 @@ public class Blocks{
|
||||
regionSuffix = "-dark";
|
||||
|
||||
size = 3;
|
||||
configurable = false;
|
||||
showAllCommands = false;
|
||||
consumePower(2.5f);
|
||||
consumeLiquid(Liquids.hydrogen, 3f / 60f);
|
||||
consumeItems(with(Items.silicon, 60, Items.tungsten, 40));
|
||||
@@ -6521,7 +6521,7 @@ public class Blocks{
|
||||
regionSuffix = "-dark";
|
||||
|
||||
size = 3;
|
||||
configurable = false;
|
||||
showAllCommands = false;
|
||||
consumePower(2.5f);
|
||||
consumeLiquid(Liquids.hydrogen, 3f / 60f);
|
||||
consumeItems(with(Items.silicon, 50, Items.tungsten, 40));
|
||||
@@ -6534,7 +6534,6 @@ public class Blocks{
|
||||
);
|
||||
}};
|
||||
|
||||
//yes very silly name
|
||||
primeRefabricator = new Reconstructor("prime-refabricator"){{
|
||||
requirements(Category.units, with(Items.thorium, 250, Items.oxide, 200, Items.tungsten, 200, Items.silicon, 400));
|
||||
regionSuffix = "-dark";
|
||||
@@ -6542,7 +6541,7 @@ public class Blocks{
|
||||
researchCostMultipliers.put(Items.thorium, 0.2f);
|
||||
|
||||
size = 5;
|
||||
configurable = false;
|
||||
showAllCommands = false;
|
||||
consumePower(4.5f);
|
||||
consumeLiquid(Liquids.nitrogen, 10f / 60f);
|
||||
consumeItems(with(Items.thorium, 80, Items.silicon, 100));
|
||||
|
||||
@@ -39,6 +39,7 @@ public class Reconstructor extends UnitBlock{
|
||||
|
||||
public Sound createSound = Sounds.unitCreate;
|
||||
public float createSoundVolume = 1f;
|
||||
public boolean showAllCommands = true;
|
||||
|
||||
public Reconstructor(String name){
|
||||
super(name);
|
||||
@@ -187,7 +188,7 @@ public class Reconstructor extends UnitBlock{
|
||||
if(build != null && build.team == this.team){
|
||||
commandPos.set(build);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -197,7 +198,7 @@ public class Reconstructor extends UnitBlock{
|
||||
|
||||
public boolean canSetCommand(){
|
||||
var output = unit();
|
||||
return output == null || output.allowChangeCommands;
|
||||
return showAllCommands ? (output == null || output.allowChangeCommands) : output != null && output.commands.size > 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -214,6 +215,8 @@ public class Reconstructor extends UnitBlock{
|
||||
public void buildConfiguration(Table table){
|
||||
var unit = unit();
|
||||
|
||||
if(!showAllCommands && unit == null) return;
|
||||
|
||||
var group = new ButtonGroup<ImageButton>();
|
||||
group.setMinCheckCount(0);
|
||||
int i = 0, columns = 5;
|
||||
|
||||
Reference in New Issue
Block a user