Skip to content

Commit

Permalink
Update references to preloader fix
Browse files Browse the repository at this point in the history
Change the setting so it's shown only for Steam games.
  • Loading branch information
anttimaki committed Nov 12, 2024
1 parent 4ae2995 commit f877b70
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
1 change: 0 additions & 1 deletion docs/Adding a game.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
- An array of different executable names (for all platforms). For `StorePlatform` types such as `OTHER` and `STEAM_DIRECT` then the first found executable is used and called when the game is launched.
- **DataFolderName**
- Required for Unreal games relying on unreal-shimloader.
- Relevant for Mono (C#) Unity games, which use it for the `Preloader Fix` in the manager settings.
- **TsUrl**
- The Thunderstore API endpoint for the listing.
- **ExclusionsUrl**
Expand Down
16 changes: 8 additions & 8 deletions src/components/settings-components/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ import CdnProvider from '../../providers/generic/connection/CdnProvider';
'fa-exchange-alt',
() => this.emitInvoke('ToggleDownloadCache')
),
new SettingsRow(
'Debugging',
'Run preloader fix',
'Run this to fix most errors mentioning the preloader, or about duplicate assemblies.',
async () => `This will delete the ${this.activeGame.dataFolderName}/Managed folder, and verify the files through Steam`,
'fa-wrench',
() => this.emitInvoke('RunPreloaderFix')
),
new SettingsRow(
'Debugging',
'Set launch parameters',
Expand Down Expand Up @@ -388,6 +380,14 @@ import CdnProvider from '../../providers/generic/connection/CdnProvider';
},
'fa-folder-open',
() => this.emitInvoke('ChangeSteamDirectory')
),
new SettingsRow(
'Debugging',
`Reset ${this.activeGame.displayName} installation`,
'Fix problems caused by corrupted files or files left over from manual modding attempts.',
async () => `This will delete all contents of the ${this.activeGame.steamFolderName} folder, and verify the files through Steam`,
'fa-wrench',
() => this.emitInvoke('ValidateSteamInstallation')
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<p>That's because you don't legally own the game. The manager only supports legal copies.</p>
<hr/>
<h2 class='title is-5'>A text window appears and closes immediately.</h2>
<p>Try running the preloader fix on the Settings screen.</p>
<p>Try running "Reset {{$store.state.activeGame.displayName}} installation" on the Settings screen.</p>
<p>If it persists, force exit Steam and start modded with Steam closed.</p>
</div>
<div ref="Mods not appearing" v-if="activeTab === 'Mods not appearing'">
Expand Down
35 changes: 20 additions & 15 deletions src/pages/Manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,30 @@
<button class="modal-close is-large" aria-label="close"
@click="showRor2IncorrectDirectoryModal = false"></button>
</div>
<ModalCard :is-active="fixingPreloader" @close-modal="closePreloaderFixModal" :can-close="true">
<ModalCard :is-active="isValidatingSteamInstallation" @close-modal="closeSteamInstallationValidationModal" :can-close="true">
<template v-slot:header>
<h2 class='modal-title'>Attempting to fix preloader issues</h2>
<h2 class='modal-title'>Clearing the {{activeGame.displayName}} installation directory</h2>
</template>
<template v-slot:body>
<div class='notification is-warning'>
<p>You will not not be able to launch the game until Steam has verified the integrity of the
game.
<p>
You will not not be able to launch the game until
Steam has verified the integrity of the game files.
</p>
</div>
<p>Steam will be started, and will attempt to verify the integrity of {{ activeGame.displayName }}.</p>
<p>
Steam will be started and will attempt to verify the
integrity of {{ activeGame.displayName }}.
</p>
<br/>
<p>Please check the Steam window for validation progress. If the window has not yet appeared, please be
patient.
<p>
Please check the Steam window for validation progress.
If the window has not yet appeared, please be patient.
</p>
</template>
<template v-slot:footer>
<button v-if="dependencyListDisplayType === 'view'" class="button is-info"
@click="closePreloaderFixModal()">
@click="closeSteamInstallationValidationModal()">
I understand
</button>
</template>
Expand Down Expand Up @@ -190,7 +195,7 @@ import ModalCard from '../components/ModalCard.vue';
dependencyListDisplayType: string = DependencyListDisplayType.DISABLE;
portableUpdateAvailable: boolean = false;
updateTagName: string = '';
fixingPreloader: boolean = false;
isValidatingSteamInstallation: boolean = false;
exportCode: string = '';
showSteamIncorrectDirectoryModal: boolean = false;
showRor2IncorrectDirectoryModal: boolean = false;
Expand All @@ -217,16 +222,16 @@ import ModalCard from '../components/ModalCard.vue';
return this.$store.state.profile.modList;
}
closePreloaderFixModal() {
this.fixingPreloader = false;
closeSteamInstallationValidationModal() {
this.isValidatingSteamInstallation = false;
}
async fixPreloader() {
async validateSteamInstallation() {
const res = await SteamInstallationValidator.validateInstallation(this.activeGame);
if (res instanceof R2Error) {
this.$store.commit('error/handleError', res);
} else {
this.fixingPreloader = true;
this.isValidatingSteamInstallation = true;
}
}
Expand Down Expand Up @@ -546,8 +551,8 @@ import ModalCard from '../components/ModalCard.vue';
case "ToggleDownloadCache":
this.toggleIgnoreCache();
break;
case "RunPreloaderFix":
this.fixPreloader();
case "ValidateSteamInstallation":
this.validateSteamInstallation();
break;
case "SetLaunchParameters":
this.showLaunchParameters();
Expand Down

0 comments on commit f877b70

Please sign in to comment.