diff --git a/build.gradle b/build.gradle index 8984e5b60f..f09b4f5cd6 100644 --- a/build.gradle +++ b/build.gradle @@ -172,11 +172,20 @@ allprojects{ jcenter() } + task clearCache{ + doFirst{ + delete{ + delete "$rootDir/core/assets/cache" + } + } + } + tasks.withType(JavaCompile){ targetCompatibility = 8 sourceCompatibility = 14 options.encoding = "UTF-8" options.compilerArgs += ["-Xlint:deprecation"] + dependsOn clearCache } } diff --git a/core/assets-raw/fontgen/config.json b/core/assets-raw/fontgen/config.json index f972f27dee..16bc4ed7d2 100644 --- a/core/assets-raw/fontgen/config.json +++ b/core/assets-raw/fontgen/config.json @@ -114,12 +114,6 @@ "code": 59411, "src": "typicons" }, - { - "uid": "k7sao112253txym1egnte7822irbyphe", - "css": "eye", - "code": 59412, - "src": "typicons" - }, { "uid": "jqzwo6i8oicjbn049sh2856d8anrqoli", "css": "edit", @@ -315,7 +309,7 @@ { "uid": "4bad23bc52aaddaac37da019e46b6f6b", "css": "discord_", - "code": 59485, + "code": 59406, "src": "custom_icons", "selected": true, "svg": { @@ -365,7 +359,7 @@ { "uid": "dd1e5d774d1ced68cb7c439d8ed102f5", "css": "logic", - "code": 59517, + "code": 59412, "src": "custom_icons", "selected": true, "svg": { @@ -379,7 +373,7 @@ { "uid": "d0ff49daa25603348abe7e3f7c70be56", "css": "distribution", - "code": 59475, + "code": 59415, "src": "custom_icons", "selected": true, "svg": { @@ -393,7 +387,7 @@ { "uid": "47efe0c5ca937e0def7264347af501ed", "css": "hammer", - "code": 59483, + "code": 59419, "src": "custom_icons", "selected": true, "svg": { @@ -407,7 +401,7 @@ { "uid": "b41aaf351112113e5f50cb8b977d6293", "css": "save", - "code": 59495, + "code": 59434, "src": "custom_icons", "selected": true, "svg": { @@ -421,7 +415,7 @@ { "uid": "e67fcdbfc21c4f395a4f78e2a56c5060", "css": "link", - "code": 59496, + "code": 59435, "src": "custom_icons", "selected": true, "svg": { @@ -435,7 +429,7 @@ { "uid": "3679836be9338f58f8a74e4352dc0bdd", "css": "itchio", - "code": 59497, + "code": 59436, "src": "custom_icons", "selected": true, "svg": { @@ -449,7 +443,7 @@ { "uid": "a3f0c795c6e6506c0bf33e4d344676d5", "css": "line", - "code": 59498, + "code": 59437, "src": "custom_icons", "selected": true, "svg": { @@ -463,7 +457,7 @@ { "uid": "f54e291de7ca06c5101bdeb7e81d6b7f", "css": "admin", - "code": 59484, + "code": 59440, "src": "custom_icons", "selected": true, "svg": { @@ -477,7 +471,7 @@ { "uid": "53efee2384cbefdc94210fb1b4972ed6", "css": "spray-1", - "code": 59499, + "code": 59468, "src": "custom_icons", "selected": true, "svg": { @@ -491,7 +485,7 @@ { "uid": "98cdb7c2e72493434efd910db1f62b29", "css": "crafting", - "code": 59486, + "code": 59469, "src": "custom_icons", "selected": true, "svg": { @@ -505,7 +499,7 @@ { "uid": "dc6530e8b375575b7df2040d108e5368", "css": "fill", - "code": 59500, + "code": 59474, "src": "custom_icons", "selected": true, "svg": { @@ -519,7 +513,7 @@ { "uid": "06281408f2d30c261c9129e3f167204f", "css": "defense", - "code": 59487, + "code": 59475, "src": "custom_icons", "selected": true, "svg": { @@ -533,7 +527,7 @@ { "uid": "88103366af75e17d8a3921ee1fb8616c", "css": "paste", - "code": 59501, + "code": 59483, "src": "custom_icons", "selected": true, "svg": { @@ -547,7 +541,7 @@ { "uid": "c0d81c71f616c8324a78c54d994af313", "css": "effect", - "code": 59489, + "code": 59484, "src": "custom_icons", "selected": true, "svg": { @@ -561,7 +555,7 @@ { "uid": "65c4e52c12c9bed7754878f76c4a0acd", "css": "book", - "code": 59502, + "code": 59485, "src": "custom_icons", "selected": true, "svg": { @@ -575,7 +569,7 @@ { "uid": "cee021b830261625d59e49c48a86102c", "css": "liquid", - "code": 59490, + "code": 59486, "src": "custom_icons", "selected": true, "svg": { @@ -589,7 +583,7 @@ { "uid": "afcfe6416bfdb70c40ede7bf666667d9", "css": "host", - "code": 59503, + "code": 59487, "src": "custom_icons", "selected": true, "svg": { @@ -603,7 +597,7 @@ { "uid": "060ea30307b6e6ab4706682853ec9d21", "css": "production", - "code": 59491, + "code": 59489, "src": "custom_icons", "selected": true, "svg": { @@ -617,7 +611,7 @@ { "uid": "32084a9ecd9e7693002b13e274a84240", "css": "exit", - "code": 59504, + "code": 59405, "src": "custom_icons", "selected": true, "svg": { @@ -631,7 +625,7 @@ { "uid": "7ee2f2d80faaf4bce9af14bbb6cf1f07", "css": "mode-pvp", - "code": 59509, + "code": 59420, "src": "custom_icons", "selected": true, "svg": { @@ -645,7 +639,7 @@ { "uid": "bc0f646b936f7dc761ce8efe1201d450", "css": "terrain", - "code": 59505, + "code": 59495, "src": "custom_icons", "selected": true, "svg": { @@ -659,7 +653,7 @@ { "uid": "fca174e630aceac2289d86197d04ac6d", "css": "mode-attack", - "code": 59510, + "code": 59496, "src": "custom_icons", "selected": true, "svg": { @@ -673,7 +667,7 @@ { "uid": "d2dae093c8eaeecb8b86b9b3137d5e59", "css": "refresh-1", - "code": 59507, + "code": 59497, "src": "custom_icons", "selected": true, "svg": { @@ -687,7 +681,7 @@ { "uid": "279c989fcea20393a5b83eb9e598d59a", "css": "none", - "code": 59567, + "code": 59498, "src": "custom_icons", "selected": true, "svg": { @@ -701,7 +695,7 @@ { "uid": "e3b561a775bcb150f6b8ea719a465345", "css": "pencil_", - "code": 59508, + "code": 59499, "src": "custom_icons", "selected": true, "svg": { @@ -715,7 +709,7 @@ { "uid": "8b4d5e8da6aa68188b631aaf252a9e14", "css": "refresh", - "code": 59568, + "code": 59500, "src": "custom_icons", "selected": true, "svg": { @@ -729,7 +723,7 @@ { "uid": "44e902e72564bc6d9a9eb1d174208d35", "css": "mode-survival", - "code": 59511, + "code": 59501, "src": "custom_icons", "selected": true, "svg": { @@ -743,7 +737,7 @@ { "uid": "9e23184b166b551c5fb0bd5ee3a4dc2c", "css": "command-rally", - "code": 59512, + "code": 59502, "src": "custom_icons", "selected": true, "svg": { @@ -757,7 +751,7 @@ { "uid": "5b2609713ca347b272beb0bc5f49c42e", "css": "units", - "code": 59493, + "code": 59503, "src": "custom_icons", "selected": true, "svg": { @@ -771,7 +765,7 @@ { "uid": "de2b09bde33670e3502e3e07b936e098", "css": "command-attack", - "code": 59513, + "code": 59504, "src": "custom_icons", "selected": true, "svg": { @@ -785,7 +779,7 @@ { "uid": "343b1d6c67d1c2bdc279b8df809fb3bf", "css": "trash", - "code": 59506, + "code": 59505, "src": "custom_icons", "selected": true, "svg": { @@ -799,7 +793,7 @@ { "uid": "f82a79ee879412f7ddf7c517c6958d45", "css": "chat", - "code": 59515, + "code": 59506, "src": "custom_icons", "selected": true, "svg": { @@ -813,7 +807,7 @@ { "uid": "1a406c75ee5adac112504cd1baf6d482", "css": "turret", - "code": 59492, + "code": 59507, "src": "custom_icons", "selected": true, "svg": { @@ -827,7 +821,7 @@ { "uid": "559d541ead67649a9658f22b36bc48fc", "css": "players", - "code": 59516, + "code": 59508, "src": "custom_icons", "selected": true, "svg": { @@ -841,7 +835,7 @@ { "uid": "2e574f2316b8b4f840d5680dcad8088b", "css": "editor", - "code": 59573, + "code": 59509, "src": "custom_icons", "selected": true, "svg": { @@ -855,7 +849,7 @@ { "uid": "6e16d3f823a60ce0e9db3a9768668132", "css": "copy", - "code": 59574, + "code": 59510, "src": "custom_icons", "selected": true, "svg": { @@ -869,7 +863,7 @@ { "uid": "295e9560f763400dae5f29abd75c4e39", "css": "tree", - "code": 59474, + "code": 59511, "src": "custom_icons", "selected": true, "svg": { @@ -883,7 +877,7 @@ { "uid": "0581bbd4c54547d8d6721cc122ffe0fa", "css": "lock-open", - "code": 59468, + "code": 59512, "src": "custom_icons", "selected": true, "svg": { @@ -897,7 +891,7 @@ { "uid": "d0203434b5e4cea53499b112743fd675", "css": "pick", - "code": 59434, + "code": 59513, "src": "custom_icons", "selected": true, "svg": { @@ -911,7 +905,7 @@ { "uid": "b04d1002bf24f642a026b8844f0ab4af", "css": "export", - "code": 59435, + "code": 59515, "src": "custom_icons", "selected": true, "svg": { @@ -925,7 +919,7 @@ { "uid": "6636e2512996fa2c2b37b8d9e111d4fe", "css": "download", - "code": 59436, + "code": 59516, "src": "custom_icons", "selected": true, "svg": { @@ -939,7 +933,7 @@ { "uid": "f9895cd70db81922fbd2aa1882f04a03", "css": "upload", - "code": 59437, + "code": 59517, "src": "custom_icons", "selected": true, "svg": { @@ -953,7 +947,7 @@ { "uid": "e8191eedaa10260cef458a2385925cb0", "css": "settings", - "code": 59406, + "code": 59530, "src": "custom_icons", "selected": true, "svg": { @@ -967,7 +961,7 @@ { "uid": "ea0128855a25fc520b78658acfe68693", "css": "spray", - "code": 59569, + "code": 59531, "src": "custom_icons", "selected": true, "svg": { @@ -981,7 +975,7 @@ { "uid": "32b0960726db55c7f26620e15f83acd9", "css": "zoom", - "code": 59415, + "code": 59532, "src": "custom_icons", "selected": true, "svg": { @@ -995,7 +989,7 @@ { "uid": "22856e2f42e364e7e363348542b46062", "css": "power_old", - "code": 59419, + "code": 59533, "src": "custom_icons", "selected": true, "svg": { @@ -1015,7 +1009,7 @@ { "uid": "844ca62d81744d1ca4b59a4763aeca86", "css": "menu", - "code": 59440, + "code": 59534, "src": "custom_icons", "selected": true, "svg": { @@ -1029,7 +1023,7 @@ { "uid": "4b4d5e5ee8884c2f545869496dcb525b", "css": "lock", - "code": 59469, + "code": 59535, "src": "custom_icons", "selected": true, "svg": { @@ -1039,6 +1033,34 @@ "search": [ "lock" ] + }, + { + "uid": "9515bb59fd462b77f0d088978c339778", + "css": "eye", + "code": 59492, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M450 0L400 50 350 100 300 150 250 200 200 250 150 300 100 350 50 400 0 450V550L50 600 100 650 150 700 200 750 250 800 300 850 350 900 400 950 450 1000H550 650 750 850 950 1050 1150L1200 950 1250 900 1300 850 1350 800 1400 750 1450 700 1500 650 1550 600 1600 550V450L1550 400 1500 350 1450 300 1400 250 1350 200 1300 150 1250 100 1200 50 1150 0H1050 950 850 750 650 550ZM650 200H750 850 950L1000 250 1050 300 1100 350 1150 400 1200 450V550L1150 600 1100 650 1050 700 1000 750 950 800H850 750 650L600 750 550 700 500 650 450 600 400 550V450L450 400 500 350 550 300 600 250ZM750 400L700 450V550L750 600H850L900 550V450L850 400Z", + "width": 1600 + }, + "search": [ + "eye" + ] + }, + { + "uid": "fdd7088d0019bb1033df645f01981429", + "css": "eye-off", + "code": 59493, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1041.7 0L1000 41.7 958.3 83.3 916.7 125 875 166.7 833.3 208.3 791.7 250 750 291.7 708.3 333.3 666.7 375 625 416.7 583.3 458.3 541.7 500 500 541.7 458.3 583.3 416.7 625 375 666.7 333.3 708.3 291.7 750 250 791.7 208.3 833.3 166.7 875V958.3L208.3 1000H291.7L333.3 958.3 375 916.7 416.7 875 458.3 833.3 500 791.7 541.7 750 583.3 708.3 625 666.7 666.7 625 708.3 583.3 750 541.7 791.7 500 833.3 458.3 875 416.7 916.7 375 958.3 333.3 1000 291.7 1041.7 250 1083.3 208.3 1125 166.7 1166.7 125V41.7L1125 0ZM375 83.3L333.3 125 291.7 166.7 250 208.3 208.3 250 166.7 291.7 125 333.3 83.3 375 41.7 416.7 0 458.3V541.7L41.7 583.3 83.3 625 125 666.7H208.3L250 625 291.7 583.3 333.3 541.7V458.3L375 416.7 416.7 375 458.3 333.3 500 291.7 541.7 250H625L666.7 208.3 708.3 166.7 750 125 708.3 83.3H625 541.7 458.3ZM1125 333.3L1083.3 375 1041.7 416.7 1000 458.3V541.7L958.3 583.3 916.7 625 875 666.7 833.3 708.3 791.7 750H708.3L666.7 791.7 625 833.3 583.3 875 625 916.7H708.3 791.7 875 958.3L1000 875 1041.7 833.3 1083.3 791.7 1125 750 1166.7 708.3 1208.3 666.7 1250 625 1291.7 583.3 1333.3 541.7V458.3L1291.7 416.7 1250 375 1208.3 333.3Z", + "width": 1333 + }, + "search": [ + "eye-off" + ] } ] } \ No newline at end of file diff --git a/core/assets-raw/icons/eye-off.png b/core/assets-raw/icons/eye-off.png new file mode 100644 index 0000000000..cf304c9f77 Binary files /dev/null and b/core/assets-raw/icons/eye-off.png differ diff --git a/core/assets-raw/icons/eye.png b/core/assets-raw/icons/eye.png new file mode 100644 index 0000000000..1a14383523 Binary files /dev/null and b/core/assets-raw/icons/eye.png differ diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index c85b9086d2..5b4e4b9459 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -189,6 +189,10 @@ servers.local = Local Servers servers.remote = Remote Servers servers.global = Community Servers +servers.showhidden = Show Hidden Servers +server.shown = Shown +server.hidden = Hidden + trace = Trace Player trace.playername = Player name: [accent]{0} trace.ip = IP: [accent]{0} diff --git a/core/assets/fonts/font.woff b/core/assets/fonts/font.woff index cb628c6ab5..d294b8c83a 100644 Binary files a/core/assets/fonts/font.woff and b/core/assets/fonts/font.woff differ diff --git a/core/assets/fonts/icon.ttf b/core/assets/fonts/icon.ttf index c6f00c3daf..c70f8c89cc 100644 Binary files a/core/assets/fonts/icon.ttf and b/core/assets/fonts/icon.ttf differ diff --git a/core/assets/sounds/artillery.mp3 b/core/assets/sounds/artillery.mp3 new file mode 100644 index 0000000000..640b133984 Binary files /dev/null and b/core/assets/sounds/artillery.mp3 differ diff --git a/core/assets/sounds/artillery.ogg b/core/assets/sounds/artillery.ogg deleted file mode 100644 index d9f8b74d75..0000000000 Binary files a/core/assets/sounds/artillery.ogg and /dev/null differ diff --git a/core/assets/sounds/back.mp3 b/core/assets/sounds/back.mp3 new file mode 100644 index 0000000000..dc47bc9ac5 Binary files /dev/null and b/core/assets/sounds/back.mp3 differ diff --git a/core/assets/sounds/back.ogg b/core/assets/sounds/back.ogg deleted file mode 100644 index 381cf83079..0000000000 Binary files a/core/assets/sounds/back.ogg and /dev/null differ diff --git a/core/assets/sounds/bang.mp3 b/core/assets/sounds/bang.mp3 new file mode 100644 index 0000000000..ebe5ffe987 Binary files /dev/null and b/core/assets/sounds/bang.mp3 differ diff --git a/core/assets/sounds/bang.ogg b/core/assets/sounds/bang.ogg deleted file mode 100644 index 29cde62552..0000000000 Binary files a/core/assets/sounds/bang.ogg and /dev/null differ diff --git a/core/assets/sounds/beam.mp3 b/core/assets/sounds/beam.mp3 new file mode 100644 index 0000000000..9d0a0805f0 Binary files /dev/null and b/core/assets/sounds/beam.mp3 differ diff --git a/core/assets/sounds/beam.ogg b/core/assets/sounds/beam.ogg deleted file mode 100644 index 9b39f2363c..0000000000 Binary files a/core/assets/sounds/beam.ogg and /dev/null differ diff --git a/core/assets/sounds/bigshot.mp3 b/core/assets/sounds/bigshot.mp3 new file mode 100644 index 0000000000..eb47fd470e Binary files /dev/null and b/core/assets/sounds/bigshot.mp3 differ diff --git a/core/assets/sounds/bigshot.ogg b/core/assets/sounds/bigshot.ogg deleted file mode 100644 index 3218eec651..0000000000 Binary files a/core/assets/sounds/bigshot.ogg and /dev/null differ diff --git a/core/assets/sounds/boom.mp3 b/core/assets/sounds/boom.mp3 new file mode 100644 index 0000000000..1b12d3bc7b Binary files /dev/null and b/core/assets/sounds/boom.mp3 differ diff --git a/core/assets/sounds/boom.ogg b/core/assets/sounds/boom.ogg deleted file mode 100644 index 19f41d80b2..0000000000 Binary files a/core/assets/sounds/boom.ogg and /dev/null differ diff --git a/core/assets/sounds/break.mp3 b/core/assets/sounds/break.mp3 new file mode 100644 index 0000000000..3abc129cdf Binary files /dev/null and b/core/assets/sounds/break.mp3 differ diff --git a/core/assets/sounds/break.ogg b/core/assets/sounds/break.ogg deleted file mode 100644 index 30ca95aea2..0000000000 Binary files a/core/assets/sounds/break.ogg and /dev/null differ diff --git a/core/assets/sounds/build.mp3 b/core/assets/sounds/build.mp3 new file mode 100644 index 0000000000..3754346c3a Binary files /dev/null and b/core/assets/sounds/build.mp3 differ diff --git a/core/assets/sounds/build.ogg b/core/assets/sounds/build.ogg deleted file mode 100644 index 8235d41eb9..0000000000 Binary files a/core/assets/sounds/build.ogg and /dev/null differ diff --git a/core/assets/sounds/buttonClick.mp3 b/core/assets/sounds/buttonClick.mp3 new file mode 100644 index 0000000000..c9afb61ca6 Binary files /dev/null and b/core/assets/sounds/buttonClick.mp3 differ diff --git a/core/assets/sounds/buttonClick.ogg b/core/assets/sounds/buttonClick.ogg deleted file mode 100644 index 5f225eadcc..0000000000 Binary files a/core/assets/sounds/buttonClick.ogg and /dev/null differ diff --git a/core/assets/sounds/click.mp3 b/core/assets/sounds/click.mp3 new file mode 100644 index 0000000000..ff1a219497 Binary files /dev/null and b/core/assets/sounds/click.mp3 differ diff --git a/core/assets/sounds/click.ogg b/core/assets/sounds/click.ogg deleted file mode 100644 index 4960f9098f..0000000000 Binary files a/core/assets/sounds/click.ogg and /dev/null differ diff --git a/core/assets/sounds/combustion.mp3 b/core/assets/sounds/combustion.mp3 new file mode 100644 index 0000000000..affec20fbc Binary files /dev/null and b/core/assets/sounds/combustion.mp3 differ diff --git a/core/assets/sounds/combustion.ogg b/core/assets/sounds/combustion.ogg deleted file mode 100644 index 6aab153a47..0000000000 Binary files a/core/assets/sounds/combustion.ogg and /dev/null differ diff --git a/core/assets/sounds/conveyor.mp3 b/core/assets/sounds/conveyor.mp3 new file mode 100644 index 0000000000..0d11430a16 Binary files /dev/null and b/core/assets/sounds/conveyor.mp3 differ diff --git a/core/assets/sounds/conveyor.ogg b/core/assets/sounds/conveyor.ogg deleted file mode 100644 index 67576b44a4..0000000000 Binary files a/core/assets/sounds/conveyor.ogg and /dev/null differ diff --git a/core/assets/sounds/corexplode.mp3 b/core/assets/sounds/corexplode.mp3 new file mode 100644 index 0000000000..80b8317f95 Binary files /dev/null and b/core/assets/sounds/corexplode.mp3 differ diff --git a/core/assets/sounds/corexplode.ogg b/core/assets/sounds/corexplode.ogg deleted file mode 100644 index b26ff4a64c..0000000000 Binary files a/core/assets/sounds/corexplode.ogg and /dev/null differ diff --git a/core/assets/sounds/cutter.mp3 b/core/assets/sounds/cutter.mp3 new file mode 100644 index 0000000000..052f8cec95 Binary files /dev/null and b/core/assets/sounds/cutter.mp3 differ diff --git a/core/assets/sounds/cutter.ogg b/core/assets/sounds/cutter.ogg deleted file mode 100644 index 313159006e..0000000000 Binary files a/core/assets/sounds/cutter.ogg and /dev/null differ diff --git a/core/assets/sounds/door.mp3 b/core/assets/sounds/door.mp3 new file mode 100644 index 0000000000..3a1936db22 Binary files /dev/null and b/core/assets/sounds/door.mp3 differ diff --git a/core/assets/sounds/door.ogg b/core/assets/sounds/door.ogg deleted file mode 100644 index 121b3c3037..0000000000 Binary files a/core/assets/sounds/door.ogg and /dev/null differ diff --git a/core/assets/sounds/drill.mp3 b/core/assets/sounds/drill.mp3 new file mode 100644 index 0000000000..784db23ce9 Binary files /dev/null and b/core/assets/sounds/drill.mp3 differ diff --git a/core/assets/sounds/drill.ogg b/core/assets/sounds/drill.ogg deleted file mode 100644 index f21898b646..0000000000 Binary files a/core/assets/sounds/drill.ogg and /dev/null differ diff --git a/core/assets/sounds/explosion.mp3 b/core/assets/sounds/explosion.mp3 new file mode 100644 index 0000000000..65a122307b Binary files /dev/null and b/core/assets/sounds/explosion.mp3 differ diff --git a/core/assets/sounds/explosion.ogg b/core/assets/sounds/explosion.ogg deleted file mode 100644 index 5f4a69281d..0000000000 Binary files a/core/assets/sounds/explosion.ogg and /dev/null differ diff --git a/core/assets/sounds/explosionbig.mp3 b/core/assets/sounds/explosionbig.mp3 new file mode 100644 index 0000000000..869079ea61 Binary files /dev/null and b/core/assets/sounds/explosionbig.mp3 differ diff --git a/core/assets/sounds/explosionbig.ogg b/core/assets/sounds/explosionbig.ogg deleted file mode 100644 index 30cb7933f0..0000000000 Binary files a/core/assets/sounds/explosionbig.ogg and /dev/null differ diff --git a/core/assets/sounds/fire.mp3 b/core/assets/sounds/fire.mp3 new file mode 100644 index 0000000000..d00468b5c4 Binary files /dev/null and b/core/assets/sounds/fire.mp3 differ diff --git a/core/assets/sounds/fire.ogg b/core/assets/sounds/fire.ogg deleted file mode 100644 index 0201ee8ea4..0000000000 Binary files a/core/assets/sounds/fire.ogg and /dev/null differ diff --git a/core/assets/sounds/flame.mp3 b/core/assets/sounds/flame.mp3 new file mode 100644 index 0000000000..e1ffbb0c10 Binary files /dev/null and b/core/assets/sounds/flame.mp3 differ diff --git a/core/assets/sounds/flame.ogg b/core/assets/sounds/flame.ogg deleted file mode 100644 index ef203e0524..0000000000 Binary files a/core/assets/sounds/flame.ogg and /dev/null differ diff --git a/core/assets/sounds/flame2.mp3 b/core/assets/sounds/flame2.mp3 new file mode 100644 index 0000000000..6e61ef2d9c Binary files /dev/null and b/core/assets/sounds/flame2.mp3 differ diff --git a/core/assets/sounds/flame2.ogg b/core/assets/sounds/flame2.ogg deleted file mode 100644 index 812774a6e6..0000000000 Binary files a/core/assets/sounds/flame2.ogg and /dev/null differ diff --git a/core/assets/sounds/grinding.mp3 b/core/assets/sounds/grinding.mp3 new file mode 100644 index 0000000000..102e0b462e Binary files /dev/null and b/core/assets/sounds/grinding.mp3 differ diff --git a/core/assets/sounds/grinding.ogg b/core/assets/sounds/grinding.ogg deleted file mode 100644 index f78d2c4e67..0000000000 Binary files a/core/assets/sounds/grinding.ogg and /dev/null differ diff --git a/core/assets/sounds/hum.mp3 b/core/assets/sounds/hum.mp3 new file mode 100644 index 0000000000..55d477dca5 Binary files /dev/null and b/core/assets/sounds/hum.mp3 differ diff --git a/core/assets/sounds/hum.ogg b/core/assets/sounds/hum.ogg deleted file mode 100644 index 184504f3dd..0000000000 Binary files a/core/assets/sounds/hum.ogg and /dev/null differ diff --git a/core/assets/sounds/laser.mp3 b/core/assets/sounds/laser.mp3 new file mode 100644 index 0000000000..63decc2696 Binary files /dev/null and b/core/assets/sounds/laser.mp3 differ diff --git a/core/assets/sounds/laser.ogg b/core/assets/sounds/laser.ogg deleted file mode 100644 index 3a727c5053..0000000000 Binary files a/core/assets/sounds/laser.ogg and /dev/null differ diff --git a/core/assets/sounds/laserbig.mp3 b/core/assets/sounds/laserbig.mp3 new file mode 100644 index 0000000000..a95bf7908d Binary files /dev/null and b/core/assets/sounds/laserbig.mp3 differ diff --git a/core/assets/sounds/laserbig.ogg b/core/assets/sounds/laserbig.ogg deleted file mode 100644 index 4aa6658cf6..0000000000 Binary files a/core/assets/sounds/laserbig.ogg and /dev/null differ diff --git a/core/assets/sounds/laserblast.mp3 b/core/assets/sounds/laserblast.mp3 new file mode 100644 index 0000000000..a19fdf379d Binary files /dev/null and b/core/assets/sounds/laserblast.mp3 differ diff --git a/core/assets/sounds/laserblast.ogg b/core/assets/sounds/laserblast.ogg deleted file mode 100644 index 6df3b14284..0000000000 Binary files a/core/assets/sounds/laserblast.ogg and /dev/null differ diff --git a/core/assets/sounds/lasercharge.mp3 b/core/assets/sounds/lasercharge.mp3 new file mode 100644 index 0000000000..5f325c8e99 Binary files /dev/null and b/core/assets/sounds/lasercharge.mp3 differ diff --git a/core/assets/sounds/lasercharge.ogg b/core/assets/sounds/lasercharge.ogg deleted file mode 100644 index 7e50df3661..0000000000 Binary files a/core/assets/sounds/lasercharge.ogg and /dev/null differ diff --git a/core/assets/sounds/lasercharge2.mp3 b/core/assets/sounds/lasercharge2.mp3 new file mode 100644 index 0000000000..ae31defa98 Binary files /dev/null and b/core/assets/sounds/lasercharge2.mp3 differ diff --git a/core/assets/sounds/lasercharge2.ogg b/core/assets/sounds/lasercharge2.ogg deleted file mode 100644 index 2a737e5f63..0000000000 Binary files a/core/assets/sounds/lasercharge2.ogg and /dev/null differ diff --git a/core/assets/sounds/lasershoot.mp3 b/core/assets/sounds/lasershoot.mp3 new file mode 100644 index 0000000000..a63664ac3d Binary files /dev/null and b/core/assets/sounds/lasershoot.mp3 differ diff --git a/core/assets/sounds/lasershoot.ogg b/core/assets/sounds/lasershoot.ogg deleted file mode 100644 index d25c17a4cb..0000000000 Binary files a/core/assets/sounds/lasershoot.ogg and /dev/null differ diff --git a/core/assets/sounds/machine.mp3 b/core/assets/sounds/machine.mp3 new file mode 100644 index 0000000000..a30f8672b2 Binary files /dev/null and b/core/assets/sounds/machine.mp3 differ diff --git a/core/assets/sounds/machine.ogg b/core/assets/sounds/machine.ogg deleted file mode 100644 index 42429721a0..0000000000 Binary files a/core/assets/sounds/machine.ogg and /dev/null differ diff --git a/core/assets/sounds/message.mp3 b/core/assets/sounds/message.mp3 new file mode 100644 index 0000000000..63d436e806 Binary files /dev/null and b/core/assets/sounds/message.mp3 differ diff --git a/core/assets/sounds/message.ogg b/core/assets/sounds/message.ogg deleted file mode 100644 index 2db223d24e..0000000000 Binary files a/core/assets/sounds/message.ogg and /dev/null differ diff --git a/core/assets/sounds/minebeam.mp3 b/core/assets/sounds/minebeam.mp3 new file mode 100644 index 0000000000..dceaca8b6a Binary files /dev/null and b/core/assets/sounds/minebeam.mp3 differ diff --git a/core/assets/sounds/minebeam.ogg b/core/assets/sounds/minebeam.ogg deleted file mode 100644 index 27f75a8531..0000000000 Binary files a/core/assets/sounds/minebeam.ogg and /dev/null differ diff --git a/core/assets/sounds/missile.mp3 b/core/assets/sounds/missile.mp3 new file mode 100644 index 0000000000..45b3a6519d Binary files /dev/null and b/core/assets/sounds/missile.mp3 differ diff --git a/core/assets/sounds/missile.ogg b/core/assets/sounds/missile.ogg deleted file mode 100644 index eb13976d87..0000000000 Binary files a/core/assets/sounds/missile.ogg and /dev/null differ diff --git a/core/assets/sounds/mud.mp3 b/core/assets/sounds/mud.mp3 new file mode 100644 index 0000000000..73d726b53f Binary files /dev/null and b/core/assets/sounds/mud.mp3 differ diff --git a/core/assets/sounds/mud.ogg b/core/assets/sounds/mud.ogg deleted file mode 100644 index 8eb75cb67e..0000000000 Binary files a/core/assets/sounds/mud.ogg and /dev/null differ diff --git a/core/assets/sounds/pew.mp3 b/core/assets/sounds/pew.mp3 new file mode 100644 index 0000000000..5e70e5e7a1 Binary files /dev/null and b/core/assets/sounds/pew.mp3 differ diff --git a/core/assets/sounds/pew.ogg b/core/assets/sounds/pew.ogg deleted file mode 100644 index 6a15b963e3..0000000000 Binary files a/core/assets/sounds/pew.ogg and /dev/null differ diff --git a/core/assets/sounds/pew_.mp3 b/core/assets/sounds/pew_.mp3 new file mode 100644 index 0000000000..d7e610f4a6 Binary files /dev/null and b/core/assets/sounds/pew_.mp3 differ diff --git a/core/assets/sounds/pew_.ogg b/core/assets/sounds/pew_.ogg deleted file mode 100644 index 0c1df7f711..0000000000 Binary files a/core/assets/sounds/pew_.ogg and /dev/null differ diff --git a/core/assets/sounds/place.mp3 b/core/assets/sounds/place.mp3 new file mode 100644 index 0000000000..6cae487e8e Binary files /dev/null and b/core/assets/sounds/place.mp3 differ diff --git a/core/assets/sounds/place.ogg b/core/assets/sounds/place.ogg deleted file mode 100644 index ff1d05c211..0000000000 Binary files a/core/assets/sounds/place.ogg and /dev/null differ diff --git a/core/assets/sounds/press.mp3 b/core/assets/sounds/press.mp3 new file mode 100644 index 0000000000..871d9cd07c Binary files /dev/null and b/core/assets/sounds/press.mp3 differ diff --git a/core/assets/sounds/press.ogg b/core/assets/sounds/press.ogg deleted file mode 100644 index 7085dc00a0..0000000000 Binary files a/core/assets/sounds/press.ogg and /dev/null differ diff --git a/core/assets/sounds/pulse.mp3 b/core/assets/sounds/pulse.mp3 new file mode 100644 index 0000000000..fdc28e2517 Binary files /dev/null and b/core/assets/sounds/pulse.mp3 differ diff --git a/core/assets/sounds/pulse.ogg b/core/assets/sounds/pulse.ogg deleted file mode 100644 index 6c135c8a07..0000000000 Binary files a/core/assets/sounds/pulse.ogg and /dev/null differ diff --git a/core/assets/sounds/railgun.mp3 b/core/assets/sounds/railgun.mp3 new file mode 100644 index 0000000000..813f4f17cf Binary files /dev/null and b/core/assets/sounds/railgun.mp3 differ diff --git a/core/assets/sounds/railgun.ogg b/core/assets/sounds/railgun.ogg deleted file mode 100644 index d8de298916..0000000000 Binary files a/core/assets/sounds/railgun.ogg and /dev/null differ diff --git a/core/assets/sounds/rain.mp3 b/core/assets/sounds/rain.mp3 new file mode 100644 index 0000000000..35ce7f2554 Binary files /dev/null and b/core/assets/sounds/rain.mp3 differ diff --git a/core/assets/sounds/rain.ogg b/core/assets/sounds/rain.ogg deleted file mode 100644 index ecf90ea73d..0000000000 Binary files a/core/assets/sounds/rain.ogg and /dev/null differ diff --git a/core/assets/sounds/release.mp3 b/core/assets/sounds/release.mp3 new file mode 100644 index 0000000000..e2941e1485 Binary files /dev/null and b/core/assets/sounds/release.mp3 differ diff --git a/core/assets/sounds/release.ogg b/core/assets/sounds/release.ogg deleted file mode 100644 index 89efd2ca2e..0000000000 Binary files a/core/assets/sounds/release.ogg and /dev/null differ diff --git a/core/assets/sounds/respawn.mp3 b/core/assets/sounds/respawn.mp3 new file mode 100644 index 0000000000..b26350b487 Binary files /dev/null and b/core/assets/sounds/respawn.mp3 differ diff --git a/core/assets/sounds/respawn.ogg b/core/assets/sounds/respawn.ogg deleted file mode 100644 index b194989ebf..0000000000 Binary files a/core/assets/sounds/respawn.ogg and /dev/null differ diff --git a/core/assets/sounds/respawning.mp3 b/core/assets/sounds/respawning.mp3 new file mode 100644 index 0000000000..b4ec328980 Binary files /dev/null and b/core/assets/sounds/respawning.mp3 differ diff --git a/core/assets/sounds/respawning.ogg b/core/assets/sounds/respawning.ogg deleted file mode 100644 index cc0e4332f8..0000000000 Binary files a/core/assets/sounds/respawning.ogg and /dev/null differ diff --git a/core/assets/sounds/sap.mp3 b/core/assets/sounds/sap.mp3 new file mode 100644 index 0000000000..3469e73b5f Binary files /dev/null and b/core/assets/sounds/sap.mp3 differ diff --git a/core/assets/sounds/sap.ogg b/core/assets/sounds/sap.ogg deleted file mode 100644 index d84c282d02..0000000000 Binary files a/core/assets/sounds/sap.ogg and /dev/null differ diff --git a/core/assets/sounds/shield.mp3 b/core/assets/sounds/shield.mp3 new file mode 100644 index 0000000000..560a8b181e Binary files /dev/null and b/core/assets/sounds/shield.mp3 differ diff --git a/core/assets/sounds/shield.ogg b/core/assets/sounds/shield.ogg deleted file mode 100644 index b427a07286..0000000000 Binary files a/core/assets/sounds/shield.ogg and /dev/null differ diff --git a/core/assets/sounds/shoot.mp3 b/core/assets/sounds/shoot.mp3 new file mode 100644 index 0000000000..c026c002ed Binary files /dev/null and b/core/assets/sounds/shoot.mp3 differ diff --git a/core/assets/sounds/shoot.ogg b/core/assets/sounds/shoot.ogg deleted file mode 100644 index d4b1c791c6..0000000000 Binary files a/core/assets/sounds/shoot.ogg and /dev/null differ diff --git a/core/assets/sounds/shootBig.mp3 b/core/assets/sounds/shootBig.mp3 new file mode 100644 index 0000000000..2164a6c1d4 Binary files /dev/null and b/core/assets/sounds/shootBig.mp3 differ diff --git a/core/assets/sounds/shootBig.ogg b/core/assets/sounds/shootBig.ogg deleted file mode 100644 index 9bc3bf055d..0000000000 Binary files a/core/assets/sounds/shootBig.ogg and /dev/null differ diff --git a/core/assets/sounds/shootSnap.mp3 b/core/assets/sounds/shootSnap.mp3 new file mode 100644 index 0000000000..0b66067f98 Binary files /dev/null and b/core/assets/sounds/shootSnap.mp3 differ diff --git a/core/assets/sounds/shootSnap.ogg b/core/assets/sounds/shootSnap.ogg deleted file mode 100644 index 17826bb5c0..0000000000 Binary files a/core/assets/sounds/shootSnap.ogg and /dev/null differ diff --git a/core/assets/sounds/shotgun.mp3 b/core/assets/sounds/shotgun.mp3 new file mode 100644 index 0000000000..3cd876ec0e Binary files /dev/null and b/core/assets/sounds/shotgun.mp3 differ diff --git a/core/assets/sounds/shotgun.ogg b/core/assets/sounds/shotgun.ogg deleted file mode 100644 index 47d5213579..0000000000 Binary files a/core/assets/sounds/shotgun.ogg and /dev/null differ diff --git a/core/assets/sounds/smelter.mp3 b/core/assets/sounds/smelter.mp3 new file mode 100644 index 0000000000..b902624932 Binary files /dev/null and b/core/assets/sounds/smelter.mp3 differ diff --git a/core/assets/sounds/smelter.ogg b/core/assets/sounds/smelter.ogg deleted file mode 100644 index 86bbaf63de..0000000000 Binary files a/core/assets/sounds/smelter.ogg and /dev/null differ diff --git a/core/assets/sounds/spark.mp3 b/core/assets/sounds/spark.mp3 new file mode 100644 index 0000000000..bf30b670a6 Binary files /dev/null and b/core/assets/sounds/spark.mp3 differ diff --git a/core/assets/sounds/spark.ogg b/core/assets/sounds/spark.ogg deleted file mode 100644 index ac61a476de..0000000000 Binary files a/core/assets/sounds/spark.ogg and /dev/null differ diff --git a/core/assets/sounds/splash.mp3 b/core/assets/sounds/splash.mp3 new file mode 100644 index 0000000000..69b79e154d Binary files /dev/null and b/core/assets/sounds/splash.mp3 differ diff --git a/core/assets/sounds/splash.ogg b/core/assets/sounds/splash.ogg deleted file mode 100644 index 59a77836c4..0000000000 Binary files a/core/assets/sounds/splash.ogg and /dev/null differ diff --git a/core/assets/sounds/spray.mp3 b/core/assets/sounds/spray.mp3 new file mode 100644 index 0000000000..f8e01f3690 Binary files /dev/null and b/core/assets/sounds/spray.mp3 differ diff --git a/core/assets/sounds/spray.ogg b/core/assets/sounds/spray.ogg deleted file mode 100644 index 0e7860ad43..0000000000 Binary files a/core/assets/sounds/spray.ogg and /dev/null differ diff --git a/core/assets/sounds/steam.mp3 b/core/assets/sounds/steam.mp3 new file mode 100644 index 0000000000..3e19d755b5 Binary files /dev/null and b/core/assets/sounds/steam.mp3 differ diff --git a/core/assets/sounds/steam.ogg b/core/assets/sounds/steam.ogg deleted file mode 100644 index 9b65bac938..0000000000 Binary files a/core/assets/sounds/steam.ogg and /dev/null differ diff --git a/core/assets/sounds/swish.mp3 b/core/assets/sounds/swish.mp3 new file mode 100644 index 0000000000..5d29b3c422 Binary files /dev/null and b/core/assets/sounds/swish.mp3 differ diff --git a/core/assets/sounds/swish.ogg b/core/assets/sounds/swish.ogg deleted file mode 100644 index 4b6e5eec53..0000000000 Binary files a/core/assets/sounds/swish.ogg and /dev/null differ diff --git a/core/assets/sounds/techloop.mp3 b/core/assets/sounds/techloop.mp3 new file mode 100644 index 0000000000..d52ef2b73d Binary files /dev/null and b/core/assets/sounds/techloop.mp3 differ diff --git a/core/assets/sounds/techloop.ogg b/core/assets/sounds/techloop.ogg deleted file mode 100644 index 125ac36718..0000000000 Binary files a/core/assets/sounds/techloop.ogg and /dev/null differ diff --git a/core/assets/sounds/thruster.mp3 b/core/assets/sounds/thruster.mp3 new file mode 100644 index 0000000000..059711d30b Binary files /dev/null and b/core/assets/sounds/thruster.mp3 differ diff --git a/core/assets/sounds/thruster.ogg b/core/assets/sounds/thruster.ogg deleted file mode 100644 index cba59f95ab..0000000000 Binary files a/core/assets/sounds/thruster.ogg and /dev/null differ diff --git a/core/assets/sounds/tractorbeam.mp3 b/core/assets/sounds/tractorbeam.mp3 new file mode 100644 index 0000000000..cdf60a0a48 Binary files /dev/null and b/core/assets/sounds/tractorbeam.mp3 differ diff --git a/core/assets/sounds/tractorbeam.ogg b/core/assets/sounds/tractorbeam.ogg deleted file mode 100644 index 4c307c4e08..0000000000 Binary files a/core/assets/sounds/tractorbeam.ogg and /dev/null differ diff --git a/core/assets/sounds/unlock.mp3 b/core/assets/sounds/unlock.mp3 new file mode 100644 index 0000000000..7549ce044e Binary files /dev/null and b/core/assets/sounds/unlock.mp3 differ diff --git a/core/assets/sounds/unlock.ogg b/core/assets/sounds/unlock.ogg deleted file mode 100644 index 7149b695be..0000000000 Binary files a/core/assets/sounds/unlock.ogg and /dev/null differ diff --git a/core/assets/sounds/wave.mp3 b/core/assets/sounds/wave.mp3 new file mode 100644 index 0000000000..2b6819ce92 Binary files /dev/null and b/core/assets/sounds/wave.mp3 differ diff --git a/core/assets/sounds/wave.ogg b/core/assets/sounds/wave.ogg deleted file mode 100644 index bf74702474..0000000000 Binary files a/core/assets/sounds/wave.ogg and /dev/null differ diff --git a/core/assets/sounds/wind.mp3 b/core/assets/sounds/wind.mp3 new file mode 100644 index 0000000000..9328f354b4 Binary files /dev/null and b/core/assets/sounds/wind.mp3 differ diff --git a/core/assets/sounds/wind.ogg b/core/assets/sounds/wind.ogg deleted file mode 100644 index aeabe4802b..0000000000 Binary files a/core/assets/sounds/wind.ogg and /dev/null differ diff --git a/core/assets/sounds/wind2.mp3 b/core/assets/sounds/wind2.mp3 new file mode 100644 index 0000000000..7b7381b900 Binary files /dev/null and b/core/assets/sounds/wind2.mp3 differ diff --git a/core/assets/sounds/wind2.ogg b/core/assets/sounds/wind2.ogg deleted file mode 100644 index 3900ba35a1..0000000000 Binary files a/core/assets/sounds/wind2.ogg and /dev/null differ diff --git a/core/assets/sounds/windhowl.mp3 b/core/assets/sounds/windhowl.mp3 new file mode 100644 index 0000000000..aa67453a7b Binary files /dev/null and b/core/assets/sounds/windhowl.mp3 differ diff --git a/core/assets/sounds/windhowl.ogg b/core/assets/sounds/windhowl.ogg deleted file mode 100644 index de7526a616..0000000000 Binary files a/core/assets/sounds/windhowl.ogg and /dev/null differ diff --git a/core/assets/sounds/windowHide.mp3 b/core/assets/sounds/windowHide.mp3 new file mode 100644 index 0000000000..6778aa0e8a Binary files /dev/null and b/core/assets/sounds/windowHide.mp3 differ diff --git a/core/assets/sounds/windowHide.ogg b/core/assets/sounds/windowHide.ogg deleted file mode 100644 index 9039d4e3b4..0000000000 Binary files a/core/assets/sounds/windowHide.ogg and /dev/null differ diff --git a/core/src/mindustry/audio/LoopControl.java b/core/src/mindustry/audio/LoopControl.java index 56f06d9e1b..2419406176 100644 --- a/core/src/mindustry/audio/LoopControl.java +++ b/core/src/mindustry/audio/LoopControl.java @@ -41,7 +41,7 @@ public class LoopControl{ data.soundID = -1; return; } - sound.setPan(data.soundID, pan, data.curVolume); + sound.set(data.soundID, pan, data.curVolume); } data.volume = 0f; diff --git a/core/src/mindustry/audio/SoundLoop.java b/core/src/mindustry/audio/SoundLoop.java index 4db5530cfd..59e831b3e0 100644 --- a/core/src/mindustry/audio/SoundLoop.java +++ b/core/src/mindustry/audio/SoundLoop.java @@ -37,7 +37,7 @@ public class SoundLoop{ } } - sound.setPan(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume); + sound.set(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume); } } diff --git a/core/src/mindustry/mod/ModLoadingSound.java b/core/src/mindustry/mod/ModLoadingSound.java index 543b75c154..a876c25f68 100644 --- a/core/src/mindustry/mod/ModLoadingSound.java +++ b/core/src/mindustry/mod/ModLoadingSound.java @@ -123,8 +123,8 @@ public class ModLoadingSound implements Sound{ } @Override - public void setPan(int soundId, float pan, float volume){ - sound.setPan(soundId, pan, volume); + public void set(int soundId, float pan, float volume){ + sound.set(soundId, pan, volume); } @Override diff --git a/core/src/mindustry/net/ServerGroup.java b/core/src/mindustry/net/ServerGroup.java index 2afb60dbf6..15bd8fa4d3 100644 --- a/core/src/mindustry/net/ServerGroup.java +++ b/core/src/mindustry/net/ServerGroup.java @@ -1,5 +1,7 @@ package mindustry.net; +import arc.*; + public class ServerGroup{ public String name; public String[] addresses; @@ -11,4 +13,16 @@ public class ServerGroup{ public ServerGroup(){ } + + public boolean hidden(){ + return Core.settings.getBool(key() + "-hidden", false); + } + + public void setHidden(boolean hidden){ + Core.settings.put(key() + "-hidden", hidden); + } + + String key(){ + return "server-" + (name.isEmpty() ? addresses.length == 0 ? "" : addresses[0] : name); + } } diff --git a/core/src/mindustry/ui/Styles.java b/core/src/mindustry/ui/Styles.java index 802a18004b..385d2aa81a 100644 --- a/core/src/mindustry/ui/Styles.java +++ b/core/src/mindustry/ui/Styles.java @@ -27,7 +27,7 @@ public class Styles{ public static Drawable black, black9, black8, black6, black3, black5, none, flatDown, flatOver; public static ButtonStyle defaultb, waveb; public static TextButtonStyle defaultt, squaret, nodet, cleart, discordt, infot, clearPartialt, clearTogglet, clearToggleMenut, togglet, transt, fullTogglet, logict; - public static ImageButtonStyle defaulti, nodei, righti, emptyi, emptytogglei, selecti, logici, geni, colori, cleari, clearFulli, clearPartiali, clearPartial2i, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali; + public static ImageButtonStyle defaulti, nodei, righti, emptyi, emptytogglei, selecti, logici, geni, colori, accenti, cleari, clearFulli, clearPartiali, clearPartial2i, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali; public static ScrollPaneStyle defaultPane, horizontalPane, smallPane; public static KeybindDialogStyle defaultKeybindDialog; public static SliderStyle defaultSlider, vSlider; @@ -213,6 +213,11 @@ public class Styles{ //imageDownColor = Pal.accent; imageUpColor = Color.white; }}; + accenti = new ImageButtonStyle(){{ + //imageDownColor = Pal.accent; + imageUpColor = Color.lightGray; + imageDownColor = Color.white; + }}; cleari = new ImageButtonStyle(){{ down = flatOver; up = black; diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index a400f9f3b0..24bc1718b4 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -31,6 +31,7 @@ public class JoinDialog extends BaseDialog{ Table hosts = new Table(); int totalHosts; int refreshes; + boolean showHidden; public JoinDialog(){ super("@joingame"); @@ -252,9 +253,9 @@ public class JoinDialog extends BaseDialog{ hosts.clear(); - section("@servers.local", local); - section("@servers.remote", remote); - section("@servers.global", global); + section("@servers.local", local, false); + section("@servers.remote", remote, false); + section("@servers.global", global, true); ScrollPane pane = new ScrollPane(hosts); pane.setFadeScrollBars(false); @@ -302,12 +303,21 @@ public class JoinDialog extends BaseDialog{ }); } - void section(String label, Table servers){ + void section(String label, Table servers, boolean eye){ Collapser coll = new Collapser(servers, Core.settings.getBool("collapsed-" + label, false)); coll.setDuration(0.1f); hosts.table(name -> { name.add(label).pad(10).growX().left().color(Pal.accent); + + if(eye){ + name.button(Icon.eyeSmall, Styles.emptyi, () -> { + showHidden = !showHidden; + refreshGlobal(); + }).update(i -> i.getStyle().imageUp = (showHidden ? Icon.eyeSmall : Icon.eyeOffSmall)) + .size(40f).right().padRight(3).tooltip("@servers.showhidden"); + } + name.button(Icon.downOpen, Styles.emptyi, () -> { coll.toggle(false); Core.settings.put("collapsed-" + label, coll.isCollapsed()); @@ -335,15 +345,41 @@ public class JoinDialog extends BaseDialog{ global.clear(); global.background(null); for(ServerGroup group : defaultServers){ + boolean hidden = group.hidden(); + if(hidden && !showHidden){ + continue; + } + //table containing all groups global.table(g -> { - //TODO groups for(String address : group.addresses){ String resaddress = address.contains(":") ? address.split(":")[0] : address; int resport = address.contains(":") ? Strings.parseInt(address.split(":")[1]) : port; net.pingHost(resaddress, resport, res -> { if(refreshes != cur) return; res.port = resport; + + //add header + if(g.getChildren().isEmpty()){ + g.table(head -> { + if(!group.name.isEmpty()){ + head.add(group.name).color(Color.lightGray).padRight(4); + } + head.image().height(3f).growX().color(Color.lightGray); + + //button for showing/hiding servers + ImageButton[] image = {null}; + image[0] = head.button(hidden ? Icon.eyeOffSmall : Icon.eyeSmall, Styles.accenti, () -> { + group.setHidden(!group.hidden()); + image[0].getStyle().imageUp = group.hidden() ? Icon.eyeOffSmall : Icon.eyeSmall; + if(group.hidden() && !showHidden){ + g.remove(); + } + }).size(40f).get(); + image[0].addListener(new Tooltip(t -> t.background(Styles.black6).margin(4).label(() -> !group.hidden() ? "@server.shown" : "@server.hidden"))); + }).width(targetWidth()).padBottom(5).row(); + } + addGlobalHost(res, g); g.margin(5f); @@ -442,6 +478,7 @@ public class JoinDialog extends BaseDialog{ //get servers Core.net.httpGet(becontrol.active() ? serverJsonBeURL : serverJsonV6URL, result -> { try{ + Jval val = Jval.read(result.getResultAsString()); Core.app.post(() -> { try{ @@ -449,10 +486,10 @@ public class JoinDialog extends BaseDialog{ val.asArray().each(child -> { String name = child.getString("name", ""); String[] addresses; - if(child.has("addresses")){ - addresses = child.get("addresses").asArray().map(Jval::asString).toArray(String.class); + if(child.has("addresses") || (child.has("address") && child.get("address").isArray())){ + addresses = (child.has("addresses") ? child.get("addresses") : child.get("address")).asArray().map(Jval::asString).toArray(String.class); }else{ - addresses = new String[]{child.getString("addresses", "")}; + addresses = new String[]{child.getString("address", "")}; } defaultServers.add(new ServerGroup(name, addresses)); }); @@ -462,7 +499,7 @@ public class JoinDialog extends BaseDialog{ } }); }catch(Throwable e){ - Log.err("Failed to fetch community servers."); + Log.err("Failed to fetch communitycommunity servers."); } }, t -> {}); } diff --git a/gradle.properties b/gradle.properties index 74f8398b48..5c29050c40 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=3919455d82ac008743cf6794593b3379f9758a38 +archash=e32646ee7cc0423e31eed9ab15dceac555f677ce