Skip to content

Commit

Permalink
Merge pull request #676 from ebkr/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ebkr authored Nov 24, 2021
2 parents d650b32 + 1ae9c1f commit 2efaea0
Show file tree
Hide file tree
Showing 66 changed files with 2,558 additions and 40 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
|---|---|---|---|---|---|---|

## Features
- Support for Risk of Rain 2, Dyson Sphere Program, Valheim, GTFO, Outward, TaleSpire, H3VR, ROUNDS, Mechanica, Muck, BONEWORKS, Lethal League Blaze, Timberborn, and Totally Accurate Battle Simulator.
- Support for Risk of Rain 2, Dyson Sphere Program, Valheim, GTFO, Outward, TaleSpire, H3VR, ROUNDS, Mechanica, Muck, BONEWORKS,
Lethal League Blaze, Timberborn, Totally Accurate Battle Simulator, Nickelodeon All-Star Brawl, Inscryption and Starsand.
- A clean user interface designed to make modding as simple as possible.
- Safer mod installation allowing you to play the game through Steam normally.
- Mod profiles to switch between different sets of mods quickly and easily.
Expand Down Expand Up @@ -68,6 +69,13 @@ From small features such as always-expanded cards, all the way to larger feature
The only thing you have to consider when suggesting a feature is the impact it will have on users who don't have a lot of experience with computers.

## Changelog
### 3.1.25
- Added Nickelodeon All-Star Brawl support.
- Added Inscryption support.
- Added Starsand support.
- Configs can now be opened directly (thanks @MSchmoecker)
- Mods installed using the state-based format can now be disabled correctly. (Sideloader and BONEWORKS mods).

### (3.1.22 ... 3.1.24)
- Fixed enable/disable issue when no monomod folder is present.
- Fixed bugged profile installations.
Expand All @@ -81,14 +89,6 @@ The only thing you have to consider when suggesting a feature is the impact it w
- GTFO support for GameData/Assets folders.
- Several games can now be searched by aliases. (EG: "Risk of Rain 2" is searchable as "RoR2").

### 3.1.20
- Added Lethal League Blaze support.
- Added Timberborn support.
- BONEWORKS profile importing no longer causes failed assembly loading.
- Mods downloaded using Thunderstore's "Download with Mod Manager" button now appear in the download progress screen.
- Dependencies added to mods since the version currently installed with be downloaded and installed on updating the mod.
- Updating a mod won't forcefully update the dependencies anymore.

## Screenshots

Game selection
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "r2modman",
"version": "3.1.24",
"version": "3.1.25",
"description": "A simple and easy to use mod manager for several Unity games using Thunderstore.",
"productName": "r2modman",
"author": "ebkr",
Expand Down
2 changes: 1 addition & 1 deletion src/_managerinf/ManagerInformation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import VersionNumber from '../model/VersionNumber';

export default class ManagerInformation {
public static VERSION: VersionNumber = new VersionNumber('3.1.24');
public static VERSION: VersionNumber = new VersionNumber('3.1.25');
public static IS_PORTABLE: boolean = false;
public static APP_NAME: string = "r2modman";
}
Binary file added src/assets/images/game_selection/Starsand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/components/config-components/ConfigSelectionLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<span>{{file.getName()}}</span>
</template>
<a class='card-footer-item' @click="editConfig(file)">Edit Config</a>
<a class='card-footer-item' @click="openConfig(file)">Open File</a>
<a class='card-footer-item' @click="deleteConfig(file)">Delete</a>
</ExpandableCard>
</div>
Expand All @@ -67,6 +68,7 @@
import ConfigSort from '../../r2mm/configs/ConfigSort';
import FsProvider from '../../providers/generic/file/FsProvider';
import ManagerInformation from '../../_managerinf/ManagerInformation';
import LinkProvider from '../../providers/components/LinkProvider';
@Component({
components: {
Expand Down Expand Up @@ -147,6 +149,10 @@
this.$emit("edit", file);
}
openConfig(file: ConfigFile) {
LinkProvider.instance.openLink(file.getPath());
}
}
</script>
10 changes: 8 additions & 2 deletions src/model/game/GameManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,19 @@ export default class GameManager {
"Nickelodeon All-Star Brawl", ["Nickelodeon All-Star Brawl.exe"], "Nickelodeon All-Star Brawl_Data",
"https://nasb.thunderstore.io/api/v1/package/", "https://raw.githubusercontent.com/ebkr/r2modmanPlus/master/modExclusions.md",
[new StorePlatformMetadata(StorePlatform.STEAM, "1414850")], "NASB.jpg",
GameSelectionDisplayMode.HIDDEN, GameInstanceType.GAME, PackageLoader.BEPINEX, ["Nickelodeon All-Star Brawl", "NASB"]),
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX, ["Nickelodeon All-Star Brawl", "NASB"]),

