@@ -253,7 +253,7 @@ void Loader::Impl::updateModResources(Mod* mod) {
253253 }
254254
255255 // only thing needs previous setup is spritesheets
256- auto & sheets = mod->getMetadataRef ().getSpritesheets ();
256+ auto & sheets = mod->getMetadata ().getSpritesheets ();
257257 if (sheets.empty ())
258258 return ;
259259
@@ -416,7 +416,7 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
416416 // invalid target version
417417 // Also this makes it so that when GD updates, outdated mods get shown as
418418 // "Outdated" in the UI instead of "Missing Dependencies"
419- auto res = node->getMetadataRef ().checkGameVersion ();
419+ auto res = node->getMetadata ().checkGameVersion ();
420420 if (!res) {
421421 this ->addProblem ({
422422 LoadProblem::Type::UnsupportedVersion,
@@ -427,10 +427,10 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
427427 return ;
428428 }
429429
430- auto geodeVerRes = node->getMetadataRef ().checkGeodeVersion ();
430+ auto geodeVerRes = node->getMetadata ().checkGeodeVersion ();
431431 if (!geodeVerRes) {
432432 this ->addProblem ({
433- node->getMetadataRef ().getGeodeVersion () > this ->getVersion () ?
433+ node->getMetadata ().getGeodeVersion () > this ->getVersion () ?
434434 LoadProblem::Type::NeedsNewerGeodeVersion :
435435 LoadProblem::Type::UnsupportedGeodeVersion,
436436 node,
@@ -463,7 +463,7 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
463463
464464 auto unzipFunction = [this , node]() {
465465 log::debug (" Unzipping .geode file" );
466- auto res = this ->unzipGeodeFile (node->getMetadataRef ());
466+ auto res = this ->unzipGeodeFile (node->getMetadata ());
467467 return res;
468468 };
469469
@@ -487,7 +487,7 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
487487 };
488488
489489 { // version checking
490- if (auto reason = node->getMetadataRef ().m_impl ->m_softInvalidReason ) {
490+ if (auto reason = node->getMetadata ().m_impl ->m_softInvalidReason ) {
491491 this ->addProblem ({
492492 LoadProblem::Type::InvalidFile,
493493 node,
@@ -553,7 +553,7 @@ void Loader::Impl::findProblems() {
553553 log::debug (" {}" , id);
554554 log::NestScope nest;
555555
556- for (auto const & dep : mod->getMetadataRef ().getDependencies ()) {
556+ for (auto const & dep : mod->getMetadata ().getDependencies ()) {
557557 if (dep.mod && dep.mod ->isEnabled () && dep.version .compare (dep.mod ->getVersion ()))
558558 continue ;
559559
@@ -628,7 +628,7 @@ void Loader::Impl::findProblems() {
628628 }
629629 }
630630
631- for (auto const & dep : mod->getMetadataRef ().getIncompatibilities ()) {
631+ for (auto const & dep : mod->getMetadata ().getIncompatibilities ()) {
632632 if (!dep.mod || !dep.version .compare (dep.mod ->getVersion ()) || !dep.mod ->shouldLoad ())
633633 continue ;
634634 switch (dep.importance ) {
@@ -926,7 +926,7 @@ Result<> Loader::Impl::unzipGeodeFile(ModMetadata metadata) {
926926 }
927927
928928 const std::string filename = utils::string::pathToString (entry.path ().filename ());
929- if (filename == metadata.getBinaryName () || !isPlatformBinary (metadata.getID (), filename)) {
929+ if (metadata.getBinaryName () == filename || !isPlatformBinary (metadata.getID (), filename)) {
930930 continue ;
931931 }
932932
0 commit comments