mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-25 17:07:58 -05:00
allow making incompatibilities platform-specific
This commit is contained in:
parent
62af8da879
commit
9f1c70ad09
1 changed files with 10 additions and 0 deletions
|
@ -228,6 +228,16 @@ Result<ModMetadata> ModMetadata::Impl::createFromSchemaV010(ModJson const& rawJs
|
|||
}
|
||||
|
||||
for (auto& incompat : root.has("incompatibilities").items()) {
|
||||
bool onThisPlatform = !incompat.has("platforms");
|
||||
for (auto& plat : incompat.has("platforms").items()) {
|
||||
if (PlatformID::coveredBy(plat.get<std::string>(), GEODE_PLATFORM_TARGET)) {
|
||||
onThisPlatform = true;
|
||||
}
|
||||
}
|
||||
if (!onThisPlatform) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Incompatibility incompatibility;
|
||||
incompat.needs("id").mustBe<std::string>(ID_REGEX, &ModMetadata::Impl::validateOldID).into(incompatibility.id);
|
||||
incompat.needs("version").into(incompatibility.version);
|
||||
|
|
Loading…
Reference in a new issue