diff --git a/AndorsTrail/res/values-de/strings.xml b/AndorsTrail/res/values-de/strings.xml index d2ded41e0..d5504a9b9 100644 --- a/AndorsTrail/res/values-de/strings.xml +++ b/AndorsTrail/res/values-de/strings.xml @@ -255,26 +255,18 @@ Beute-Dialog anzeigen + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Kurze Nachricht + Show short notification only when finding items Nicht anzeigen - - 0 - 1 - 2 - Sofort (keine Animation) Schnell Normal Langsam - - 0 - 400 - 1000 - 1500 - Bewegung Bewegungsmethode @@ -283,10 +275,6 @@ Direkt (original) Hindernisse umgehen - - 0 - 1 - @@ -323,11 +311,6 @@ 1,5-fache Größe Doppelte Größe - - 1.0f - 1.5f - 2.0f - Quickslot zuweisen Quickslot 1 @@ -354,17 +337,6 @@ Obere rechte Ecke Oben in der Mitte - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - andauernder Effekt Jede Runde @@ -549,11 +521,6 @@ Nur dann eine Bestätigung anzeigen, wenn ein anderer Spielername überschrieben wird Nie eine Bestätigung anzeigen - - 0 - 1 - 2 - Bestätige das Überschreiben von Spielständen Zeigt eine Frage an ob beim Speichern auf einen bereits existierenden Spielstand dieser überschrieben werden soll. diff --git a/AndorsTrail/res/values-fr/strings.xml b/AndorsTrail/res/values-fr/strings.xml index b0073b216..6cb8fcda7 100644 --- a/AndorsTrail/res/values-fr/strings.xml +++ b/AndorsTrail/res/values-fr/strings.xml @@ -248,26 +248,18 @@ Afficher la boîte de dialogue des butins + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Afficher une simple notification + Show short notification only when finding items Ne rien afficher - - 0 - 1 - 2 - Instantanée (pas d\'animations) Rapide Normale Lente - - 0 - 400 - 1000 - 1500 - Déplacement Méthode de déplacement @@ -276,10 +268,6 @@ Tout droit Éviter les obstacles - - 0 - 1 - @@ -320,11 +308,6 @@ Zoom de 150% Zoom de 200% - - 1.0f - 1.5f - 2.0f - Affecter un emplacement rapide Emplacement 1 @@ -352,17 +335,6 @@ En haut à droite Centrée en haut - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - Effet continu À chaque tour diff --git a/AndorsTrail/res/values-it/strings.xml b/AndorsTrail/res/values-it/strings.xml index 0fb41e436..507bf1c39 100644 --- a/AndorsTrail/res/values-it/strings.xml +++ b/AndorsTrail/res/values-it/strings.xml @@ -246,26 +246,18 @@ Mostra il resoconto del bottino + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Mostra notifica corta + Show short notification only when finding items Non mostrare - - 0 - 1 - 2 - Istantanea (nessuna animazione) Veloce Normale Lenta - - 0 - 400 - 1000 - 1500 - Movimento Tipo di movimento @@ -274,10 +266,6 @@ Diritto (originale) Direzionale - - 0 - 1 - @@ -314,11 +302,6 @@ 1.5x normale Raddoppia - - 1.0f - 1.5f - 2.0f - diff --git a/AndorsTrail/res/values-ja/strings.xml b/AndorsTrail/res/values-ja/strings.xml index a4fac72ce..f9b4c93b5 100644 --- a/AndorsTrail/res/values-ja/strings.xml +++ b/AndorsTrail/res/values-ja/strings.xml @@ -261,26 +261,18 @@ ダイアログボックスを表示 + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise 短い通知を表示 + Show short notification only when finding items 表示なし - - 0 - 1 - 2 - 即時(アニメーションなし) 速い 普通 遅い - - 0 - 400 - 1000 - 1500 - 移動 移動方法 @@ -289,10 +281,6 @@ 直進 (original) 障害物を回避する - - 0 - 1 - @@ -329,11 +317,6 @@ 1.5x 2.0x - - 1.0f - 1.5f - 2.0f - クイック・スロットに入れる Slot 1 @@ -360,17 +343,6 @@ 右上 - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 状態変化を受けている間 ラウンドごとに diff --git a/AndorsTrail/res/values-pl/strings.xml b/AndorsTrail/res/values-pl/strings.xml index c6da50ea4..654eb8966 100644 --- a/AndorsTrail/res/values-pl/strings.xml +++ b/AndorsTrail/res/values-pl/strings.xml @@ -257,26 +257,18 @@ Translated by toudi5-bełchatów Pokaż okienko zdobytych przedmiotów + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Pokaż krótką informacje + Show short notification only when finding items Nie wyświetlaj - - 0 - 1 - 2 - Natychmiastowe (bez animacji) Szybkie Normalne Wolne - - 0 - 400 - 1000 - 1500 - Ruch Metoda poruszania się @@ -285,10 +277,6 @@ Translated by toudi5-bełchatów Prosta (oryginalna) Omijanie obiektów - - 0 - 1 - @@ -325,11 +313,6 @@ Translated by toudi5-bełchatów 1.5x powiększony Podwójnie powiększony - - 1.0f - 1.5f - 2.0f - Przypisz szybki slot Slot 1 @@ -356,17 +339,6 @@ Translated by toudi5-bełchatów Prawy górny róg Na górze po środku - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - Stały efekt Co turę @@ -551,11 +523,6 @@ Translated by toudi5-bełchatów Pokazuj tylko, gdy nadpisuję plik z innym imieniem bohatera Nigdy nie pokazuj okienka potwierdzeń - - 0 - 1 - 2 - Potwierdź nadpisanie gry Zadaje pytanie zawsze, gdy chcesz nadpisać grę na slocie, który jest już zajęty. diff --git a/AndorsTrail/res/values-pt-rBR/strings.xml b/AndorsTrail/res/values-pt-rBR/strings.xml index def05f2b1..3b0cba8b7 100644 --- a/AndorsTrail/res/values-pt-rBR/strings.xml +++ b/AndorsTrail/res/values-pt-rBR/strings.xml @@ -256,26 +256,18 @@ Mostrar caixa de diálogo com despojos + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Mostrar notificação curta + Show short notification only when finding items Não mostrar - - 0 - 1 - 2 - Instantânea (sem animações) Rápida Normal Lenta - - 0 - 400 - 1000 - 1500 - Deslocamento Método de deslocamento @@ -284,10 +276,6 @@ Linha reta (modo padrão) Contornar obstáculos - - 0 - 1 - @@ -324,11 +312,6 @@ 1.5x o tamanho Dobro do tamanho - - 1.0f - 1.5f - 2.0f - Atribuir posição rápida Posição 1 @@ -355,17 +338,6 @@ Canto superior direito Cima - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - Efeito constante Todos os turnos @@ -551,11 +523,6 @@ Mostra apenas quando sobre-estcrevendo em cima de salvamento de outro jogador Nunca mostra diálogo de confirmação - - 0 - 1 - 2 - Confirma re-escrita de salvamento Pergunta o que deve ser feito caso tente-se gravar sobre um salvamento anterior. diff --git a/AndorsTrail/res/values-pt/strings.xml b/AndorsTrail/res/values-pt/strings.xml index 53dbba43b..0f1634f45 100644 --- a/AndorsTrail/res/values-pt/strings.xml +++ b/AndorsTrail/res/values-pt/strings.xml @@ -255,26 +255,18 @@ Mostrar caixa de diálogo com despojos + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Mostrar notificação curta + Show short notification only when finding items Não mostrar - - 0 - 1 - 2 - Instantânea (sem animações) Rápida Normal Lenta - - 0 - 400 - 1000 - 1500 - Deslocação Método de deslocação @@ -283,10 +275,6 @@ Linha recta (original) Contornar obstáculos - - 0 - 1 - @@ -323,11 +311,6 @@ 1.5x o tamanho Dobro do tamanho - - 1.0f - 1.5f - 2.0f - Atribuir posição rápida Posição 1 @@ -354,17 +337,6 @@ Canto superior direito Cima - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - Efeito constante Todos os turnos diff --git a/AndorsTrail/res/values-ru/strings.xml b/AndorsTrail/res/values-ru/strings.xml index 504e64174..f2a61fbba 100644 --- a/AndorsTrail/res/values-ru/strings.xml +++ b/AndorsTrail/res/values-ru/strings.xml @@ -255,26 +255,18 @@ Показывать диалог + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Короткое уведомление + Show short notification only when finding items Не показывать - - 0 - 1 - 2 - Мгновенно (без анимации) Быстро Нормально Медленно - - 0 - 400 - 1000 - 1500 - Движение Способ движения @@ -283,10 +275,6 @@ Прямо (базовый) Обходить препятствия - - 0 - 1 - @@ -323,11 +311,6 @@ Крупнее в 1.5 раза Двойной размер - - 1.0f - 1.5f - 2.0f - Назначить быстрый слот Слот №1 @@ -354,17 +337,6 @@ Правый верхний угол Сверху в центре - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - Постоянный эффект Каждый ход diff --git a/AndorsTrail/res/values/strings.xml b/AndorsTrail/res/values/strings.xml index a09f53e62..229701cac 100644 --- a/AndorsTrail/res/values/strings.xml +++ b/AndorsTrail/res/values/strings.xml @@ -254,13 +254,19 @@ Determines how fast monsters attack. - Show loot dialog box + Always show loot dialog box + Show loot dialog box when finding items + Show loot dialog box when finding items, short notification otherwise Show short notification - Do not display + Show short notification only when finding items + Do not display 0 + 3 + 4 1 + 5 2 diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/AndorsTrailPreferences.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/AndorsTrailPreferences.java index 3bb001aba..7993afbff 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/AndorsTrailPreferences.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/AndorsTrailPreferences.java @@ -5,8 +5,11 @@ import android.content.SharedPreferences; import android.preference.PreferenceManager; public final class AndorsTrailPreferences { - public static final int DISPLAYLOOT_DIALOG = 0; + public static final int DISPLAYLOOT_DIALOG_ALWAYS = 0; + public static final int DISPLAYLOOT_DIALOG_FOR_ITEMS = 3; + public static final int DISPLAYLOOT_DIALOG_FOR_ITEMS_ELSE_TOAST = 4; public static final int DISPLAYLOOT_TOAST = 1; + public static final int DISPLAYLOOT_TOAST_FOR_ITEMS = 5; public static final int DISPLAYLOOT_NONE = 2; public static final int MOVEMENTMETHOD_STRAIGHT = 0; public static final int MOVEMENTMETHOD_DIRECTIONAL = 1; @@ -35,7 +38,7 @@ public final class AndorsTrailPreferences { public boolean confirmRest = true; public boolean confirmAttack = true; - public int displayLoot = DISPLAYLOOT_DIALOG; + public int displayLoot = DISPLAYLOOT_DIALOG_ALWAYS; public boolean fullscreen = true; public int attackspeed_milliseconds = 1000; public int movementMethod = MOVEMENTMETHOD_STRAIGHT; @@ -54,7 +57,7 @@ public final class AndorsTrailPreferences { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(androidContext); dest.confirmRest = prefs.getBoolean("confirm_rest", true); dest.confirmAttack = prefs.getBoolean("confirm_attack", true); - dest.displayLoot = Integer.parseInt(prefs.getString("display_lootdialog", Integer.toString(DISPLAYLOOT_DIALOG))); + dest.displayLoot = Integer.parseInt(prefs.getString("display_lootdialog", Integer.toString(DISPLAYLOOT_DIALOG_ALWAYS))); dest.fullscreen = prefs.getBoolean("fullscreen", true); dest.attackspeed_milliseconds = Integer.parseInt(prefs.getString("attackspeed", "1000")); dest.movementMethod = Integer.parseInt(prefs.getString("movementmethod", Integer.toString(MOVEMENTMETHOD_STRAIGHT))); @@ -71,7 +74,7 @@ public final class AndorsTrailPreferences { } catch (Exception e) { dest.confirmRest = true; dest.confirmAttack = true; - dest.displayLoot = DISPLAYLOOT_DIALOG; + dest.displayLoot = DISPLAYLOOT_DIALOG_ALWAYS; dest.fullscreen = true; dest.attackspeed_milliseconds = 1000; dest.movementMethod = MOVEMENTMETHOD_STRAIGHT; diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java index bc2bcd8e0..84566918e 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/activity/MainActivity.java @@ -369,11 +369,23 @@ public final class MainActivity extends Activity implements PlayerMovementListen @Override public void onPlayerPickedUpGroundLoot(Loot loot) { if (controllers.preferences.displayLoot == AndorsTrailPreferences.DISPLAYLOOT_NONE) return; - + if (!showToastForPickedUpItems(loot)) return; + final String msg = Dialogs.getGroundLootPickedUpMessage(this, loot); showToast(msg, Toast.LENGTH_LONG); } + private boolean showToastForPickedUpItems(Loot loot) { + switch (controllers.preferences.displayLoot) { + case AndorsTrailPreferences.DISPLAYLOOT_TOAST: + case AndorsTrailPreferences.DISPLAYLOOT_DIALOG_FOR_ITEMS_ELSE_TOAST: + return true; + case AndorsTrailPreferences.DISPLAYLOOT_TOAST_FOR_ITEMS: + return loot.hasItems(); + } + return false; + } + @Override public void onPlayerFoundMonsterLoot(Collection loot, int exp) { final Loot combinedLoot = Loot.combine(loot); @@ -384,8 +396,10 @@ public final class MainActivity extends Activity implements PlayerMovementListen @Override public void onPlayerPickedUpMonsterLoot(Collection loot, int exp) { if (controllers.preferences.displayLoot == AndorsTrailPreferences.DISPLAYLOOT_NONE) return; - + final Loot combinedLoot = Loot.combine(loot); + if (!showToastForPickedUpItems(combinedLoot)) return; + final String msg = Dialogs.getMonsterLootPickedUpMessage(this, combinedLoot, exp); showToast(msg, Toast.LENGTH_LONG); } diff --git a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ItemController.java b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ItemController.java index ab7613e8e..9b74e47d0 100644 --- a/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ItemController.java +++ b/AndorsTrail/src/com/gpl/rpg/AndorsTrail/controller/ItemController.java @@ -97,7 +97,7 @@ public final class ItemController { } public void playerSteppedOnLootBag(Loot loot) { - if (loot.isVisible && pickupLootBagWithoutConfirmation()) { + if (pickupLootBagWithoutConfirmation(loot)) { controllers.mapController.worldEventListeners.onPlayerPickedUpGroundLoot(loot); pickupAll(loot); removeLootBagIfEmpty(loot); @@ -108,7 +108,7 @@ public final class ItemController { } public void lootMonsterBags(Collection killedMonsterBags, int totalExpThisFight) { - if (pickupLootBagWithoutConfirmation() || !Loot.hasItems(killedMonsterBags)) { + if (pickupLootBagsWithoutConfirmation(killedMonsterBags)) { controllers.mapController.worldEventListeners.onPlayerPickedUpMonsterLoot(killedMonsterBags, totalExpThisFight); pickupAll(killedMonsterBags); removeLootBagIfEmpty(killedMonsterBags); @@ -119,8 +119,22 @@ public final class ItemController { } } - private boolean pickupLootBagWithoutConfirmation() { - if (controllers.preferences.displayLoot == AndorsTrailPreferences.DISPLAYLOOT_DIALOG) return false; + private boolean pickupLootBagWithoutConfirmation(Loot bag) { + if (bag.isContainer()) return false; + switch (controllers.preferences.displayLoot) { + case AndorsTrailPreferences.DISPLAYLOOT_DIALOG_ALWAYS: + return false; + case AndorsTrailPreferences.DISPLAYLOOT_DIALOG_FOR_ITEMS: + case AndorsTrailPreferences.DISPLAYLOOT_DIALOG_FOR_ITEMS_ELSE_TOAST: + if (bag.hasItems()) return false; + } + return true; + } + + private boolean pickupLootBagsWithoutConfirmation(Collection bags) { + for(Loot bag : bags) { + if (!pickupLootBagWithoutConfirmation(bag)) return false; + } return true; }