More commands added to server, new logging
This commit is contained in:
@@ -5,7 +5,6 @@ import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.io.Platform;
|
||||
import io.anuke.mindustry.net.Host;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.scene.style.Drawable;
|
||||
@@ -14,6 +13,7 @@ import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.ucore.util.Log;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
@@ -238,7 +238,7 @@ public class JoinDialog extends FloatingDialog {
|
||||
ui.showError(Bundles.format("text.connectfail", error));
|
||||
ui.loadfrag.hide();
|
||||
|
||||
UCore.error(e);
|
||||
Log.err(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
import io.anuke.mindustry.io.Platform;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
import io.anuke.ucore.scene.ui.ButtonGroup;
|
||||
import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
|
||||
public class LanguageDialog extends FloatingDialog{
|
||||
private Locale[] locales = {Locale.ENGLISH, new Locale("fr", "FR"),
|
||||
new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
|
||||
@@ -36,7 +37,7 @@ public class LanguageDialog extends FloatingDialog{
|
||||
if(ui.getLocale().equals(loc)) return;
|
||||
Settings.putString("locale", loc.toString());
|
||||
Settings.save();
|
||||
UCore.log("Setting locale: " + loc.toString());
|
||||
Log.info("Setting locale: {0}", loc.toString());
|
||||
ui.showInfo("$text.language.restart");
|
||||
});
|
||||
langs.add(button).group(group).update(t -> {
|
||||
|
||||
@@ -4,13 +4,13 @@ import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.mindustry.io.Saves.SaveSlot;
|
||||
import io.anuke.ucore.UCore;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.ucore.util.Log;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -163,7 +163,7 @@ public class LoadDialog extends FloatingDialog{
|
||||
state.set(State.playing);
|
||||
ui.paused.hide();
|
||||
}catch(Exception e){
|
||||
UCore.error(e);
|
||||
Log.err(e);
|
||||
ui.paused.hide();
|
||||
state.set(State.menu);
|
||||
logic.reset();
|
||||
|
||||
@@ -156,9 +156,9 @@ public class HudFragment implements Fragment{
|
||||
row();
|
||||
new label(() -> "[blue]requests: " + renderer.getBlocks().getRequests()).left();
|
||||
row();
|
||||
new label(() -> "[purple]tiles: " + tileGroup.amount()).left();
|
||||
new label(() -> "[purple]tiles: " + tileGroup.size()).left();
|
||||
row();
|
||||
new label(() -> "[purple]enemies: " + enemyGroup.amount()).left();
|
||||
new label(() -> "[purple]enemies: " + enemyGroup.size()).left();
|
||||
row();
|
||||
new label(() -> "[orange]noclip: " + noclip).left();
|
||||
row();
|
||||
@@ -178,7 +178,7 @@ public class HudFragment implements Fragment{
|
||||
|
||||
if(debugNet) {
|
||||
new table() {{
|
||||
new label(() -> "players: " + playerGroup.amount());
|
||||
new label(() -> "players: " + playerGroup.size());
|
||||
row();
|
||||
new label(() -> "" + playerGroup.all());
|
||||
}}.end();
|
||||
|
||||
@@ -26,8 +26,8 @@ public class PlayerListFragment implements Fragment{
|
||||
new table(){{
|
||||
new table("pane"){{
|
||||
margin(14f);
|
||||
new label(() -> Bundles.format(playerGroup.amount() == 1 ? "text.players.single" :
|
||||
"text.players", playerGroup.amount()));
|
||||
new label(() -> Bundles.format(playerGroup.size() == 1 ? "text.players.single" :
|
||||
"text.players", playerGroup.size()));
|
||||
row();
|
||||
content.marginRight(13f).marginLeft(13f);
|
||||
ScrollPane pane = new ScrollPane(content, "clear");
|
||||
@@ -51,9 +51,9 @@ public class PlayerListFragment implements Fragment{
|
||||
if(!(Net.active() && !state.is(State.menu))){
|
||||
visible = false;
|
||||
}
|
||||
if(playerGroup.amount() != last){
|
||||
if(playerGroup.size() != last){
|
||||
rebuild();
|
||||
last = playerGroup.amount();
|
||||
last = playerGroup.size();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user