diff --git a/CHANGELOG.md b/CHANGELOG.md index 996785c..dfbe05d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Geode for VS Code Changelog ## [v1.18.0] - - Geode 4.2.0 `mod.json` changes: `dependencies` may now be an object, and `dependencies` may specify `settings` for dependency-specific settings + - Geode 4.2.0 `mod.json` changes: `dependencies` and `incompatibilities` may now be objects, and `dependencies.[id]` may specify `settings` for dependency-specific settings ## [v1.17.0] - Rename `cheats` tag to `cheat` (#20, #21) diff --git a/src/project/mod.ts b/src/project/mod.ts index ede71eb..8b88062 100644 --- a/src/project/mod.ts +++ b/src/project/mod.ts @@ -433,11 +433,6 @@ export interface LegacyDependency extends Dependency { export type LegacyDependencies = LegacyDependency[]; export interface Incompatibility { - /** - * ID of the incompatability - * @pattern [a-z0-9\-_]+\.[a-z0-9\-_]+ - */ - id: string, /** * Version of the incompatability. Geode assumes the mod follows [semver](https://semver.org); * this means that versions "1.5.3" and "1.4.0" will be considered valid @@ -469,6 +464,18 @@ export interface Incompatibility { */ platforms?: ShortPlatformIDOrGeneric[], } +export interface LegacyIncompatibility extends Incompatibility { + /** + * ID of the incompatability + * @pattern [a-z0-9\-_]+\.[a-z0-9\-_]+ + */ + id: string, +} +/** + * @deprecated + * @deprecationMessage Use the object-style "incompatibilities" key instead + */ +export type LegacyIncompatibilities = LegacyIncompatibility[]; /** * A tag for a mod. See [the docs](https://docs.geode-sdk.org/mods/configuring#tags) @@ -571,7 +578,7 @@ interface ModJsonBase { /** * List of mods this mod is incompatible with */ - incompatibilities?: Incompatibility[], + incompatibilities?: { [id: string]: Version | Dependency } | LegacyIncompatibilities, resources?: Resources, /** * The mod's settings. These are editable by the user in-game through the