Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2163,14 +2163,12 @@ public class Blocks implements ContentList{
|
||||
requirements(Category.units, BuildVisibility.sandboxOnly, with());
|
||||
size = 5;
|
||||
alwaysUnlocked = true;
|
||||
group = BlockGroup.units;
|
||||
}};
|
||||
|
||||
payloadVoid = new PayloadVoid("payload-void"){{
|
||||
requirements(Category.units, BuildVisibility.sandboxOnly, with());
|
||||
size = 5;
|
||||
alwaysUnlocked = true;
|
||||
group = BlockGroup.units;
|
||||
}};
|
||||
|
||||
//TODO move
|
||||
|
||||
@@ -6,6 +6,7 @@ import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.*;
|
||||
import mindustry.world.blocks.storage.*;
|
||||
@@ -57,6 +58,17 @@ public class Constructor extends BlockProducer{
|
||||
ItemSelection.buildTable(Constructor.this, table, content.blocks().select(Constructor.this::canProduce), () -> recipe, this::configure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onConfigureTileTapped(Building other){
|
||||
if(this == other){
|
||||
deselect();
|
||||
configure(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object config(){
|
||||
return recipe;
|
||||
|
||||
@@ -91,6 +91,17 @@ public class PayloadSource extends PayloadBlock{
|
||||
() -> (UnlockableContent)config(), this::configure);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onConfigureTileTapped(Building other){
|
||||
if(this == other){
|
||||
deselect();
|
||||
configure(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object config(){
|
||||
return unit == null ? block : unit;
|
||||
|
||||
@@ -166,6 +166,17 @@ public class UnitFactory extends UnitBlock{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onConfigureTileTapped(Building other){
|
||||
if(this == other){
|
||||
deselect();
|
||||
configure(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptPayload(Building source, Payload payload){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user