Skip to content

Commit

Permalink
lifted game directory checking because it sucks
Browse files Browse the repository at this point in the history
  • Loading branch information
pukmajster committed Aug 27, 2024
1 parent a8f7f47 commit 5414403
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "funky",
"version": "0.2.1",
"version": "0.2.2",
"description": "Open-source mods manager for Left 4 Dead 2",
"main": "./out/main/index.js",
"author": "Žan Pukmajster",
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/src/components/SteamGamesDirectoryManager.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { userStore } from '../stores/user'
import { isDirValidSteamGamesDir } from '../utils/steam-directory'
//import { isDirValidSteamGamesDir } from '../utils/steam-directory'
// async function browseGameDir() {
// let result = await window.api.selectFolder()
Expand All @@ -11,19 +11,19 @@
export let lockStep = false
$: isValid = isDirValidSteamGamesDir($userStore.steamGamesDir)
//$: isValid = isDirValidSteamGamesDir($userStore.steamGamesDir)
$: {
lockStep = !isValid
// lockStep = !isValid
}
</script>

<input class="input variant-form-material" bind:value={$userStore.steamGamesDir} type="text" />

<!--
{#if !isValid && $userStore.steamGamesDir}
<span class="text-red-500 pl-4 text-xs"> Invalid game diretory. Look again... </span>
{/if}
{#if isValid && $userStore.steamGamesDir}
<span class="text-green-500 pl-4 text-xs"> Good directory! </span>
{/if}
{/if} -->
2 changes: 1 addition & 1 deletion src/renderer/src/components/navigation/AboutModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<p>Shoutout to Valve and the modding community</p>

<p class="text-xs opacity-60">Funky 0.2.1</p>
<p class="text-xs opacity-60">Funky 0.2.2</p>

<button on:click={close} class="btn btn-sm variant-filled">Close</button>
</div>
2 changes: 1 addition & 1 deletion src/renderer/src/utils/steam-directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ const validSteamGameDirEndings = [
]

export function isDirValidSteamGamesDir(dir: string): boolean {
return validSteamGameDirEndings.some((ending) => dir.endsWith(ending))
return validSteamGameDirEndings.some((ending) => dir.toLowerCase().endsWith(ending))
}

0 comments on commit 5414403

Please sign in to comment.