Skip to content

Commit

Permalink
update incompatibilities too to be an object
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Jan 13, 2025
1 parent ad91219 commit 7ada3e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
19 changes: 13 additions & 6 deletions src/project/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7ada3e4

Please sign in to comment.