- Initial implementation of sound profiles, part 2.

This commit is contained in:
Michael Kamensky
2021-11-03 09:01:53 +03:00
parent 238a3ea17a
commit 5aa25f7ad0
6 changed files with 12 additions and 4 deletions

View File

@@ -142,6 +142,7 @@ nlCompactMainMenu=Aktiviere, um im Seitenmenü platzsparend immer nur eine Menü
nlUseSentry=Aktiviere, um automatische Fehlerberichte an die Entwickler zu senden.
GamePlay=Spiel
nlpMulliganRule=Wähle die Version der Mulligan Regel
nlpSoundProfiles=Choose the sound profile from the ones present in the "sound" folder in your Forge cache directory
nlpAiProfiles=Wähle die Spielweise deines KI-Gegners.
nlpStackAdditions=Wähle, wann du über Änderungen am Stapel benachrichtigt werden möchtest: Niemals, immer oder nur für durch andere Spieler ausgelöste Effekte und Fähigkeiten
nlAnte=Entscheidet, ob um einen Einsatz (Ante) gespielt wird.

View File

@@ -143,6 +143,7 @@ nlCompactMainMenu=Habilitar para una barra lateral eficiente en espacio que mues
nlUseSentry=Cuando está habilitado, envía automáticamente informes de errores a los desarrolladores.
GamePlay=Juego
nlpMulliganRule=Elige versión de reglas de mulligan
nlpSoundProfiles=Choose the sound profile from the ones present in the "sound" folder in your Forge cache directory
nlpAiProfiles=Elige tu oponente de la IA
nlpStackAdditions=Elige cuándo quieres recibir notificaciones visuales para un efecto añadido a la pila: Nunca, siempre o sólo para los efectos lanzados/activados por un jugador IA o activados por cualquier jugador
nlAnte=Determina si el juego se juega con apuesta o no.

View File

@@ -142,6 +142,7 @@ nlCompactMainMenu=Abilitare per una barra laterale efficiente in termini di spaz
nlUseSentry=Se abilitato, invia automaticamente segnalazioni di bug agli sviluppatori.
GamePlay=Gameplay
nlpMulliganRule=Scegli il tipo di Mulligan
nlpSoundProfiles=Choose the sound profile from the ones present in the "sound" folder in your Forge cache directory
nlpAiProfiles=Scegli il tuo avversario (IA)
nlpStackAdditions=Scegli quando vuoi ricevere una notifica visiva di un effetto aggiunto alla pila: Mai, sempre, o solo per gli effetti lanciati/attivati da un giocatore IA o innescati da un qualsiasi giocatore
nlAnte=Determina se l''incontro è giocato o meno con la posta.

View File

@@ -143,6 +143,7 @@ nlCompactMainMenu=サイドバーに同時に一つのメニューグループ
nlUseSentry=有効にすると、バグレポートが開発者に自動的に送信されます。
GamePlay=ゲーム設定
nlpMulliganRule=マリガンルールを選択する。
nlpSoundProfiles=Choose the sound profile from the ones present in the "sound" folder in your Forge cache directory
nlpAiProfiles=対戦相手 AI の性格を選択する。
nlpStackAdditions=スタックに追加された能力の視覚通知をいつ取得するかを選択しますNever[しない]、Always[常時]、またはAIプレーヤーによってキャスト/起動された能力、または任意のプレーヤーによって誘発された能力に対してのみ
nlAnte=ゲームでアンティ(賭け)ルールを適用するか選択する。

View File

@@ -143,6 +143,7 @@ nlCompactMainMenu=启用节省空间的侧边栏,一次只显示一个菜单
nlUseSentry=启用后,会自动向开发人员提交错误报告。
GamePlay=游戏
nlpMulliganRule=选择调度规则
nlpSoundProfiles=Choose the sound profile from the ones present in the "sound" folder in your Forge cache directory
nlpAiProfiles=选择你的AI对手
nlpStackAdditions=选择何时因效应进入堆叠而提供视觉提醒从不总是任何由AI释放或起动以及由任何玩家触发的效应。
nlAnte=确定游戏是否使用赌注

View File

@@ -107,7 +107,7 @@ public class SoundSystem {
*/
public void play(final String resourceFileName, final boolean isSynchronized) {
if (isUsingAltSystem()) {
GuiBase.getInterface().startAltSoundSystem(ForgeConstants.SOUND_DIR + resourceFileName, isSynchronized);
GuiBase.getInterface().startAltSoundSystem(getSoundDirectory() + resourceFileName, isSynchronized);
}
else {
final IAudioClip snd = fetchResource(resourceFileName);
@@ -122,7 +122,7 @@ public class SoundSystem {
*/
public void play(final SoundEffectType type, final boolean isSynchronized) {
if (isUsingAltSystem()) {
GuiBase.getInterface().startAltSoundSystem(ForgeConstants.SOUND_DIR + type.getResourceFileName(), isSynchronized);
GuiBase.getInterface().startAltSoundSystem(getSoundDirectory() + type.getResourceFileName(), isSynchronized);
} else {
final IAudioClip snd = fetchResource(type);
if (!isSynchronized || snd.isDone()) {
@@ -248,18 +248,21 @@ public class SoundSystem {
public static String[] getAvailableSoundProfiles()
{
final List<String> availableProfiles = new ArrayList<>();
availableProfiles.add("Default");
final File dir = new File(ForgeConstants.CACHE_SOUND_DIR);
if (dir != null && dir.exists()) {
final String[] files = dir.list();
for (String fileName : files) {
if (!fileName.equals("Default") && new File(fileName).isDirectory()) {
String fullPath = ForgeConstants.CACHE_SOUND_DIR + fileName;
if (!fileName.equals("Default") && new File(fullPath).isDirectory()) {
availableProfiles.add(fileName);
}
}
}
Collections.sort(availableProfiles);
availableProfiles.add(0, "Default");
return availableProfiles.toArray(new String[availableProfiles.size()]);
}