Cleanup
This commit is contained in:
8
core/src/mindustry/ui/Displayable.java
Normal file
8
core/src/mindustry/ui/Displayable.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package mindustry.ui;
|
||||
|
||||
import arc.scene.ui.layout.*;
|
||||
|
||||
/** An interface for things that can be displayed when hovered over. */
|
||||
public interface Displayable{
|
||||
void display(Table table);
|
||||
}
|
||||
@@ -479,6 +479,10 @@ public class PlacementFragment extends Fragment{
|
||||
|
||||
/** Returns the block currently being hovered over in the world. */
|
||||
Block tileDisplayBlock(){
|
||||
return hoverTile == null ? null : hoverTile.block().synthetic() ? hoverTile.block() : hoverTile.drop() != null && hoverTile.block() == Blocks.air ? hoverTile.overlay().itemDrop != null ? hoverTile.overlay() : hoverTile.floor() : null;
|
||||
return hoverTile == null ? null :
|
||||
hoverTile.block().synthetic() ? hoverTile.block() :
|
||||
hoverTile.drop() != null && hoverTile.block() == Blocks.air ?
|
||||
hoverTile.overlay().itemDrop != null ? hoverTile.overlay() :
|
||||
hoverTile.floor() : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user