diff --git a/.vscode/settings.json b/.vscode/settings.json index c773663c..08ab08b7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -62,6 +62,7 @@ "MODNAME", "modsdirectoryoverride", "modtiny", + "nohub", "nomp", "nonmh", "norecord", diff --git a/modAssist_main.js b/modAssist_main.js index 34e23ceb..83be58cd 100644 --- a/modAssist_main.js +++ b/modAssist_main.js @@ -112,6 +112,7 @@ const settingsSchema = { game_settings : { type : 'string', default : path.join(pathBestGuess, 'gameSettings.xml') }, game_path : { type : 'string', default : foundGame }, cache_version : { type : 'string', default : '0.0.0' }, + game_args : { type : 'string', default : '' }, } const Store = require('electron-store') @@ -608,7 +609,7 @@ ipcMain.on('toMain_startFarmSim', () => { if ( mcStore.get('game_path') !== '' ) { const cp = require('child_process') const progPath = mcStore.get('game_path') - const child = cp.spawn(progPath, { detached : true, stdio : ['ignore', 'ignore', 'ignore'] }) + const child = cp.spawn(progPath, mcStore.get('game_args').split(' '), { detached : true, stdio : ['ignore', 'ignore', 'ignore'] }) child.unref() } else { const dialogOpts = { @@ -711,7 +712,7 @@ function openSaveGame(zipMode = false) { if ( !result.canceled ) { try { const thisSavegame = new saveFileChecker(result.filePaths[0], !zipMode, log) - windows.save.webContents.send('fromMain_saveInfo', modList, thisSavegame) + windows.save.webContents.send('fromMain_saveInfo', modList, thisSavegame, modHubList) } catch (e) { log.log.danger(`Load failed: ${e}`, 'savegame') } diff --git a/package.json b/package.json index dba14526..e2a2b29b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fsg-mod-assistant", - "version": "0.10.1", + "version": "0.10.2", "description": "FSG Farm Sim Mod Assistant", "main": "modAssist_main.js", "homepage": "https://github.com/FSGModding/FSG_Mod_Assistant#readme", diff --git a/renderer/prefs.html b/renderer/prefs.html index e599877b..dca3a128 100644 --- a/renderer/prefs.html +++ b/renderer/prefs.html @@ -32,13 +32,22 @@

-
-
-

- TODO: FIX THIS +
+
+
+

+ TODO: FIX THIS +
+
+
+
-
-
+
+ +
+ +
+
diff --git a/renderer/renderJS/savegame_ui.js b/renderer/renderJS/savegame_ui.js index 929426c0..83b3bef1 100644 --- a/renderer/renderJS/savegame_ui.js +++ b/renderer/renderJS/savegame_ui.js @@ -50,8 +50,8 @@ window.mods.receive('fromMain_collectionName', (collection, modList) => { processL10N() }) -window.mods.receive('fromMain_saveInfo', (modList, savegame) => { - console.log(savegame.errorList) +window.mods.receive('fromMain_saveInfo', (modList, savegame, modHubList) => { + console.log(modHubList) const fullModSet = new Set() const haveModSet = {} const modSetHTML = [] @@ -87,8 +87,10 @@ window.mods.receive('fromMain_saveInfo', (modList, savegame) => { isDLC : false, usedBy : null, versionMismatch : false, + isModHub : typeof modHubList.mods[thisMod] !== 'undefined', } + console.log(thisMod, thisModDetail.isModHub) if ( thisMod.startsWith('pdlc_')) { thisModDetail.isDLC = true thisModDetail.isPresent = true @@ -164,6 +166,9 @@ function makeLine(name, mod, singleFarm) { } thisHTML.push('
') + if ( !mod.isModHub && !mod.isDLC ) { + thisHTML.push(fsgUtil.badge('info bg-gradient rounded-1 ms-1', 'savegame_nohub', true)) + } if ( mod.isDLC ) { thisHTML.push(fsgUtil.badge('info bg-gradient rounded-1 ms-1', 'savegame_dlc', true)) } @@ -199,6 +204,7 @@ function clientChangeFilter() { isused : false, inactive : false, unused : false, + nohub : false, } if ( filtersActive === 0 ) { diff --git a/renderer/savegame.html b/renderer/savegame.html index 77f05bb0..b85eb163 100644 --- a/renderer/savegame.html +++ b/renderer/savegame.html @@ -54,6 +54,8 @@

+ +
diff --git a/translations/de.json b/translations/de.json index 2a54d3d7..fb6e77e3 100644 --- a/translations/de.json +++ b/translations/de.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Diese Mod wurde nicht im Spiel gekauft", "savegame_error": "Fehler im Speicherspiel gefunden", "savegame_unreadable": "Datei konnte nicht gelesen werden:", - "savegame_parse_error": "Datei konnte nicht geparst werden:" + "savegame_parse_error": "Datei konnte nicht geparst werden:", + "user_pref_setting_game_args": "Spiel-Argumente", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "Non-ModHub", + "savegmae_nohub__title": "Diese Mod ist nicht im Modhub des Spiels enthalten" } \ No newline at end of file diff --git a/translations/en.json b/translations/en.json index 1df35033..16548507 100644 --- a/translations/en.json +++ b/translations/en.json @@ -203,5 +203,9 @@ "savegame_unused__title" : "This mod has not been purchased in-game", "savegame_error" : "Errors found with savegame", "savegame_unreadable" : "Could not read file:", - "savegame_parse_error" : "Could not parse file:" + "savegame_parse_error" : "Could not parse file:", + "user_pref_setting_game_args" : "Game Arguments", + "user_pref_setting_game_args_example" : "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub" : "Non-ModHub", + "savegmae_nohub__title" : "This mod is not on the in-game modhub" } \ No newline at end of file diff --git a/translations/es.json b/translations/es.json index a8c43672..caa733fd 100644 --- a/translations/es.json +++ b/translations/es.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Este mod no ha sido comprado en el juego", "savegame_error": "Errores encontrados en la partida guardada", "savegame_unreadable": "No se pudo leer el archivo:", - "savegame_parse_error": "No se pudo analizar el archivo:" + "savegame_parse_error": "No se pudo analizar el archivo:", + "user_pref_setting_game_args": "Argumentos del juego", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "No-ModHub", + "savegmae_nohub__title": "Este mod no está en el modhub del juego" } \ No newline at end of file diff --git a/translations/fr.json b/translations/fr.json index 1563de14..37e3245f 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Ce mod n'a pas été acheté dans le jeu", "savegame_error": "Erreurs trouvées avec le jeu de sauvegarde", "savegame_unreadable": "Impossible de lire le fichier :", - "savegame_parse_error": "Impossible d'analyser le fichier :" + "savegame_parse_error": "Impossible d'analyser le fichier :", + "user_pref_setting_game_args": "Arguments de jeu", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "Non-ModHub", + "savegmae_nohub__title": "Ce mod n'est pas sur le modhub du jeu" } \ No newline at end of file diff --git a/translations/nl.json b/translations/nl.json index 2ad6feb7..475fe30d 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Deze mod is niet gekocht in het spel", "savegame_error": "Fouten gevonden met savegame", "savegame_unreadable": "Kon bestand niet lezen:", - "savegame_parse_error": "Kon bestand niet parsen:" + "savegame_parse_error": "Kon bestand niet parsen:", + "user_pref_setting_game_args": "Spelargumenten", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "Non-ModHub", + "savegmae_nohub__title": "Deze mod staat niet op de in-game modhub." } \ No newline at end of file diff --git a/translations/pl.json b/translations/pl.json index afe9a5c3..43b68195 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Ten mod nie został zakupiony w grze", "savegame_error": "Błędy znalezione przy zapisie gry", "savegame_unreadable": "Nie można odczytać pliku:", - "savegame_parse_error": "Nie można przetworzyć pliku:" -} + "savegame_parse_error": "Nie można przetworzyć pliku:", + "user_pref_setting_game_args": "Argumenty za grą", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "Non-ModHub", + "savegmae_nohub__title": "Tego moda nie ma na modhubie w grze" +} \ No newline at end of file diff --git a/translations/ru.json b/translations/ru.json index 81041d3b..0db5125c 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -203,5 +203,9 @@ "savegame_unused__title": "Этот мод не был приобретен в игре", "savegame_error": "Найдены ошибки при сохранении игры", "savegame_unreadable": "Не удалось прочитать файл:", - "savegame_parse_error": "Не удалось разобрать файл:" -} + "savegame_parse_error": "Не удалось разобрать файл:", + "user_pref_setting_game_args": "Аргументы игры", + "user_pref_setting_game_args_example": "(e.g. -cheats -skipStartVideos -scriptDebug -autoStartSavegameId ##)", + "savegame_nohub": "Non-ModHub", + "savegmae_nohub__title": "Этого мода нет на внутриигровом модхабе" +} \ No newline at end of file