Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c53474479 | ||
|
|
10e9655a43 | ||
|
|
13ad318ad9 | ||
|
|
4aa78c6a11 | ||
|
|
f34ddc8d9b | ||
|
|
59fb89c243 | ||
|
|
e5202a8f92 | ||
|
|
5ddff4ce22 | ||
|
|
1ae0f6171b | ||
|
|
550bc0c311 | ||
|
|
ca04662341 | ||
|
|
a3682756dc | ||
|
|
4f52ec4846 | ||
|
|
b26685f05e | ||
|
|
a6743e8217 | ||
|
|
0580e1afbb | ||
|
|
d8e94923d6 | ||
|
|
b1d40fb039 | ||
|
|
dc0ced3ca3 | ||
|
|
f6266db2bc | ||
|
|
f5b2b81c21 | ||
|
|
50c40be5e2 |
@@ -3,7 +3,6 @@ buildscript{
|
|||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ buildscript{
|
|||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
||||||
maven{ url 'https://jitpack.io' }
|
maven{ url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,8 +180,7 @@ allprojects{
|
|||||||
repositories{
|
repositories{
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
maven{ url "https://central.sonatype.com/repository/maven-snapshots" }
|
||||||
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
|
|
||||||
maven{ url 'https://jitpack.io' }
|
maven{ url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,6 +244,8 @@ project(":desktop"){
|
|||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation arcModule("extensions:profiling")
|
implementation arcModule("extensions:profiling")
|
||||||
implementation arcModule("extensions:discord")
|
implementation arcModule("extensions:discord")
|
||||||
|
implementation arcModule("natives:natives-filedialogs")
|
||||||
|
implementation arcModule("extensions:filedialogs")
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
|
|
||||||
|
|||||||
@@ -354,11 +354,6 @@ save.mode = Gamemode: {0}
|
|||||||
save.date = Last Saved: {0}
|
save.date = Last Saved: {0}
|
||||||
save.playtime = Playtime: {0}
|
save.playtime = Playtime: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\n\
|
|
||||||
As newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\n\
|
|
||||||
Please upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\n\
|
|
||||||
If you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Warning.
|
warning = Warning.
|
||||||
confirm = Confirm
|
confirm = Confirm
|
||||||
delete = Delete
|
delete = Delete
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Рэжым гульні: {0}
|
|||||||
save.date = Апошні запіс: {0}
|
save.date = Апошні запіс: {0}
|
||||||
save.playtime = Час ў гульні: {0}
|
save.playtime = Час ў гульні: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Папярэджанне.
|
warning = Папярэджанне.
|
||||||
confirm = Пацверджанне
|
confirm = Пацверджанне
|
||||||
delete = Выдаліць
|
delete = Выдаліць
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Решим на игра: {0}
|
|||||||
save.date = Последно Записан: {0}
|
save.date = Последно Записан: {0}
|
||||||
save.playtime = Играно време: {0}
|
save.playtime = Играно време: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Тревога.
|
warning = Тревога.
|
||||||
confirm = Потвърди
|
confirm = Потвърди
|
||||||
delete = Изтрий
|
delete = Изтрий
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Mode de joc: {0}
|
|||||||
save.date = Data de l’última desada: {0}
|
save.date = Data de l’última desada: {0}
|
||||||
save.playtime = Temps de joc: {0}
|
save.playtime = Temps de joc: {0}
|
||||||
dontshowagain = No ho mostris més
|
dontshowagain = No ho mostris més
|
||||||
warn.32bit.title = Avís d’obsolescència dels 32 bits
|
|
||||||
warn.32bit = Feu servir una versió del Mindustry de [red]32 bits[].\nCom que les versions noves de Java ja no suporten les versions de Windows de 32 bits, [red]no es donarà suport per a 32 bits[].\n\nCanvieu a una màquina de 64 bits i assegureu-vos que teniu la versió del Mindustry de 64 bits.\n\nSi executeu el Mindustry com a fitxer JAR, assegureu-vos que feu servir el Java de 64 bits.
|
|
||||||
warning = Avís.
|
warning = Avís.
|
||||||
confirm = Confirmació
|
confirm = Confirmació
|
||||||
delete = Esborra
|
delete = Esborra
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Herní modifikace: {0}
|
|||||||
save.date = Naposledy uloženo: {0}
|
save.date = Naposledy uloženo: {0}
|
||||||
save.playtime = Herní čas: {0}
|
save.playtime = Herní čas: {0}
|
||||||
dontshowagain = Nezobrazovat znovu
|
dontshowagain = Nezobrazovat znovu
|
||||||
warn.32bit.title = Varování ohledně podpory 32 bitových systémů
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Varování.
|
warning = Varování.
|
||||||
confirm = Potvrdit
|
confirm = Potvrdit
|
||||||
delete = Smazat
|
delete = Smazat
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Spil-tilstand: {0}
|
|||||||
save.date = Sidste gem: {0}
|
save.date = Sidste gem: {0}
|
||||||
save.playtime = Spiltid: {0}
|
save.playtime = Spiltid: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Advarsel.
|
warning = Advarsel.
|
||||||
confirm = Bekræft
|
confirm = Bekræft
|
||||||
delete = Slet
|
delete = Slet
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Spielmodus: {0}
|
|||||||
save.date = Zuletzt gespeichert: {0}
|
save.date = Zuletzt gespeichert: {0}
|
||||||
save.playtime = Spielzeit: {0}
|
save.playtime = Spielzeit: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Warnung
|
warning = Warnung
|
||||||
confirm = Bestätigen
|
confirm = Bestätigen
|
||||||
delete = Löschen
|
delete = Löschen
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Modo de juego: {0}
|
|||||||
save.date = Último guardado: {0}
|
save.date = Último guardado: {0}
|
||||||
save.playtime = Tiempo de juego: {0}
|
save.playtime = Tiempo de juego: {0}
|
||||||
dontshowagain = No mostrar de nuevo
|
dontshowagain = No mostrar de nuevo
|
||||||
warn.32bit.title = Advertencia de obsolencia 32-bit
|
|
||||||
warn.32bit = Estas usando una versión [red]32-bit[] de Mindustry.\nDado que versiones mas nuevas de Java han abandonado el soporte 32-bit para Windows, [red]el soporte 32-bit será discontinuado a futuro[].\n\nPor favor, actualiza a una máquina 64-bit y asegúrate de tener la versión 64-bit de Mindustry descargada.\n\nSi estas ejecutando Mindustry como un JAR, asegúrate de usar Java 64-bit.
|
|
||||||
warning = Aviso.
|
warning = Aviso.
|
||||||
confirm = Confirmar
|
confirm = Confirmar
|
||||||
delete = Borrar
|
delete = Borrar
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Mänguviis: {0}
|
|||||||
save.date = Viimati salvestatud: {0}
|
save.date = Viimati salvestatud: {0}
|
||||||
save.playtime = Mänguaeg: {0}
|
save.playtime = Mänguaeg: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Hoiatus
|
warning = Hoiatus
|
||||||
confirm = Kinnita
|
confirm = Kinnita
|
||||||
delete = Kustuta
|
delete = Kustuta
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Jolas-modua: {0}
|
|||||||
save.date = Azkenekoz gordeta: {0}
|
save.date = Azkenekoz gordeta: {0}
|
||||||
save.playtime = Jolastua: {0}
|
save.playtime = Jolastua: {0}
|
||||||
dontshowagain = Ez erakutsi berriro
|
dontshowagain = Ez erakutsi berriro
|
||||||
warn.32bit.title = 32 biteko deprekuzioaren abisua
|
|
||||||
warn.32bit = [red]32-bit[] eko Mindustry bertsioa erabiltzen zabiltza.\nJavaren bertsio berrienek 32-biteko Windowsen soportea alde batera utzi dutenez, [red]32-biteko bertsioaren soportea ez da eguneratuko etorkizunean[].\n\nMesedez, eguneratu 64 biteko makina batera eta ziurtatu Mindustryren 64 biteko bertsioa deskargatuta duzula.\n\nMindustry exekutatzen ari bazara JAR fitxategi gisa, ziurtatu 64 biteko Java erabiltzen ari zarela.
|
|
||||||
warning = Abisua.
|
warning = Abisua.
|
||||||
confirm = Baieztatu
|
confirm = Baieztatu
|
||||||
delete = Ezabatu
|
delete = Ezabatu
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Pelimuoto: {0}
|
|||||||
save.date = Viimeksi tallennettu: {0}
|
save.date = Viimeksi tallennettu: {0}
|
||||||
save.playtime = Peliaika: {0}
|
save.playtime = Peliaika: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Varoitus.
|
warning = Varoitus.
|
||||||
confirm = Vahvista
|
confirm = Vahvista
|
||||||
delete = Poista
|
delete = Poista
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Gamemode: {0}
|
|||||||
save.date = Last Saved: {0}
|
save.date = Last Saved: {0}
|
||||||
save.playtime = Playtime: {0}
|
save.playtime = Playtime: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Warning.
|
warning = Warning.
|
||||||
confirm = Kumpirmahin
|
confirm = Kumpirmahin
|
||||||
delete = Tanggalin
|
delete = Tanggalin
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Mode de jeu : {0}
|
|||||||
save.date = Dernière sauvegarde : {0}
|
save.date = Dernière sauvegarde : {0}
|
||||||
save.playtime = Temps de jeu : {0}
|
save.playtime = Temps de jeu : {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Avertissement.
|
warning = Avertissement.
|
||||||
confirm = Confirmer
|
confirm = Confirmer
|
||||||
delete = Supprimer
|
delete = Supprimer
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Játékmód: {0}
|
|||||||
save.date = Utolsó mentés: {0}
|
save.date = Utolsó mentés: {0}
|
||||||
save.playtime = Játékidő: {0}
|
save.playtime = Játékidő: {0}
|
||||||
dontshowagain = Ne jelenjen meg többször
|
dontshowagain = Ne jelenjen meg többször
|
||||||
warn.32bit.title = Figyelmeztetés: a 32-bites támogatás meg fog szűnni
|
|
||||||
warn.32bit = A Mindustry [red]32-bites[] verzióját használod.\nMivel az újabb Java-verziók már nem támogatják a 32-bites Windowst, a [red]32-bites támogatás a jövőben meg fog szűnni[].\n\nFrissíts egy 64-bites gépre, és győződj meg arról, hogy a Mindustry 64-bites verzióját töltötted le.\n\nHa JAR-fájlként futtatod a Mindustryt, ellenőrizd, hogy 64-bites Javat használsz.
|
|
||||||
warning = Figyelmeztetés.
|
warning = Figyelmeztetés.
|
||||||
confirm = Megerősítés
|
confirm = Megerősítés
|
||||||
delete = Törlés
|
delete = Törlés
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Mode Permainan: {0}
|
|||||||
save.date = Simpanan Terakhir: {0}
|
save.date = Simpanan Terakhir: {0}
|
||||||
save.playtime = Waktu Bermain: {0}
|
save.playtime = Waktu Bermain: {0}
|
||||||
dontshowagain = Jangan tampilkan lagi
|
dontshowagain = Jangan tampilkan lagi
|
||||||
warn.32bit.title = Peringatan Penghentian Versi 32-bit
|
|
||||||
warn.32bit = Anda menggunakan Mindustry versi [red]32-bit[].\nKarena versi Java yang lebih baru telah menghentikan dukungan Windows 32-bit, dukungan [red]32-bit akan dihentikan pada masa mendatang[].\n\nSilakan tingkatkan ke sistem komputer 64-bit, dan pastikan Anda telah mengunduh Mindustry versi 64-bit.\n\nJika Anda menjalankan Mindustry sebagai berkas JAR, pastikan Anda menggunakan Java 64-bit.
|
|
||||||
warning = Peringatan.
|
warning = Peringatan.
|
||||||
confirm = Konfirmasi
|
confirm = Konfirmasi
|
||||||
delete = Hapus
|
delete = Hapus
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Modalità di Gioco: {0}
|
|||||||
save.date = Ultimo Salvataggio: {0}
|
save.date = Ultimo Salvataggio: {0}
|
||||||
save.playtime = Tempo di Gioco: {0}
|
save.playtime = Tempo di Gioco: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Attenzione
|
warning = Attenzione
|
||||||
confirm = Conferma
|
confirm = Conferma
|
||||||
delete = Elimina
|
delete = Elimina
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = ゲームモード: {0}
|
|||||||
save.date = 最終保存日時: {0}
|
save.date = 最終保存日時: {0}
|
||||||
save.playtime = プレイ時間: {0}
|
save.playtime = プレイ時間: {0}
|
||||||
dontshowagain = 今後表示しない
|
dontshowagain = 今後表示しない
|
||||||
warn.32bit.title = 32ビット非推奨に関する警告
|
|
||||||
warn.32bit = あなたは現在、[red]32ビット[]版のMindustryを使用しています。\n新しいJavaバージョンでは32ビット版Windowsのサポートが終了しているため、[red]32ビット版のサポートは将来的に打ち切られる予定です[]。\n\n64ビット環境のコンピュータへ移行し、Mindustryの64ビット版をダウンロードして使用してください。\n\nMindustryをJARファイルとして実行している場合は、使用しているJavaが64ビット版であることを確認してください。
|
|
||||||
warning = 警告
|
warning = 警告
|
||||||
confirm = 確認
|
confirm = 確認
|
||||||
delete = 削除
|
delete = 削除
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = 게임모드: {0}
|
|||||||
save.date = 마지막 저장일: {0}
|
save.date = 마지막 저장일: {0}
|
||||||
save.playtime = 플레이 시간: {0}
|
save.playtime = 플레이 시간: {0}
|
||||||
dontshowagain = 다시 표시하지 않음
|
dontshowagain = 다시 표시하지 않음
|
||||||
warn.32bit.title = 32-bit 지원 중단 경고
|
|
||||||
warn.32bit = [red]32-bit[] 버전의 Mindustry를 사용하고 있습니다.\n최신 Java 버전에서 32-bit Windows 지원이 중단되었으므로 향후 [red]32-bit 지원이 중단됩니다[].\n\n64-bit 컴퓨터로 업그레이드하고 64-bit 버전의 Mindustry를 다운로드했는지 확인하세요.\n\nMindustry를 JAR 파일로 실행하는 경우 64-bit Java를 사용하고 있는지 확인하세요.
|
|
||||||
warning = 경고
|
warning = 경고
|
||||||
confirm = 확인
|
confirm = 확인
|
||||||
delete = 삭제
|
delete = 삭제
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Žaidimo Režimas: {0}
|
|||||||
save.date = Paskutinis Išsaugojimas: {0}
|
save.date = Paskutinis Išsaugojimas: {0}
|
||||||
save.playtime = Žaidimo laikas: {0}
|
save.playtime = Žaidimo laikas: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Perspėjimas.
|
warning = Perspėjimas.
|
||||||
confirm = Priimti
|
confirm = Priimti
|
||||||
delete = Šalinti
|
delete = Šalinti
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Spelmodus: {0}
|
|||||||
save.date = Laatst bewaard: {0}
|
save.date = Laatst bewaard: {0}
|
||||||
save.playtime = Speeltijd: {0}
|
save.playtime = Speeltijd: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Waarschuwing.
|
warning = Waarschuwing.
|
||||||
confirm = Bevestig
|
confirm = Bevestig
|
||||||
delete = Verwijder
|
delete = Verwijder
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Spelmodus: {0}
|
|||||||
save.date = Laatste save: {0}
|
save.date = Laatste save: {0}
|
||||||
save.playtime = Playtime: {0}
|
save.playtime = Playtime: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Waarschuwing.
|
warning = Waarschuwing.
|
||||||
confirm = Bevestig
|
confirm = Bevestig
|
||||||
delete = Verwijder
|
delete = Verwijder
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Tryb gry: {0}
|
|||||||
save.date = Ostatnio zapisane: {0}
|
save.date = Ostatnio zapisane: {0}
|
||||||
save.playtime = Czas gry: {0}
|
save.playtime = Czas gry: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Uwaga.
|
warning = Uwaga.
|
||||||
confirm = Potwierdź
|
confirm = Potwierdź
|
||||||
delete = Usuń
|
delete = Usuń
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Modo de jogo: {0}
|
|||||||
save.date = Último Salvamento: {0}
|
save.date = Último Salvamento: {0}
|
||||||
save.playtime = Tempo de jogo: {0}
|
save.playtime = Tempo de jogo: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Aviso.
|
warning = Aviso.
|
||||||
confirm = Confirmar
|
confirm = Confirmar
|
||||||
delete = Excluir
|
delete = Excluir
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Modo de jogo: {0}
|
|||||||
save.date = Último save: {0}
|
save.date = Último save: {0}
|
||||||
save.playtime = Tempo de Jogo: {0}
|
save.playtime = Tempo de Jogo: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Aviso.
|
warning = Aviso.
|
||||||
confirm = Confirmar
|
confirm = Confirmar
|
||||||
delete = Apagar
|
delete = Apagar
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Mod de Joc: {0}
|
|||||||
save.date = Ultima Salvare: {0}
|
save.date = Ultima Salvare: {0}
|
||||||
save.playtime = Timp în Joc: {0}
|
save.playtime = Timp în Joc: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Atenție
|
warning = Atenție
|
||||||
confirm = Confirmă
|
confirm = Confirmă
|
||||||
delete = Șterge
|
delete = Șterge
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Режим игры: {0}
|
|||||||
save.date = Последнее сохранение: {0}
|
save.date = Последнее сохранение: {0}
|
||||||
save.playtime = Время в игре: {0}
|
save.playtime = Время в игре: {0}
|
||||||
dontshowagain = Не показывать снова
|
dontshowagain = Не показывать снова
|
||||||
warn.32bit.title = Предупреждение об устаревании 32-битных систем
|
|
||||||
warn.32bit = Вы используете [red]32-битную[] версию Mindustry.\nТак как новые версии Java прекратили поддержку 32-битных систем Windows, [red]поддержка 32-битных систем скоро прекратится и в игре[].\n\nПросьба обновить устройство до 64-битной системы и убедиться, что у вас загружена 64-битная версия Mindustry.\n\nЕсли вы используете Mindustry через файл JAR, убедитесь, что вы используете 64-битную Java.
|
|
||||||
warning = Предупреждение.
|
warning = Предупреждение.
|
||||||
confirm = Подтверждение
|
confirm = Подтверждение
|
||||||
delete = Удалить
|
delete = Удалить
|
||||||
@@ -1469,8 +1467,8 @@ rules.buildaitier = Уровень баз ИИ
|
|||||||
rules.rtsai = ИИ в реальном времени
|
rules.rtsai = ИИ в реальном времени
|
||||||
rules.rtsai.campaign = ИИ в реальном времени
|
rules.rtsai.campaign = ИИ в реальном времени
|
||||||
rules.rtsai.campaign.info = В секторах атаки, враги будут собираться в отряды и действовать умнее.
|
rules.rtsai.campaign.info = В секторах атаки, враги будут собираться в отряды и действовать умнее.
|
||||||
rules.clearsectoronloss = Clear Sector On Loss
|
rules.clearsectoronloss = Очистка сектора при поражении.
|
||||||
rules.clearsectoronloss.info = When the sector is lost, player buildings from the previous attempt will not carry over.
|
rules.clearsectoronloss.info = При потере сектора постройки игрока с предыдущей попытки не будут сохранены.
|
||||||
rules.rtsminsquadsize = Минимальный размер отряда
|
rules.rtsminsquadsize = Минимальный размер отряда
|
||||||
rules.rtsmaxsquadsize = Максимальный размер отряда
|
rules.rtsmaxsquadsize = Максимальный размер отряда
|
||||||
rules.rtsminattackweight = Минимальный вес для атаки
|
rules.rtsminattackweight = Минимальный вес для атаки
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Režim igre: {0}
|
|||||||
save.date = Poslednji snimak: {0}
|
save.date = Poslednji snimak: {0}
|
||||||
save.playtime = Vreme igre: {0}
|
save.playtime = Vreme igre: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Upozorenje.
|
warning = Upozorenje.
|
||||||
confirm = Potvrdi
|
confirm = Potvrdi
|
||||||
delete = Izbriši
|
delete = Izbriši
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Gamemode: {0}
|
|||||||
save.date = Last Saved: {0}
|
save.date = Last Saved: {0}
|
||||||
save.playtime = Speltid: {0}
|
save.playtime = Speltid: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Varning.
|
warning = Varning.
|
||||||
confirm = Bekräfta
|
confirm = Bekräfta
|
||||||
delete = Radera
|
delete = Radera
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = เกมโหมด: {0}
|
|||||||
save.date = เซฟล่าสุด: {0}
|
save.date = เซฟล่าสุด: {0}
|
||||||
save.playtime = เวลาที่เล่นไป: {0}
|
save.playtime = เวลาที่เล่นไป: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = คำเตือน
|
warning = คำเตือน
|
||||||
confirm = ตกลง
|
confirm = ตกลง
|
||||||
delete = ลบ
|
delete = ลบ
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Gamemode: {0}
|
|||||||
save.date = En sonki kayit: {0}
|
save.date = En sonki kayit: {0}
|
||||||
save.playtime = Oyun Zamani!: {0}
|
save.playtime = Oyun Zamani!: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Warning.
|
warning = Warning.
|
||||||
confirm = Onayla
|
confirm = Onayla
|
||||||
delete = Sil
|
delete = Sil
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Oyun Modu: {0}
|
|||||||
save.date = Son Kayıt: {0}
|
save.date = Son Kayıt: {0}
|
||||||
save.playtime = Oynama süresi: {0}
|
save.playtime = Oynama süresi: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Uyarı.
|
warning = Uyarı.
|
||||||
confirm = Doğrula
|
confirm = Doğrula
|
||||||
delete = Sil
|
delete = Sil
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Режим гри: {0}
|
|||||||
save.date = Останнє збереження: {0}
|
save.date = Останнє збереження: {0}
|
||||||
save.playtime = Час гри: {0}
|
save.playtime = Час гри: {0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = Попередження
|
warning = Попередження
|
||||||
confirm = Підтвердження
|
confirm = Підтвердження
|
||||||
delete = Видалити
|
delete = Видалити
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = Chế độ chơi: {0}
|
|||||||
save.date = Lưu lần cuối: {0}
|
save.date = Lưu lần cuối: {0}
|
||||||
save.playtime = Thời gian chơi: {0}
|
save.playtime = Thời gian chơi: {0}
|
||||||
dontshowagain = Không hiện lại
|
dontshowagain = Không hiện lại
|
||||||
warn.32bit.title = Cảnh Báo Lỗi Thời Cho 32-bit
|
|
||||||
warn.32bit = Bạn đang dùng một phiên bản [red]32-bit[] của Mindustry.\nTheo phiên bản mới của Java đã từ bỏ hỗ trợ Windows 32-bit, [red]hỗ trợ 32-bit sẽ bị ngừng trong tương lai[].\n\nVui lòng nâng cấp lên máy 64-bit, và chắc rằng bạn đã tải phiên bản 64-bit của Mindustry.\n\nNếu bạn đang chơi Mindustry dạng tập tin JAR, chắc rằng bạn dùng bản Java 64-bit.
|
|
||||||
warning = Cảnh báo.
|
warning = Cảnh báo.
|
||||||
confirm = Xác nhận
|
confirm = Xác nhận
|
||||||
delete = Xóa
|
delete = Xóa
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = 游戏模式:{0}
|
|||||||
save.date = 最后保存时间:{0}
|
save.date = 最后保存时间:{0}
|
||||||
save.playtime = 游戏时长:{0}
|
save.playtime = 游戏时长:{0}
|
||||||
dontshowagain = 不再显示
|
dontshowagain = 不再显示
|
||||||
warn.32bit.title = 32位架构弃用警告
|
|
||||||
warn.32bit = 你正在游玩[red]32位[]版本的Mindustry。\nJava在新版本中弃用了对32位Windows的支持,[red]因此将在未来终止支持32位架构[]。\n\n请使用64位平台游玩,并且确保你下载的是64位的Mindustry。\n\n如果你通过运行JAR文件玩Mindustry,确保使用的是64位的Java。
|
|
||||||
warning = 警告!
|
warning = 警告!
|
||||||
confirm = 确认
|
confirm = 确认
|
||||||
delete = 删除
|
delete = 删除
|
||||||
|
|||||||
@@ -354,8 +354,6 @@ save.mode = 遊戲模式:{0}
|
|||||||
save.date = 最後存檔時間:{0}
|
save.date = 最後存檔時間:{0}
|
||||||
save.playtime = 遊玩時間:{0}
|
save.playtime = 遊玩時間:{0}
|
||||||
dontshowagain = Don't show again
|
dontshowagain = Don't show again
|
||||||
warn.32bit.title = 32-bit Deprecation Warning
|
|
||||||
warn.32bit = You are using a [red]32-bit[] version of Mindustry.\nAs newer Java versions have dropped 32-bit Windows support, [red]32-bit support will be discontinued in the future[].\n\nPlease upgrade to a 64-bit machine, and make sure you have the 64-bit version of Mindustry downloaded.\n\nIf you are running Mindustry as a JAR file, make sure you are using 64-bit Java.
|
|
||||||
warning = 警告。
|
warning = 警告。
|
||||||
confirm = 確認
|
confirm = 確認
|
||||||
delete = 刪除
|
delete = 刪除
|
||||||
|
|||||||
Binary file not shown.
@@ -441,8 +441,18 @@ public class Vars implements Loadable{
|
|||||||
|
|
||||||
settings.setAppName(appName);
|
settings.setAppName(appName);
|
||||||
|
|
||||||
|
loadFileLogger(settings.getDataDirectory().child("last_log.txt"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void loadFileLogger(Fi file){
|
||||||
|
if(loadedFileLogger) return;
|
||||||
|
|
||||||
|
if(!file.parent().exists()){
|
||||||
|
file.parent().mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Writer writer = settings.getDataDirectory().child("last_log.txt").writer(false);
|
Writer writer = file.writer(false);
|
||||||
LogHandler log = Log.logger;
|
LogHandler log = Log.logger;
|
||||||
Log.logger = (level, text) -> {
|
Log.logger = (level, text) -> {
|
||||||
log.log(level, text);
|
log.log(level, text);
|
||||||
@@ -467,7 +477,7 @@ public class Vars implements Loadable{
|
|||||||
settings.setJson(JsonIO.json);
|
settings.setJson(JsonIO.json);
|
||||||
settings.setAppName(appName);
|
settings.setAppName(appName);
|
||||||
|
|
||||||
if(steam || (Version.modifier != null && Version.modifier.contains("steam"))){
|
if(steam || Version.isSteam){
|
||||||
settings.setDataDirectory(Core.files.local("saves/"));
|
settings.setDataDirectory(Core.files.local("saves/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1643,6 +1643,7 @@ public class Blocks{
|
|||||||
|
|
||||||
liquidCapacity = 80f;
|
liquidCapacity = 80f;
|
||||||
outputLiquid = new LiquidStack(Liquids.cyanogen, 12f / 60f);
|
outputLiquid = new LiquidStack(Liquids.cyanogen, 12f / 60f);
|
||||||
|
craftTime = 80f / 4f;
|
||||||
|
|
||||||
consumeLiquid(Liquids.arkycite, 160f / 60f);
|
consumeLiquid(Liquids.arkycite, 160f / 60f);
|
||||||
consumeItem(Items.graphite);
|
consumeItem(Items.graphite);
|
||||||
@@ -3746,7 +3747,8 @@ public class Blocks{
|
|||||||
width = 7f;
|
width = 7f;
|
||||||
height = 9f;
|
height = 9f;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
ammoMultiplier = 4;
|
ammoMultiplier = 5;
|
||||||
|
armorMultiplier = 1.5f;
|
||||||
|
|
||||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||||
hitColor = backColor = trailColor = Pal.copperAmmoBack;
|
hitColor = backColor = trailColor = Pal.copperAmmoBack;
|
||||||
|
|||||||
@@ -77,15 +77,6 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
checkAutoUnlocks();
|
checkAutoUnlocks();
|
||||||
|
|
||||||
if((OS.isWindows && !OS.is64Bit && !Core.settings.getBool("nowarn32bit", false))){
|
|
||||||
BaseDialog dialog = new BaseDialog("@warn.32bit.title");
|
|
||||||
dialog.buttons.button("@ok", dialog::hide).size(120f, 64f);
|
|
||||||
dialog.cont.add("@warn.32bit").labelAlign(Align.center, Align.center).wrap().grow().row();
|
|
||||||
dialog.cont.check("@dontshowagain", val -> Core.settings.put("nowarn32bit", val));
|
|
||||||
|
|
||||||
dialog.show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(StateChangeEvent.class, event -> {
|
Events.on(StateChangeEvent.class, event -> {
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ public class Version{
|
|||||||
public static int build = 0;
|
public static int build = 0;
|
||||||
/** Revision number. Used for hotfixes. Does not affect server compatibility. */
|
/** Revision number. Used for hotfixes. Does not affect server compatibility. */
|
||||||
public static int revision = 0;
|
public static int revision = 0;
|
||||||
|
/** Whether the Steam version of the game is requested. This is different from Vars.steam (Steam initialization can fail) */
|
||||||
|
public static boolean isSteam = false;
|
||||||
/** Whether version loading is enabled. */
|
/** Whether version loading is enabled. */
|
||||||
public static boolean enabled = true;
|
public static boolean enabled = true;
|
||||||
|
|
||||||
@@ -38,6 +40,7 @@ public class Version{
|
|||||||
modifier = map.get("modifier");
|
modifier = map.get("modifier");
|
||||||
commitHash = map.get("commitHash", "unknown");
|
commitHash = map.get("commitHash", "unknown");
|
||||||
buildDate = map.get("buildDate", "unknown");
|
buildDate = map.get("buildDate", "unknown");
|
||||||
|
isSteam = modifier.contains("steam");
|
||||||
if(map.get("build").contains(".")){
|
if(map.get("build").contains(".")){
|
||||||
String[] split = map.get("build").split("\\.");
|
String[] split = map.get("build").split("\\.");
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
boolean remove = false;
|
boolean remove = false, doRemove = false;
|
||||||
float health = build.health;
|
float health = build.health;
|
||||||
|
|
||||||
if(build.team != team){
|
if(build.team != team){
|
||||||
@@ -278,13 +278,16 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||||||
|
|
||||||
if(!type.pierceBuilding){
|
if(!type.pierceBuilding){
|
||||||
hit = true;
|
hit = true;
|
||||||
remove();
|
doRemove = true;
|
||||||
}else{
|
}else{
|
||||||
collided.add(build.id);
|
collided.add(build.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type.hitTile(self(), build, x * tilesize, y * tilesize, health, true);
|
type.hitTile(self(), build, x * tilesize, y * tilesize, health, true);
|
||||||
|
if(doRemove){
|
||||||
|
remove();
|
||||||
|
}
|
||||||
|
|
||||||
//stop raycasting when building is hit
|
//stop raycasting when building is hit
|
||||||
if(type.pierceBuilding) return;
|
if(type.pierceBuilding) return;
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ public class Mods implements Loadable{
|
|||||||
Fi file = mod.root.child(directory);
|
Fi file = mod.root.child(directory);
|
||||||
if(file.exists()){
|
if(file.exists()){
|
||||||
for(Fi child : file.list()){
|
for(Fi child : file.list()){
|
||||||
cons.get(mod, child);
|
if(!child.isDirectory()){
|
||||||
|
cons.get(mod, child);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ public class Net{
|
|||||||
private final ObjectMap<Class<?>, Cons2<NetConnection, Object>> serverListeners = new ObjectMap<>();
|
private final ObjectMap<Class<?>, Cons2<NetConnection, Object>> serverListeners = new ObjectMap<>();
|
||||||
private final IntMap<StreamBuilder> streams = new IntMap<>();
|
private final IntMap<StreamBuilder> streams = new IntMap<>();
|
||||||
private final ExecutorService pingExecutor =
|
private final ExecutorService pingExecutor =
|
||||||
OS.isWindows && !OS.is64Bit ? Threads.boundedExecutor("Ping Servers", 5) : //on 32-bit windows, thread spam crashes
|
|
||||||
OS.isIos ? Threads.boundedExecutor("Ping Servers", 32) : //on IOS, 256 threads can crash, so limit the amount
|
OS.isIos ? Threads.boundedExecutor("Ping Servers", 32) : //on IOS, 256 threads can crash, so limit the amount
|
||||||
Threads.unboundedExecutor();
|
Threads.unboundedExecutor();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.ui.dialogs;
|
package mindustry.ui.dialogs;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.input.*;
|
import arc.input.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -18,6 +17,8 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import static arc.Core.*;
|
import static arc.Core.*;
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
Seq<UnlockableContent> array = categoryContents.get(tagName).select(u ->
|
Seq<UnlockableContent> array = categoryContents.get(tagName).select(u ->
|
||||||
!u.isHidden() && !u.hideDatabase &&
|
!u.isHidden() && !u.hideDatabase &&
|
||||||
(tab == Planets.sun || u.allDatabaseTabs || u.databaseTabs.contains(tab)) &&
|
(tab == Planets.sun || u.allDatabaseTabs || u.databaseTabs.contains(tab)) &&
|
||||||
(text.isEmpty() || u.localizedName.toLowerCase().contains(text))).as();
|
(text.isEmpty() || u.localizedName.toLowerCase(Locale.ROOT).contains(text))).as();
|
||||||
if(array.isEmpty()) continue;
|
if(array.isEmpty()) continue;
|
||||||
|
|
||||||
hasResult = true;
|
hasResult = true;
|
||||||
@@ -156,7 +157,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
|
|
||||||
all.table(sub -> {
|
all.table(sub -> {
|
||||||
for(int j = 0; j < tmpCategory.size; j++){
|
for(int j = 0; j < tmpCategory.size; j++){
|
||||||
String tagName = categoryContents.orderedKeys().get(j);
|
String tagName = tmpCategory.orderedKeys().get(j);
|
||||||
Seq<UnlockableContent> array = tmpCategory.get(tagName);
|
Seq<UnlockableContent> array = tmpCategory.get(tagName);
|
||||||
if(array == null || array.isEmpty()) continue;
|
if(array == null || array.isEmpty()) continue;
|
||||||
|
|
||||||
@@ -171,7 +172,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
sub.table(list -> {
|
sub.table(list -> {
|
||||||
list.left();
|
list.left();
|
||||||
|
|
||||||
int cols = (int)Mathf.clamp((Core.graphics.getWidth() - Scl.scl(30)) / Scl.scl(32 + 12), 1, 22);
|
int cols = (int)Mathf.clamp((graphics.getWidth() - Scl.scl(30)) / Scl.scl(32 + 12), 1, 22);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for(var unlock : array){
|
for(var unlock : array){
|
||||||
@@ -202,8 +203,8 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
|
|
||||||
if(unlocked(unlock)){
|
if(unlocked(unlock)){
|
||||||
image.clicked(() -> {
|
image.clicked(() -> {
|
||||||
if(Core.input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(unlock.name) != 0){
|
if(input.keyDown(KeyCode.shiftLeft) && Fonts.getUnicode(unlock.name) != 0){
|
||||||
Core.app.setClipboardText((char)Fonts.getUnicode(unlock.name) + "");
|
app.setClipboardText((char)Fonts.getUnicode(unlock.name) + "");
|
||||||
ui.showInfoFade("@copied");
|
ui.showInfoFade("@copied");
|
||||||
}else{
|
}else{
|
||||||
ui.content.show(unlock);
|
ui.content.show(unlock);
|
||||||
|
|||||||
@@ -434,8 +434,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
@Nullable Sector findLauncher(Sector to){
|
@Nullable Sector findLauncher(Sector to){
|
||||||
if(mode == planetLaunch || to.planet.generator == null) return launchSector;
|
if(mode == planetLaunch || to.planet.generator == null) return launchSector;
|
||||||
|
|
||||||
Sector candidate = to.planet.generator.findLaunchCandidate(to, launchSector);
|
Sector actualLaunchSector = (launchSector != null && launchSector.planet == to.planet ? launchSector : null);
|
||||||
return candidate == null && launchSector != null && (mode == planetLaunch || !launchSector.isAttacked()) ? launchSector : candidate;
|
|
||||||
|
Sector candidate = to.planet.generator.findLaunchCandidate(to, actualLaunchSector);
|
||||||
|
return candidate == null && actualLaunchSector != null && (mode == planetLaunch || !actualLaunchSector.isAttacked()) ? actualLaunchSector : candidate;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean showing(){
|
boolean showing(){
|
||||||
@@ -624,7 +626,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
||||||
if(showing() || button != KeyCode.mouseLeft) return;
|
if(showing() || button != KeyCode.mouseLeft) return;
|
||||||
|
|
||||||
if(hovered != null && selected == hovered && count == 2){
|
if(hovered != null && selected == hovered && count == 2 && canPlaySector(hovered)){
|
||||||
playSelected();
|
playSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1275,7 +1277,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
|
|
||||||
stable.image().color(Pal.accent).fillX().height(3f).pad(3f).row();
|
stable.image().color(Pal.accent).fillX().height(3f).pad(3f).row();
|
||||||
|
|
||||||
boolean locked = sector.preset != null && sector.preset.locked() && !sector.hasBase() && sector.preset.techNode != null;
|
boolean locked = isLocked(sector);
|
||||||
|
|
||||||
if(locked){
|
if(locked){
|
||||||
stable.table(r -> {
|
stable.table(r -> {
|
||||||
@@ -1329,7 +1331,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean noCandidate = sector != sector.planet.getStartSector() && !sector.hasBase() && findLauncher(sector) == null;
|
boolean noCandidate = hasNoCandidate(sector);
|
||||||
|
|
||||||
stable.button(
|
stable.button(
|
||||||
mode == select ? "@sectors.select" :
|
mode == select ? "@sectors.select" :
|
||||||
@@ -1347,6 +1349,18 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
stable.act(0f);
|
stable.act(0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean hasNoCandidate(Sector sector){
|
||||||
|
return sector != sector.planet.getStartSector() && !sector.hasBase() && findLauncher(sector) == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isLocked(Sector sector){
|
||||||
|
return sector.preset != null && sector.preset.locked() && !sector.hasBase() && sector.preset.techNode != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean canPlaySector(Sector sector){
|
||||||
|
return !isLocked(sector) && !hasNoCandidate(sector);
|
||||||
|
}
|
||||||
|
|
||||||
void playSelected(){
|
void playSelected(){
|
||||||
if(selected == null) return;
|
if(selected == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -426,6 +426,12 @@ public class SettingsMenuDialog extends BaseDialog{
|
|||||||
if(!mobile){
|
if(!mobile){
|
||||||
graphics.checkPref("vsync", true, b -> Core.graphics.setVSync(b));
|
graphics.checkPref("vsync", true, b -> Core.graphics.setVSync(b));
|
||||||
graphics.checkPref("fullscreen", false, b -> {
|
graphics.checkPref("fullscreen", false, b -> {
|
||||||
|
if(b && settings.getBool("borderlesswindow")){
|
||||||
|
Core.graphics.setWindowedMode(Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||||
|
settings.put("borderlesswindow", false);
|
||||||
|
graphics.rebuild();
|
||||||
|
}
|
||||||
|
|
||||||
if(b){
|
if(b){
|
||||||
Core.graphics.setFullscreen();
|
Core.graphics.setFullscreen();
|
||||||
}else{
|
}else{
|
||||||
@@ -433,12 +439,24 @@ public class SettingsMenuDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
graphics.checkPref("borderlesswindow", false, b -> {
|
||||||
|
if(b && settings.getBool("fullscreen")){
|
||||||
|
Core.graphics.setWindowedMode(Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||||
|
settings.put("fullscreen", false);
|
||||||
|
graphics.rebuild();
|
||||||
|
}
|
||||||
|
Core.graphics.setBorderless(b);
|
||||||
|
});
|
||||||
|
|
||||||
Core.graphics.setVSync(Core.settings.getBool("vsync"));
|
Core.graphics.setVSync(Core.settings.getBool("vsync"));
|
||||||
|
|
||||||
if(Core.settings.getBool("fullscreen")){
|
if(Core.settings.getBool("fullscreen")){
|
||||||
Core.app.post(() -> Core.graphics.setFullscreen());
|
Core.app.post(() -> Core.graphics.setFullscreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Core.settings.getBool("borderlesswindow")){
|
||||||
|
Core.app.post(() -> Core.graphics.setBorderless(true));
|
||||||
|
}
|
||||||
}else if(!ios){
|
}else if(!ios){
|
||||||
graphics.checkPref("landscape", false, b -> {
|
graphics.checkPref("landscape", false, b -> {
|
||||||
if(b){
|
if(b){
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ package mindustry.desktop;
|
|||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.Files.*;
|
import arc.Files.*;
|
||||||
import arc.backend.sdl.*;
|
import arc.backend.sdl.*;
|
||||||
|
import arc.backend.sdl.jni.*;
|
||||||
import arc.discord.*;
|
import arc.discord.*;
|
||||||
import arc.discord.DiscordRPC.*;
|
import arc.discord.DiscordRPC.*;
|
||||||
|
import arc.filedialogs.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -15,7 +17,7 @@ import arc.util.Log.*;
|
|||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
import com.codedisaster.steamworks.*;
|
import com.codedisaster.steamworks.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.core.Version;
|
import mindustry.core.*;
|
||||||
import mindustry.desktop.steam.*;
|
import mindustry.desktop.steam.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
@@ -26,9 +28,6 @@ import mindustry.net.Net.*;
|
|||||||
import mindustry.service.*;
|
import mindustry.service.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
import org.lwjgl.*;
|
|
||||||
import org.lwjgl.sdl.*;
|
|
||||||
import org.lwjgl.system.*;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
@@ -43,7 +42,12 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
|
|
||||||
public static void main(String[] arg){
|
public static void main(String[] arg){
|
||||||
try{
|
try{
|
||||||
|
Version.init();
|
||||||
Vars.loadLogger();
|
Vars.loadLogger();
|
||||||
|
Vars.loadFileLogger(new Fi(Version.isSteam ? "saves" : OS.getAppDataDirectoryString(appName)).child("last_log.txt"));
|
||||||
|
|
||||||
|
check32Bit();
|
||||||
|
checkJavaVersion();
|
||||||
|
|
||||||
new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{
|
new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{
|
||||||
title = "Mindustry";
|
title = "Mindustry";
|
||||||
@@ -111,12 +115,39 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void checkJavaVersion(){
|
||||||
|
if(OS.javaVersionNumber < 17){
|
||||||
|
//this is technically a lie: Java 25 isn't actually required (17 is), but I want people to get the highest available version they can.
|
||||||
|
//Java 25 *might* be required in the future for FFM bindings.
|
||||||
|
ErrorDialog.show("Java 25 is required to run Mindustry. Your version: " + OS.javaVersionNumber + "\n" +
|
||||||
|
"\n" +
|
||||||
|
"Please uninstall your current Java version, and download Java 25.\n" +
|
||||||
|
"\n" +
|
||||||
|
"It is recommended to download Java from adoptium.net.\n" +
|
||||||
|
"Do not download from java.com, as that will give you Java 8 by default.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void check32Bit(){
|
||||||
|
if(OS.isWindows && !OS.is64Bit){
|
||||||
|
String versionWarning = "";
|
||||||
|
|
||||||
|
if(Version.isSteam){
|
||||||
|
versionWarning = "\n\nIf you are unable to upgrade, consider switching to the legacy v7 branch on Steam, which is the last release that supported 32-bit windows:\n(properties -> betas -> select version-7.0 in the drop-down box).";
|
||||||
|
}else if(OS.javaVersion.equals("1.8.0_151-1-ojdkbuild")){ //version string of JVM packaged with the 32-bit version of the game on itch/steam
|
||||||
|
versionWarning = "\n\nMake sure you have downloaded the 64-bit version of the game, not the 32-bit one.";
|
||||||
|
}else if(OS.javaVersionNumber < 25){
|
||||||
|
//technically, java 25 isn't required yet, but it might be in the future, so tell users to get that one
|
||||||
|
versionWarning = "\n\nYour current Java version is: " + OS.javaVersionNumber + ". To run the game, upgrade to Java 25 on a 64-bit machine.";
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorDialog.show("You are running a 32-bit installation of Windows and/or a 32-bit JVM. 32-bit windows is no longer supported." + versionWarning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public DesktopLauncher(String[] args){
|
public DesktopLauncher(String[] args){
|
||||||
this.args = args;
|
this.args = args;
|
||||||
|
|
||||||
Version.init();
|
|
||||||
boolean useSteam = Version.modifier.contains("steam");
|
|
||||||
|
|
||||||
if(useDiscord){
|
if(useDiscord){
|
||||||
Threads.daemon(() -> {
|
Threads.daemon(() -> {
|
||||||
try{
|
try{
|
||||||
@@ -133,8 +164,7 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useSteam){
|
if(Version.isSteam){
|
||||||
|
|
||||||
Events.on(ClientLoadEvent.class, event -> {
|
Events.on(ClientLoadEvent.class, event -> {
|
||||||
if(steamError != null){
|
if(steamError != null){
|
||||||
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> {
|
Core.app.post(() -> Core.app.post(() -> Core.app.post(() -> {
|
||||||
@@ -298,63 +328,136 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showFileChooser(boolean open, String title, String extension, Cons<Fi> cons){
|
public void showFileChooser(boolean open, String title, String extension, Cons<Fi> cons){
|
||||||
showNativeFileChooser(open, cons, extension);
|
showNativeFileChooser(title, open, cons, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
showNativeFileChooser(true, cons, extensions);
|
showNativeFileChooser("@open", true, cons, extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showNativeFileChooser(boolean open, Cons<Fi> cons, String... shownExtensions){
|
void showNativeFileChooser(String title, boolean open, Cons<Fi> cons, String... shownExtensions){
|
||||||
|
String formatted = (title.startsWith("@") ? Core.bundle.get(title.substring(1)) : title).replaceAll("\"", "'");
|
||||||
|
|
||||||
|
//this should never happen unless someone is being dumb with the parameters
|
||||||
String[] ext = shownExtensions == null || shownExtensions.length == 0 ? new String[]{""} : shownExtensions;
|
String[] ext = shownExtensions == null || shownExtensions.length == 0 ? new String[]{""} : shownExtensions;
|
||||||
|
|
||||||
SDL_DialogFileFilter.Buffer filters = SDL_DialogFileFilter.calloc(ext.length);
|
if(OS.isLinux){
|
||||||
try(MemoryStack stack = MemoryStack.stackPush()){
|
showZenity(open, formatted, shownExtensions, cons, () -> Platform.defaultFileDialog(open, title, ext[0], cons));
|
||||||
for(int i = 0; i < ext.length; i++){
|
return;
|
||||||
String extName = ext[i];
|
|
||||||
|
|
||||||
var filter = SDL_DialogFileFilter.calloc(stack)
|
|
||||||
.name(MemoryUtil.memUTF8(extName.isEmpty() ? "All Files" : "." + extName + " files"))
|
|
||||||
.pattern(MemoryUtil.memUTF8(extName.isEmpty() ? "*" : extName));
|
|
||||||
|
|
||||||
filters.put(i, filter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
SDL_DialogFileCallbackI callback = (userData, files, filter) -> {
|
|
||||||
if(files != 0){
|
|
||||||
PointerBuffer pointerBuffer = MemoryUtil.memPointerBuffer(files, 1);
|
|
||||||
long firstFile = pointerBuffer.get();
|
|
||||||
if(firstFile != 0){
|
|
||||||
String result = MemoryUtil.memUTF8(firstFile);
|
|
||||||
|
|
||||||
if(result.isEmpty() || result.equals("\n")) return;
|
//native file dialog
|
||||||
if(result.endsWith("\n")) result = result.substring(0, result.length() - 1);
|
Threads.daemon(() -> {
|
||||||
if(result.contains("\n")) return;
|
try{
|
||||||
|
FileDialogs.loadNatives();
|
||||||
|
|
||||||
Fi file = Core.files.absolute(result);
|
String result;
|
||||||
Core.app.post(() -> {
|
String[] patterns = new String[ext.length];
|
||||||
FileChooser.setLastDirectory(file.isDirectory() ? file : file.parent());
|
for(int i = 0; i < ext.length; i++){
|
||||||
|
patterns[i] = "*." + ext[i];
|
||||||
if(!open){
|
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + ext[0]));
|
|
||||||
}else{
|
|
||||||
cons.get(file);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//on MacOS, .msav is not properly recognized until I put garbage into the array?
|
||||||
|
if(patterns.length == 1 && OS.isMac && open){
|
||||||
|
patterns = new String[]{"", "*." + ext[0]};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(open){
|
||||||
|
result = FileDialogs.openFileDialog(formatted, FileChooser.getLastDirectory().absolutePath(), patterns, "." + ext[0] + " files", false);
|
||||||
|
}else{
|
||||||
|
result = FileDialogs.saveFileDialog(formatted, FileChooser.getLastDirectory().child("file." + ext[0]).absolutePath(), patterns, "." + ext[0] + " files");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(result == null) return;
|
||||||
|
|
||||||
|
if(result.length() > 1 && result.contains("\n")){
|
||||||
|
result = result.split("\n")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
//cancelled selection, ignore result
|
||||||
|
if(result.isEmpty() || result.equals("\n")) return;
|
||||||
|
if(result.endsWith("\n")) result = result.substring(0, result.length() - 1);
|
||||||
|
if(result.contains("\n")) throw new IOException("invalid input: \"" + result + "\"");
|
||||||
|
|
||||||
|
Fi file = Core.files.absolute(result);
|
||||||
|
Core.app.post(() -> {
|
||||||
|
FileChooser.setLastDirectory(file.isDirectory() ? file : file.parent());
|
||||||
|
|
||||||
|
if(!open){
|
||||||
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + ext[0]));
|
||||||
|
}else{
|
||||||
|
cons.get(file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch(Throwable error){
|
||||||
|
Log.err("Failure to execute native file chooser", error);
|
||||||
|
Core.app.post(() -> {
|
||||||
|
if(ext.length > 1){
|
||||||
|
showMultiFileChooser(cons, ext);
|
||||||
|
}else{
|
||||||
|
Platform.defaultFileDialog(open, formatted, ext[0], cons);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
if(open){
|
|
||||||
SDLDialog.SDL_ShowOpenFileDialog(callback, 0, ((SdlApplication)Core.app).getWindow(), filters, FileChooser.getLastDirectory().absolutePath(), false);
|
|
||||||
}else{
|
|
||||||
SDLDialog.SDL_ShowSaveFileDialog(callback, 0, ((SdlApplication)Core.app).getWindow(), filters, FileChooser.getLastDirectory().absolutePath() + "/" + "export." + ext[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
filters.free();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** attempt to use the native file picker with zenity, or runs the fallback Runnable if the operation fails */
|
||||||
|
static void showZenity(boolean open, String title, String[] extensions, Cons<Fi> cons, Runnable fallback){
|
||||||
|
Threads.daemon(() -> {
|
||||||
|
try{
|
||||||
|
String formatted = (title.startsWith("@") ? Core.bundle.get(title.substring(1)) : title).replaceAll("\"", "'");
|
||||||
|
|
||||||
|
String last = FileChooser.getLastDirectory().absolutePath();
|
||||||
|
if(!last.endsWith("/")) last += "/";
|
||||||
|
|
||||||
|
//zenity doesn't support filtering by extension
|
||||||
|
Seq<String> args = Seq.with("zenity",
|
||||||
|
"--file-selection",
|
||||||
|
"--title=" + formatted,
|
||||||
|
"--filename=" + last,
|
||||||
|
"--confirm-overwrite",
|
||||||
|
"--file-filter=" + Seq.with(extensions).toString(" ", s -> "*." + s),
|
||||||
|
"--file-filter=All files | *" //allow anything if the user wants
|
||||||
|
);
|
||||||
|
|
||||||
|
if(!open){
|
||||||
|
args.add("--save");
|
||||||
|
}
|
||||||
|
|
||||||
|
String result = OS.exec(args.toArray(String.class));
|
||||||
|
//first line.
|
||||||
|
if(result.length() > 1 && result.contains("\n")){
|
||||||
|
result = result.split("\n")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
//cancelled selection, ignore result
|
||||||
|
if(result.isEmpty() || result.equals("\n")) return;
|
||||||
|
|
||||||
|
if(result.endsWith("\n")) result = result.substring(0, result.length() - 1);
|
||||||
|
if(result.contains("\n")) throw new IOException("invalid input: \"" + result + "\"");
|
||||||
|
|
||||||
|
Fi file = Core.files.absolute(result);
|
||||||
|
Core.app.post(() -> {
|
||||||
|
FileChooser.setLastDirectory(file.isDirectory() ? file : file.parent());
|
||||||
|
|
||||||
|
if(!open){
|
||||||
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extensions[0]));
|
||||||
|
}else{
|
||||||
|
cons.get(file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch(Exception e){
|
||||||
|
Log.err(e);
|
||||||
|
Log.warn("zenity not found, using non-native file dialog. Consider installing `zenity` for native file dialogs.");
|
||||||
|
Core.app.post(fallback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Seq<Fi> getWorkshopContent(Class<? extends Publishable> type){
|
public Seq<Fi> getWorkshopContent(Class<? extends Publishable> type){
|
||||||
return !steam ? super.getWorkshopContent(type) : SVars.workshop.getWorkshopFiles(type);
|
return !steam ? super.getWorkshopContent(type) : SVars.workshop.getWorkshopFiles(type);
|
||||||
@@ -477,6 +580,6 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void message(String message){
|
private static void message(String message){
|
||||||
SDLMessageBox.SDL_ShowSimpleMessageBox(SDLMessageBox.SDL_MESSAGEBOX_ERROR, "oh no", message, 0);
|
SDL.SDL_ShowSimpleMessageBox(SDL.SDL_MESSAGEBOX_ERROR, "oh no", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
desktop/src/mindustry/desktop/ErrorDialog.java
Normal file
25
desktop/src/mindustry/desktop/ErrorDialog.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package mindustry.desktop;
|
||||||
|
|
||||||
|
import arc.backend.sdl.jni.*;
|
||||||
|
import arc.util.*;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
|
||||||
|
//placed in a separate class due to the javawx.swing dependency, which is not present in the bundled JVM
|
||||||
|
public class ErrorDialog{
|
||||||
|
|
||||||
|
public static void show(String text){
|
||||||
|
Log.err(text);
|
||||||
|
try{
|
||||||
|
//will fail in the future on 32-bit platforms as no natives will be loaded
|
||||||
|
SDL.SDL_ShowSimpleMessageBox(SDL.SDL_MESSAGEBOX_ERROR, "it's over", text);
|
||||||
|
}catch(Throwable error){
|
||||||
|
try{
|
||||||
|
//usually won't work on packaged JVMs, but I won't be distributing those with 32 bit windows anyway
|
||||||
|
JOptionPane.showMessageDialog(null, text);
|
||||||
|
}catch(Throwable ignored){
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,8 +56,10 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
//lz4 chokes on direct buffers, so copy the bytes over
|
//lz4 chokes on direct buffers, so copy the bytes over
|
||||||
int len = snet.readP2PPacket(from, readBuffer, 0);
|
int len = snet.readP2PPacket(from, readBuffer, 0);
|
||||||
readBuffer.limit(len);
|
readBuffer.limit(len);
|
||||||
|
readCopyBuffer.limit(readBuffer.capacity());
|
||||||
readCopyBuffer.position(0);
|
readCopyBuffer.position(0);
|
||||||
readCopyBuffer.put(readBuffer);
|
readCopyBuffer.put(readBuffer);
|
||||||
|
readCopyBuffer.limit(len);
|
||||||
readCopyBuffer.position(0);
|
readCopyBuffer.position(0);
|
||||||
int fromID = from.getAccountID();
|
int fromID = from.getAccountID();
|
||||||
Object output = serializer.read(readCopyBuffer);
|
Object output = serializer.read(readCopyBuffer);
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=f42837db92
|
archash=a3c7d2cbf3
|
||||||
|
|||||||
Reference in New Issue
Block a user