new Game("Inscryption", "Inscryption", "Inscryption",
"Inscryption", ["Inscryption.exe"], "Inscryption_Data",
"https://inscryption.thunderstore.io/api/v1/package/", "https://raw.githubusercontent.com/ebkr/r2modmanPlus/master/modExclusions.md",
[new StorePlatformMetadata(StorePlatform.STEAM, "1092790"), new StorePlatformMetadata(StorePlatform.OTHER)], "Inscryption.png",
GameSelectionDisplayMode.HIDDEN, GameInstanceType.GAME, PackageLoader.BEPINEX)
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX),

new Game("Starsand", "Starsand", "Starsand",
"Starsand", ["Starsand.exe"], "Starsand_Data",
"https://starsand.thunderstore.io/api/v1/package/", "https://raw.githubusercontent.com/ebkr/r2modmanPlus/master/modExclusions.md",
[new StorePlatformMetadata(StorePlatform.STEAM, "1380220"), new StorePlatformMetadata(StorePlatform.EPIC_GAMES_STORE, "a774278c0813447c96a76b053cbf73ff")], "Starsand.png",
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX)

];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import MLSteamGameRunnerProvider_Win from '../steam/win32/melon_loader/MLSteamGa
import MLDirectExecutableGameRunnerProvider
from '../steam/win32/melon_loader/MLDirectExecutableGameRunnerProvider';
import MLSteamGameRunnerProvider_Linux from '../steam/linux/MLSteamGameRunnerProvider_Linux';
import DarwinGameRunnerProviderImpl from 'src/providers/generic/game/steam/darwin/DarwinGameRunnerProviderImpl';
import DarwinMLSteamGameRunnerProvider from 'src/providers/generic/game/steam/darwin/DarwinMLSteamGameRunnerProvider';
import DarwinGameDirectoryResolver from 'src/r2mm/manager/darwin/DarwinGameDirectoryResolver';
import DarwinGameRunnerProviderImpl from '../steam/darwin/DarwinGameRunnerProviderImpl';
import DarwinMLSteamGameRunnerProvider from '../steam/darwin/DarwinMLSteamGameRunnerProvider';
import DarwinGameDirectoryResolver from '../../../../r2mm/manager/darwin/DarwinGameDirectoryResolver';

