mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-08-01 23:50:17 +07:00
Fixed #5462
This commit is contained in:
@ -39,7 +39,7 @@ public class MinerAI extends AIController{
|
||||
if(unit.stack.amount >= unit.type.itemCapacity || (targetItem != null && !unit.acceptsItem(targetItem))){
|
||||
mining = false;
|
||||
}else{
|
||||
if(timer.get(timerTarget, 60) && targetItem != null){
|
||||
if(timer.get(timerTarget3, 60) && targetItem != null){
|
||||
ore = indexer.findClosestOre(unit, targetItem);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import arc.graphics.*;
|
||||
import arc.input.*;
|
||||
import arc.math.*;
|
||||
import arc.scene.ui.*;
|
||||
import arc.scene.ui.TextButton.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
@ -34,6 +35,7 @@ public class JoinDialog extends BaseDialog{
|
||||
int totalHosts;
|
||||
int refreshes;
|
||||
boolean showHidden;
|
||||
TextButtonStyle style;
|
||||
|
||||
String lastIp;
|
||||
int lastPort;
|
||||
@ -42,6 +44,15 @@ public class JoinDialog extends BaseDialog{
|
||||
public JoinDialog(){
|
||||
super("@joingame");
|
||||
|
||||
style = new TextButtonStyle(){{
|
||||
over = Styles.flatOver;
|
||||
font = Fonts.def;
|
||||
fontColor = Color.white;
|
||||
disabledFontColor = Color.gray;
|
||||
down = Styles.flatOver;
|
||||
up = Styles.black5;
|
||||
}};
|
||||
|
||||
loadServers();
|
||||
|
||||
if(!steam) buttons.add().width(60f);
|
||||
@ -119,7 +130,7 @@ public class JoinDialog extends BaseDialog{
|
||||
//why are java lambdas this bad
|
||||
TextButton[] buttons = {null};
|
||||
|
||||
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), Styles.cleart, () -> {
|
||||
TextButton button = buttons[0] = remote.button("[accent]" + server.displayIP(), style, () -> {
|
||||
if(!buttons[0].childrenPressed()){
|
||||
if(server.lastHost != null){
|
||||
Events.fire(new ClientPreConnectEvent(server.lastHost));
|
||||
@ -405,7 +416,7 @@ public class JoinDialog extends BaseDialog{
|
||||
float w = targetWidth();
|
||||
|
||||
//TODO looks bad
|
||||
container.button(b -> buildServer(host, b), Styles.cleart, () -> {
|
||||
container.button(b -> buildServer(host, b), style, () -> {
|
||||
Events.fire(new ClientPreConnectEvent(host));
|
||||
if(!Core.settings.getBool("server-disclaimer", false)){
|
||||
ui.showCustomConfirm("@warning", "@servers.disclaimer", "@ok", "@back", () -> {
|
||||
@ -442,7 +453,7 @@ public class JoinDialog extends BaseDialog{
|
||||
|
||||
local.row();
|
||||
|
||||
local.button(b -> buildServer(host, b), Styles.cleart, () -> {
|
||||
local.button(b -> buildServer(host, b), style, () -> {
|
||||
Events.fire(new ClientPreConnectEvent(host));
|
||||
safeConnect(host.address, host.port, host.version);
|
||||
}).width(w);
|
||||
|
Reference in New Issue
Block a user