mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-04 01:01:00 -04:00
Merge branch 'main' of https://github.com/geode-sdk/geode
This commit is contained in:
commit
ebf55395f5
2 changed files with 12 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
|||
* Make `queueInMainThread` take in a movable callback (0c35a92)
|
||||
* Add `CCMenuItemExt` for lambda versions of CCMenuItem classes (de73317)
|
||||
* Add `scrollToTop` for ScrollLayer (7071bb1)
|
||||
* Add a new `Task` class for generic task implementations
|
||||
* Add a new `Task` class for generic asynchronous task implementations
|
||||
* Documentation can be found [here](https://docs.geode-sdk.org/tutorials/tasks/)
|
||||
* Add a special task named `WebTask` for handling web requests
|
||||
* Fix `Unzip` crash on missing progress callback (1145426)
|
||||
|
|
|
@ -327,10 +327,19 @@ Result<ServerModVersion> ServerModVersion::parse(matjson::Value const& raw) {
|
|||
auto obj = incompat.obj();
|
||||
|
||||
ModMetadata::Incompatibility incompatibility;
|
||||
obj.needs("mod_id").validate(MiniFunction<bool(std::string const&)>(&ModMetadata::validateID)).into(incompatibility.id);
|
||||
obj.needs("version").into(incompatibility.version);
|
||||
obj.has("importance").into(incompatibility.importance);
|
||||
|
||||
auto modIdValue = obj.needs("mod_id");
|
||||
|
||||
// Do not validate if we have a supersede, maybe the old ID is invalid
|
||||
if (incompatibility.importance == ModMetadata::Incompatibility::Importance::Superseded) {
|
||||
modIdValue.into(incompatibility.id);
|
||||
} else {
|
||||
modIdValue.validate(MiniFunction<bool(std::string const&)>(&ModMetadata::validateID)).into(incompatibility.id);
|
||||
}
|
||||
|
||||
obj.needs("version").into(incompatibility.version);
|
||||
|
||||
// Check if this incompatability is installed, and if so assign the `mod` member to mark that
|
||||
auto mod = Loader::get()->getInstalledMod(incompatibility.id);
|
||||
if (mod && incompatibility.version.compare(mod->getVersion())) {
|
||||
|
|
Loading…
Add table
Reference in a new issue