remove gd mod.json shorthand, per platform is now required

closes #471
This commit is contained in:
matcool 2024-06-03 10:15:26 -03:00
parent 6b52da266c
commit 9a9f63a82f
4 changed files with 16 additions and 6 deletions

View file

@ -1,6 +1,10 @@
{
"geode": "@PROJECT_VERSION@@PROJECT_VERSION_SUFFIX@",
"gd": "*",
"gd": {
"win": "*",
"mac": "*",
"android": "*"
},
"id": "geode.loader",
"version": "@PROJECT_VERSION@@PROJECT_VERSION_SUFFIX@",
"name": "Geode",

View file

@ -134,9 +134,7 @@ Result<ModMetadata> ModMetadata::Impl::createFromSchemaV010(ModJson const& rawJs
// (use rawJson because i dont like JsonMaybeValue)
if (rawJson.contains("gd")) {
std::string ver;
if (rawJson["gd"].is_string()) {
ver = rawJson["gd"].as_string();
} else if (rawJson["gd"].is_object()) {
if (rawJson["gd"].is_object()) {
auto key = PlatformID::toShortString(GEODE_PLATFORM_TARGET, true);
if (rawJson["gd"].contains(key) && rawJson["gd"][key].is_string())
ver = rawJson["gd"][key].as_string();

View file

@ -1,6 +1,10 @@
{
"geode": "@GEODE_VERSION_FULL@",
"gd": "*",
"gd": {
"win": "*",
"mac": "*",
"android": "*"
},
"version": "1.0.0",
"id": "geode.testdep",
"name": "Geode Test Dependency",

View file

@ -1,6 +1,10 @@
{
"geode": "@GEODE_VERSION_FULL@",
"gd": "*",
"gd": {
"win": "*",
"mac": "*",
"android": "*"
},
"version": "1.0.0",
"id": "geode.test",
"name": "Geode Test",