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