Skip to content

Commit 9fe363c

Browse files
committed
- Fixed issue when adding mods to base profile.
- Installation directory picker now shows a text field instead of empty folder tree when adding mods to base profiles of games with multiple data roots.
1 parent d1755f7 commit 9fe363c

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"author": "Mychal Thompson <mychal.r.thompson@gmail.com>",
44
"repository": "https://github.com/lVlyke/stellar-mod-loader",
55
"license": "GPL-3.0",
6-
"version": "0.13.1",
6+
"version": "0.13.2",
77
"main": "electron.js",
88
"scripts": {
99
"app:build-dist-debug": "npm run build && npm run package",

src/app/components/mod-import-options/mod-import-options.component.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
(ngModelChange)="importRequestChange$.emit(importRequest)">
1313
</mat-form-field>
1414

15-
@if (importRequest.modFilePrefix && !showInstallFolderPicker) {
15+
@if (showInstallFolderPicker ? gameModSubdirs.length === 0 : !!importRequest.modFilePrefix) {
1616
<mat-form-field appearance="fill">
1717
<mat-label>Installation Directory</mat-label>
1818
<input matInput
1919
name="modFilePrefix"
2020
type="text"
21-
[disabled]="true"
22-
[ngModel]="importRequest.modFilePrefix">
21+
[disabled]="!showInstallFolderPicker || gameModSubdirs.length > 0"
22+
[ngModel]="importRequest.modFilePrefix"
23+
(ngModelChange)="setModFilePrefix($event)">
2324
</mat-form-field>
2425
}
2526

2627
<div class="editor-pane">
27-
@if (showInstallFolderPicker) {
28+
@if (showInstallFolderPicker && gameModSubdirs.length > 0) {
2829
<div>
2930
<mat-label class="files-label">Installation Directory</mat-label>
3031

src/electron.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ class ElectronLoader {
24362436
const gamePluginFormats = gameDetails?.pluginFormats ?? [];
24372437
let foundModSubdirRoot = "";
24382438

2439-
if (!root) {
2439+
if (!root && profile.gameInstallation) {
24402440
const modDirRelName = path.relative(profile.gameInstallation.rootDir, profile.gameInstallation.modDir);
24412441
// If mod dir is child of root dir, determine if mod is packaged relative to root dir
24422442
if (!modDirRelName.startsWith(".") && !path.isAbsolute(modDirRelName)) {

0 commit comments

Comments
 (0)