type RunnerType = {
[platkey in StorePlatform]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import InstallRules_TotallyAccurateBattleSimulator
from '../default_installation_rules/game_rules/InstallRules_TotallyAccurateBattleSimulator';
import InstallRules_NASB from '../default_installation_rules/game_rules/InstallRules_NASB';
import InstallRules_Inscryption
from 'src/r2mm/installing/default_installation_rules/game_rules/InstallRules_Inscryption';
from '../default_installation_rules/game_rules/InstallRules_Inscryption';
import InstallRules_Starsand from '../default_installation_rules/game_rules/InstallRules_Starsand';

export default class InstallationRuleApplicator {

Expand All @@ -43,7 +44,8 @@ export default class InstallationRuleApplicator {
InstallRules_Timberborn(),
InstallRules_TotallyAccurateBattleSimulator(),
InstallRules_NASB(),
InstallRules_Inscryption()
InstallRules_Inscryption(),
InstallRules_Starsand(),
]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import type { CoreRuleType } from '../../InstallationRules';
import * as path from 'path';

export default function(): CoreRuleType {

return {
gameName: "Starsand",
rules: [
{
route: path.join("BepInEx", "plugins"),
isDefaultLocation: true,
defaultFileExtensions: [".dll"],
trackingMethod: "SUBDIR",
subRoutes: []
},
{
route: path.join("BepInEx", "core"),
defaultFileExtensions: [],
trackingMethod: "SUBDIR",
subRoutes: []
},
{
route: path.join("BepInEx", "patchers"),
defaultFileExtensions: [],
trackingMethod: "SUBDIR",
subRoutes: []
},
{
route: path.join("BepInEx", "monomod"),
defaultFileExtensions: [".mm.dll"],
trackingMethod: "SUBDIR",
subRoutes: []
},
{
route: path.join("BepInEx", "config"),
defaultFileExtensions: [],
trackingMethod: "NONE",
subRoutes: []
}
]
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ export default class GenericProfileInstaller extends ProfileInstallerProvider {
}

async disableMod(mod: ManifestV2, profile: Profile): Promise<R2Error | void> {
return this.applyModMode(mod, new FileTree(), profile, "", ModMode.DISABLED);
return this.applyModMode(mod, new FileTree(), profile, profile.getPathOfProfile(), ModMode.DISABLED);
}

async enableMod(mod: ManifestV2, profile: Profile): Promise<R2Error | void> {
return this.applyModMode(mod, new FileTree(), profile, "", ModMode.ENABLED);
return this.applyModMode(mod, new FileTree(), profile, profile.getPathOfProfile(), ModMode.ENABLED);
}

async getDescendantFiles(tree: FileTree | null, location: string): Promise<string[]> {
Expand Down Expand Up @@ -249,7 +249,7 @@ export default class GenericProfileInstaller extends ProfileInstallerProvider {
private async installState(profile: Profile, rule: ManagedRule, installSources: string[], mod: ManifestV2) {
const fileRelocations = new Map<string, string>();
for (const source of installSources) {
if (!(this.rule.relativeFileExclusions || []).find(value => value.toLowerCase() === path.basename(source))) {
if (!(this.rule.relativeFileExclusions || []).find(value => value.toLowerCase() === path.basename(source.toLowerCase()))) {
if ((await FsProvider.instance.lstat(source)).isFile()) {
fileRelocations.set(source, path.join(rule.route, path.basename(source)));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ export const MOD_LOADER_VARIANTS: {[key: string]: ModLoaderPackageMapping[]} = {
Timberborn: [new ModLoaderPackageMapping("BepInEx-BepInExPack_Timberborn", "BepInExPack_Timberborn", PackageLoader.BEPINEX)],
TABS: [new ModLoaderPackageMapping("BepInEx-BepInExPack_TABS", "BepInExPack_TABS", PackageLoader.BEPINEX)],
NASB: [new ModLoaderPackageMapping("BepInEx-BepInExPack_NASB", "BepInExPack_NASB", PackageLoader.BEPINEX)],
Inscryption: [new ModLoaderPackageMapping("BepInEx-BepInExPack_Inscryption", "BepInExPack_Inscryption", PackageLoader.BEPINEX)]
Inscryption: [new ModLoaderPackageMapping("BepInEx-BepInExPack_Inscryption", "BepInExPack_Inscryption", PackageLoader.BEPINEX)],
Starsand: [new ModLoaderPackageMapping("BepInEx-BepInExPack_Starsand", "BepInExPack_Starsand", PackageLoader.BEPINEX)],
}
2 changes: 1 addition & 1 deletion src/r2mm/manager/SettingsDexieStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class SettingsDexieStore extends Dexie {

// Add all games to store. Borked v2-3 locally
// Increment per game or change to settings.
this.version(21).stores(store);
this.version(22).stores(store);

this.activeGame = game;
this.global = this.table("value");
Expand Down
18 changes: 9 additions & 9 deletions src/r2mm/manager/darwin/DarwinGameDirectoryResolver.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import GameDirectoryResolverProvider from 'src/providers/ror2/game/GameDirectoryResolverProvider';
import Game from 'src/model/game/Game';
import R2Error from 'src/model/errors/R2Error';
import GameDirectoryResolverProvider from '../../../providers/ror2/game/GameDirectoryResolverProvider';
import Game from '../../../model/game/Game';
import R2Error from '../../../model/errors/R2Error';
import path from 'path';
import { homedir } from 'os';
import FsProvider from 'src/providers/generic/file/FsProvider';
import ManagerSettings from 'src/r2mm/manager/ManagerSettings';
import FileNotFoundError from 'src/model/errors/FileNotFoundError';
import FsProvider from '../../../providers/generic/file/FsProvider';
import ManagerSettings from '../../manager/ManagerSettings';
import FileNotFoundError from '../../../model/errors/FileNotFoundError';
import * as vdf from '@node-steam/vdf';
import VdfParseError from 'src/model/errors/Vdf/VdfParseError';
import LoggerProvider, { LogSeverity } from 'src/providers/ror2/logging/LoggerProvider';
import GameManager from 'src/model/game/GameManager';
import VdfParseError from '../../../model/errors/Vdf/VdfParseError';
import LoggerProvider, { LogSeverity } from '../../../providers/ror2/logging/LoggerProvider';
import GameManager from '../../../model/game/GameManager';

export default class DarwinGameDirectoryResolver extends GameDirectoryResolverProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Empty file.
Binary file added test/folder-structure-testing/Package/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
36 changes: 36 additions & 0 deletions test/folder-structure-testing/depopulator.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Run manually via `node ./populator.mjs`
* ---------------------------------------
* Produces a package structure that allows testing different package formats in a sane way.
*/

import * as fs from "fs";
import * as path from "path";

function getDestinationDirs(basePath) {
const destDirs = [];
const items = fs.readdirSync(basePath);
const containsFiles = items.find(x => !fs.statSync(path.join(basePath, x)).isDirectory());
const containsMetadataFiles = items.find(x => ["manifest.json", "readme.md", "icon.png"].includes(x.toLowerCase()));
if (items.length === 0) {
return [];
} else if (containsFiles && !containsMetadataFiles) {
return [basePath];
} else {
items.forEach(item => {
const newBasePath = path.join(basePath, item);
if (fs.statSync(newBasePath).isDirectory()) {
destDirs.push(...getDestinationDirs(newBasePath));
}
});
}
return destDirs;
}

const srcDest = path.join(process.cwd(), "Package");
const destDirs = getDestinationDirs(srcDest);

destDirs.forEach(dest => {
fs.readdirSync(dest).forEach(x => fs.unlinkSync(path.join(dest, x)));
fs.rmdirSync(dest);
});
Loading

0 comments on commit 2efaea0

Please sign in to comment.