Rewrite of all static initialization code
This commit is contained in:
@@ -4,17 +4,25 @@ import com.badlogic.gdx.graphics.Color;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
|
||||
public class Links {
|
||||
private static final LinkEntry[] links = {
|
||||
new LinkEntry("discord", "https://discord.gg/BKADYds", Color.valueOf("7289da")),
|
||||
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Color.valueOf("026aa7")),
|
||||
new LinkEntry("wiki", "http://mindustry.wikia.com/wiki/Mindustry_Wiki", Color.valueOf("0f142f")),
|
||||
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Color.valueOf("fa5c5c")),
|
||||
new LinkEntry("google-play", "https://play.google.com/store/apps/details?id=io.anuke.mindustry", Color.valueOf("689f38")),
|
||||
new LinkEntry("github", "https://github.com/Anuken/Mindustry/", Color.valueOf("24292e")),
|
||||
new LinkEntry("dev-builds", "https://github.com/Anuken/Mindustry/wiki", Color.valueOf("fafbfc")),
|
||||
};
|
||||
private static LinkEntry[] links;
|
||||
|
||||
private static void createLinks(){
|
||||
links = new LinkEntry[]{
|
||||
new LinkEntry("discord", "https://discord.gg/BKADYds", Color.valueOf("7289da")),
|
||||
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Color.valueOf("026aa7")),
|
||||
new LinkEntry("wiki", "http://mindustry.wikia.com/wiki/Mindustry_Wiki", Color.valueOf("0f142f")),
|
||||
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Color.valueOf("fa5c5c")),
|
||||
new LinkEntry("google-play", "https://play.google.com/store/apps/details?id=io.anuke.mindustry", Color.valueOf("689f38")),
|
||||
new LinkEntry("github", "https://github.com/Anuken/Mindustry/", Color.valueOf("24292e")),
|
||||
new LinkEntry("dev-builds", "https://github.com/Anuken/Mindustry/wiki", Color.valueOf("fafbfc"))
|
||||
};
|
||||
}
|
||||
|
||||
public static LinkEntry[] getLinks(){
|
||||
if(links == null){
|
||||
createLinks();
|
||||
}
|
||||
|
||||
return links;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,8 +141,7 @@ public class DebugFragment implements Fragment {
|
||||
"tiles.sleeping: " + TileEntity.sleepingEntities,
|
||||
"time: " + Timers.time(),
|
||||
"state.gameover: " + state.gameOver,
|
||||
"state: " + state.getState(),
|
||||
!Net.server() ? clientDebug.getOut() : serverDebug.getOut()
|
||||
"state: " + state.getState()
|
||||
);
|
||||
|
||||
result.append("players: ");
|
||||
|
||||
@@ -213,7 +213,7 @@ public class HudFragment implements Fragment{
|
||||
new table(){{
|
||||
aleft();
|
||||
|
||||
new label(() -> Bundles.format("text.wave", state.wave)).scale(fontscale*1.5f).left().padLeft(-6);
|
||||
new label(() -> Bundles.format("text.wave", state.wave)).scale(fontScale *1.5f).left().padLeft(-6);
|
||||
|
||||
row();
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
new imagebutton("icon-play-2", isize, ui.levels::show).text("$text.play").padTop(4f);
|
||||
|
||||
new imagebutton("icon-tutorial", isize, () -> control.playMap(world.maps().getByName("tutorial"))).text("$text.tutorial").padTop(4f);
|
||||
new imagebutton("icon-tutorial", isize, () -> {}).text("$text.tutorial").padTop(4f);
|
||||
|
||||
new imagebutton("icon-load", isize, ui.load::show).text("$text.load").padTop(4f);
|
||||
|
||||
@@ -123,10 +123,7 @@ public class MenuFragment implements Fragment{
|
||||
ui.showInfo("$text.multiplayer.web");
|
||||
}
|
||||
}));
|
||||
dialog.content().add(new MenuButton("icon-tutorial", "$text.tutorial", ()-> {
|
||||
control.playMap(world.maps().getByName("tutorial"));
|
||||
dialog.hide();
|
||||
}));
|
||||
dialog.content().add(new MenuButton("icon-tutorial", "$text.tutorial", ()-> {}));
|
||||
|
||||
dialog.content().row();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user