diff --git a/public/locales/de-de.yaml b/public/locales/de-de.yaml index 272d4ab..c7497bb 100644 --- a/public/locales/de-de.yaml +++ b/public/locales/de-de.yaml @@ -107,4 +107,5 @@ settings: title: Shaders tooltip: Benutze die Home/POS1 taste um die Shader in-spiel zu togglen items: - none: None \ No newline at end of file + none: None + custom: Custom \ No newline at end of file diff --git a/public/locales/en-us.yaml b/public/locales/en-us.yaml index cef8509..6f03bde 100644 --- a/public/locales/en-us.yaml +++ b/public/locales/en-us.yaml @@ -106,4 +106,5 @@ settings: title: Shaders tooltip: Use Home button to toggle shaders in the game items: - none: None \ No newline at end of file + none: None + custom: Custom \ No newline at end of file diff --git a/public/locales/ru-ru.yaml b/public/locales/ru-ru.yaml index d30007f..5d02920 100644 --- a/public/locales/ru-ru.yaml +++ b/public/locales/ru-ru.yaml @@ -105,4 +105,5 @@ settings: title: Шейдеры tooltip: Используйте кнопку Home чтобы переключать шейдеры в игре items: - none: Отключены \ No newline at end of file + none: Отключены + custom: Кастомные \ No newline at end of file diff --git a/src/components/ShadersSelection.svelte b/src/components/ShadersSelection.svelte index 56024ee..23d0f58 100644 --- a/src/components/ShadersSelection.svelte +++ b/src/components/ShadersSelection.svelte @@ -14,9 +14,10 @@ Shaders.list().then((list) => { shaders = list; - list.forEach((shader) => { + for (const shader of list) shadersOptions[shader.folder] = shader.name; - }); + + shadersOptions['custom'] = 'settings.shaders.items.shaders.items.custom'; }); diff --git a/src/ts/launcher/states/Launch.ts b/src/ts/launcher/states/Launch.ts index add08d5..0d6e4b3 100644 --- a/src/ts/launcher/states/Launch.ts +++ b/src/ts/launcher/states/Launch.ts @@ -77,13 +77,17 @@ export default (launcher: Launcher): Promise => { if (shaders !== 'none') { - const userShadersFile = `${constants.paths.shadersDir}/public/${shaders}/vkBasalt.conf`; const launcherShadersFile = `${await constants.paths.launcherDir}/vkBasalt.conf`; env['ENABLE_VKBASALT'] = 1; env['VKBASALT_CONFIG_FILE'] = launcherShadersFile; - await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile)); + if (shaders !== 'custom') + { + const userShadersFile = `${constants.paths.shadersDir}/public/${shaders}/vkBasalt.conf`; + + await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile)); + } } /**