Fixed some bugs/crashes
This commit is contained in:
@@ -33,9 +33,9 @@ public class DistributionBlocks extends BlockList implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
phaseConveyor = new ItemBridge("phase-conveyor"){{
|
phaseConveyor = new ItemBridge("phase-conveyor"){{
|
||||||
range = 11;
|
range = 12;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
consumes.power(0.05f);
|
consumes.power(0.03f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
sorter = new Sorter("sorter");
|
sorter = new Sorter("sorter");
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ public interface BuilderTrait extends Entity{
|
|||||||
Tile tile = getMineTile();
|
Tile tile = getMineTile();
|
||||||
TileEntity core = unit.getClosestCore();
|
TileEntity core = unit.getClosestCore();
|
||||||
|
|
||||||
if(core == null || tile.block() != Blocks.air || unit.distanceTo(tile.worldx(), tile.worldy()) > mineDistance || !unit.inventory.canAcceptItem(tile.floor().drops.item)){
|
if(core == null || tile.block() != Blocks.air || unit.distanceTo(tile.worldx(), tile.worldy()) > mineDistance || tile.floor().drops == null || !unit.inventory.canAcceptItem(tile.floor().drops.item)){
|
||||||
setMineTile(null);
|
setMineTile(null);
|
||||||
}else{
|
}else{
|
||||||
Item item = tile.floor().drops.item;
|
Item item = tile.floor().drops.item;
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
player.clearBuilding();
|
player.clearBuilding();
|
||||||
mode = none;
|
mode = none;
|
||||||
recipe = null;
|
recipe = null;
|
||||||
}).visible(() -> player.isBuilding() || mode != none);
|
}).visible(() -> player.isBuilding() || recipe != null);
|
||||||
|
|
||||||
//confirm button
|
//confirm button
|
||||||
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
|
|
||||||
/**Show or hide the placement menu.*/
|
/**Show or hide the placement menu.*/
|
||||||
void toggle(float t, Interpolation ip){
|
void toggle(float t, Interpolation ip){
|
||||||
|
toggler.clearActions();
|
||||||
if(shown){
|
if(shown){
|
||||||
shown = false;
|
shown = false;
|
||||||
toggler.actions(Actions.translateBy(toggler.getTranslation().x + toggler.getWidth(), 0, t, ip));
|
toggler.actions(Actions.translateBy(toggler.getTranslation().x + toggler.getWidth(), 0, t, ip));
|
||||||
|
|||||||
Reference in New Issue
Block a user