mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-31 15:09:07 +07:00
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"){{
|
||||
range = 11;
|
||||
range = 12;
|
||||
hasPower = true;
|
||||
consumes.power(0.05f);
|
||||
consumes.power(0.03f);
|
||||
}};
|
||||
|
||||
sorter = new Sorter("sorter");
|
||||
|
@ -236,7 +236,7 @@ public interface BuilderTrait extends Entity{
|
||||
Tile tile = getMineTile();
|
||||
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);
|
||||
}else{
|
||||
Item item = tile.floor().drops.item;
|
||||
|
@ -230,7 +230,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
player.clearBuilding();
|
||||
mode = none;
|
||||
recipe = null;
|
||||
}).visible(() -> player.isBuilding() || mode != none);
|
||||
}).visible(() -> player.isBuilding() || recipe != null);
|
||||
|
||||
//confirm button
|
||||
table.addImageButton("icon-check", "clear-partial", 16 * 2f, () -> {
|
||||
|
@ -226,6 +226,7 @@ public class PlacementFragment extends Fragment{
|
||||
|
||||
/**Show or hide the placement menu.*/
|
||||
void toggle(float t, Interpolation ip){
|
||||
toggler.clearActions();
|
||||
if(shown){
|
||||
shown = false;
|
||||
toggler.actions(Actions.translateBy(toggler.getTranslation().x + toggler.getWidth(), 0, t, ip));
|
||||
|
Reference in New Issue
Block a user