Skip to content

Commit

Permalink
added checks for whether the game is currently being managed
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicJinn committed May 30, 2024
1 parent 6551836 commit b9bccbb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game-sunlesssea/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function prepareForModding(discovery) { // Check whether these directories
return Promise.all(["BepInEx/plugins", "BepInEx/patchers", JSON_MOD_PATH()].map(dirPath => ensureDir(dirPath)));
}

function isBepInExMod(files) {
function isBepInExMod(files, gameId) {
// Check if any of the files in the mod archive have a BepInEx mod
let hasBepInExMod = files.some(file => {
const ext = path.extname(file).toLowerCase();
Expand All @@ -84,18 +84,18 @@ function isBepInExMod(files) {
installPath = checkBepInExDirectoryStructure(files)
}

let supported = hasBepInExMod
let supported = hasBepInExMod && gameId === GAME_ID
return Promise.resolve({
supported,
requiredFiles: [],
});
}

function isJSONAddon(files) {
function isJSONAddon(files, gameId) {
// Initial setup for loading JSON mods
modType = "json"
installPath = checkJsonDirectoryStructure(files)
let supported = true
let supported = gameId === GAME_ID;
return Promise.resolve({
supported,
requiredFiles: [],
Expand Down

0 comments on commit b9bccbb

Please sign in to comment.