From c7d34049fa18f8ef1837795580d4028dc2f6ee42 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 22 Mar 2019 00:16:09 -0400 Subject: [PATCH] Crash fix / Input tweak --- core/assets/bundles/bundle_cs.properties | 1 + core/assets/bundles/bundle_de.properties | 1 + core/assets/bundles/bundle_es.properties | 1 + core/assets/bundles/bundle_fr.properties | 1 + core/assets/bundles/bundle_fr_BE.properties | 1 + core/assets/bundles/bundle_in_ID.properties | 1 + core/assets/bundles/bundle_it.properties | 1 + core/assets/bundles/bundle_ja.properties | 1 + core/assets/bundles/bundle_ko.properties | 1 + core/assets/bundles/bundle_nl.properties | 1 + core/assets/bundles/bundle_pl.properties | 1 + core/assets/bundles/bundle_pt_BR.properties | 1 + core/assets/bundles/bundle_ru.properties | 1 + core/assets/bundles/bundle_tk.properties | 1 + core/assets/bundles/bundle_tr.properties | 1 + core/assets/bundles/bundle_uk_UA.properties | 1 + core/assets/bundles/bundle_zh_CN.properties | 1 + core/assets/bundles/bundle_zh_TW.properties | 1 + core/src/io/anuke/mindustry/editor/EditorTile.java | 2 +- core/src/io/anuke/mindustry/input/MobileInput.java | 1 + desktop/src/io/anuke/mindustry/desktop/CrashHandler.java | 4 +++- 21 files changed, 23 insertions(+), 2 deletions(-) diff --git a/core/assets/bundles/bundle_cs.properties b/core/assets/bundles/bundle_cs.properties index 8696718f93..e672c0e272 100644 --- a/core/assets/bundles/bundle_cs.properties +++ b/core/assets/bundles/bundle_cs.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Jsi si jistý že chceš smazat mapu "[accent]{0}[]"? level.highscore = Nejvyšší skóre: [accent]{0} level.select = Výběr levelu diff --git a/core/assets/bundles/bundle_de.properties b/core/assets/bundles/bundle_de.properties index 6c78c0a6f3..50a5bc3f65 100644 --- a/core/assets/bundles/bundle_de.properties +++ b/core/assets/bundles/bundle_de.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Bist du sicher, dass du die Karte "[accent]{0}[]" löschen möchtest? level.highscore = High Score: [accent]{0} level.select = Level Auswahl diff --git a/core/assets/bundles/bundle_es.properties b/core/assets/bundles/bundle_es.properties index 8190e6b90d..84688f435b 100644 --- a/core/assets/bundles/bundle_es.properties +++ b/core/assets/bundles/bundle_es.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = ¿Estás seguro que quieres borrar el mapa "[accent]{0}[]"? level.highscore = Puntuación más alta: [accent]{0} level.select = Selección de nivel diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index 26eea3214f..95c618c20a 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Êtes-vous sûr de supprimer cette carte"[accent]{0}[]"? level.highscore = Meilleur score: [accent]{0} level.select = Sélection de niveau diff --git a/core/assets/bundles/bundle_fr_BE.properties b/core/assets/bundles/bundle_fr_BE.properties index 0dcc9d95a8..de849d32b0 100644 --- a/core/assets/bundles/bundle_fr_BE.properties +++ b/core/assets/bundles/bundle_fr_BE.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Êtes-vous sûr de vouloir supprimer cette carte ?"[accent]{0}[]"? level.highscore = Meilleur score: [accent]{0} level.select = Sélection de niveau diff --git a/core/assets/bundles/bundle_in_ID.properties b/core/assets/bundles/bundle_in_ID.properties index 38e3f846d7..f4a00a7cd9 100644 --- a/core/assets/bundles/bundle_in_ID.properties +++ b/core/assets/bundles/bundle_in_ID.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Apakah kamu yakin ingin menghapus peta "[orange]{0}[]"? level.highscore = Skor Tinggi: [accent]{0} level.select = Pilih Level diff --git a/core/assets/bundles/bundle_it.properties b/core/assets/bundles/bundle_it.properties index 9143da3166..997e217992 100644 --- a/core/assets/bundles/bundle_it.properties +++ b/core/assets/bundles/bundle_it.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Sei sicuro di voler eliminare questa mappa"[accent]{0}[]"? level.highscore = Miglior punteggio: [accent]{0} level.select = Selezione del livello diff --git a/core/assets/bundles/bundle_ja.properties b/core/assets/bundles/bundle_ja.properties index 438bed2f33..b5921f8baf 100644 --- a/core/assets/bundles/bundle_ja.properties +++ b/core/assets/bundles/bundle_ja.properties @@ -23,6 +23,7 @@ stat.delivered = 獲得した資源: stat.rank = ランク: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = マップ "[accent]{0}[]" を削除してもよろしいですか? level.highscore = ハイスコア: [accent]{0} level.select = レベル選択 diff --git a/core/assets/bundles/bundle_ko.properties b/core/assets/bundles/bundle_ko.properties index f49e8dadc8..1e304aff7e 100644 --- a/core/assets/bundles/bundle_ko.properties +++ b/core/assets/bundles/bundle_ko.properties @@ -23,6 +23,7 @@ stat.delivered = 획득한 자원: stat.rank = 최종 기록: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = 정말로 "[accent]{0}[]" 맵을 삭제하시겠습니까?\n level.highscore = 최고 점수: [accent]{0} level.select = 맵 선택 diff --git a/core/assets/bundles/bundle_nl.properties b/core/assets/bundles/bundle_nl.properties index 8638c3df7c..a8b40dd1a0 100644 --- a/core/assets/bundles/bundle_nl.properties +++ b/core/assets/bundles/bundle_nl.properties @@ -23,6 +23,7 @@ stat.delivered = Middelen Gelanceerd: stat.rank = Eindrang: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Weet je zeker dat je de map wilt verwijderen? "[accent]{0}[]"? level.highscore = Topscore: [accent]{0} level.select = Selecteer Level diff --git a/core/assets/bundles/bundle_pl.properties b/core/assets/bundles/bundle_pl.properties index 0050d62b86..b384e75d35 100644 --- a/core/assets/bundles/bundle_pl.properties +++ b/core/assets/bundles/bundle_pl.properties @@ -23,6 +23,7 @@ stat.delivered = Surowce wystrzelone: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Jesteś pewny, że chcesz usunąć "[accent]{0}[]"? level.highscore = Rekord: [accent]{0} level.select = Wybrany poziom diff --git a/core/assets/bundles/bundle_pt_BR.properties b/core/assets/bundles/bundle_pt_BR.properties index 414a517348..b776388b45 100644 --- a/core/assets/bundles/bundle_pt_BR.properties +++ b/core/assets/bundles/bundle_pt_BR.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Certeza que quer deletar o mapa "[accent]{0}[]"? level.highscore = Melhor\npontuação: [accent] {0} level.select = Seleção de Fase diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index 4d4058d587..e6286f0b5e 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -23,6 +23,7 @@ stat.delivered = Ресурсов добыто: stat.rank = Финальный Счёт: [accent]{0} placeline = Вы выбрали блок.\nВы можете[accent] строить в линию[], сначало[accent] удерживая палец в течение нескольких секунд[] и потом перетаскивая его.\n\nПопробуйте. removearea = Вы выбрали режим удаления.\nВы можете[accent] удалать блоки по прямоугольнику[], [accent]удерживая палец несколько секунд[] и потом перетаскивая его.\n\nПопробуйте. +launcheditems = [accent]Launched Items map.delete = Вы действительно хотите удалить карту "[accent]{0}[]"? level.highscore = Рекорд: [accent]{0} level.select = Выбор карты diff --git a/core/assets/bundles/bundle_tk.properties b/core/assets/bundles/bundle_tk.properties index c35965922d..801f86b7dd 100644 --- a/core/assets/bundles/bundle_tk.properties +++ b/core/assets/bundles/bundle_tk.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Su haritayi silmek istediginden emin misin? "[accent]{0}[]"? level.highscore = Yuksek Skor: [accent]{0} level.select = Seviye secimi diff --git a/core/assets/bundles/bundle_tr.properties b/core/assets/bundles/bundle_tr.properties index 91e6c5ace3..db3e7a2687 100644 --- a/core/assets/bundles/bundle_tr.properties +++ b/core/assets/bundles/bundle_tr.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Su haritayi silmek istedigine emin misin? "[orange]{0}[]"? level.highscore = Yüksek Puan: [accent] {0} level.select = Seviye Seç diff --git a/core/assets/bundles/bundle_uk_UA.properties b/core/assets/bundles/bundle_uk_UA.properties index 7890513a30..62e30b8287 100644 --- a/core/assets/bundles/bundle_uk_UA.properties +++ b/core/assets/bundles/bundle_uk_UA.properties @@ -23,6 +23,7 @@ stat.delivered = Ресурсів здобуто: stat.rank = Фінальний рахунок: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = Ви впевнені, що хочете видалити карту "[accent]{0}[]"? level.highscore = Рекорд: [accent]{0} level.select = Вибір мапи diff --git a/core/assets/bundles/bundle_zh_CN.properties b/core/assets/bundles/bundle_zh_CN.properties index c44069c04f..ec957aacf3 100644 --- a/core/assets/bundles/bundle_zh_CN.properties +++ b/core/assets/bundles/bundle_zh_CN.properties @@ -23,6 +23,7 @@ stat.delivered = Resources Launched: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = 确定要删除 "[accent]{0}[]" 地图吗? level.highscore = 最高分: [accent]{0} level.select = 选择关卡 diff --git a/core/assets/bundles/bundle_zh_TW.properties b/core/assets/bundles/bundle_zh_TW.properties index 6e94ee9f85..38f4c6ebea 100644 --- a/core/assets/bundles/bundle_zh_TW.properties +++ b/core/assets/bundles/bundle_zh_TW.properties @@ -23,6 +23,7 @@ stat.delivered = 發射的資源: stat.rank = Final Rank: [accent]{0} placeline = You have selected a block.\nYou can[accent] place in a line[] by[accent] holding down your finger for a few seconds[] and dragging in a direction.\nTry it. removearea = You have selected removal mode.\nYou can[accent] remove blocks in a rectangle[] by[accent] holding down your finger for a few seconds[] and dragging.\nTry it. +launcheditems = [accent]Launched Items map.delete = 確認要刪除「[accent]{0}[]」地圖嗎? level.highscore = 最高分:[accent]{0} level.select = 選擇關卡 diff --git a/core/src/io/anuke/mindustry/editor/EditorTile.java b/core/src/io/anuke/mindustry/editor/EditorTile.java index 5c9146e188..24261d6d58 100644 --- a/core/src/io/anuke/mindustry/editor/EditorTile.java +++ b/core/src/io/anuke/mindustry/editor/EditorTile.java @@ -49,7 +49,7 @@ public class EditorTile extends Tile{ @Override public void setBlock(Block type){ - Block previous = block(); + Block previous = wall == null ? Blocks.air : wall; if(previous == type) return; super.setBlock(type); op(TileOp.get(x, y, (byte)OpType.block.ordinal(), previous.id, type.id)); diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index 7a4bd1fb63..49114a887f 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -401,6 +401,7 @@ public class MobileInput extends InputHandler implements GestureListener{ } drawPlace(l.x, l.y, block, l.rotation, prevX - l.x, prevY - l.y, prevRotation); + rotation = l.rotation; prevX = l.x; prevY = l.y; prevRotation = l.rotation; diff --git a/desktop/src/io/anuke/mindustry/desktop/CrashHandler.java b/desktop/src/io/anuke/mindustry/desktop/CrashHandler.java index 1de445dfc3..ab9bf15732 100644 --- a/desktop/src/io/anuke/mindustry/desktop/CrashHandler.java +++ b/desktop/src/io/anuke/mindustry/desktop/CrashHandler.java @@ -37,7 +37,9 @@ public class CrashHandler{ if(e.getMessage() != null && (e.getMessage().contains("Couldn't create window") || e.getMessage().contains("OpenGL 2.0 or higher"))){ - dialog(() -> TinyFileDialogs.tinyfd_messageBox("oh no", "Your graphics card does not support OpenGL 2.0!\n" + + dialog(() -> TinyFileDialogs.tinyfd_messageBox("oh no", + e.getMessage().contains("Couldn't create window") ? "A graphics initialization error has occured! Try to update your graphics drivers.\nReport this to the developer." : + "Your graphics card does not support OpenGL 2.0!\n" + "Try to update your graphics drivers.\n\n" + "(If that doesn't work, your computer just doesn't support Mindustry.)", "ok", "error", true)); badGPU = true;