Skip to content

Commit

Permalink
Merge pull request #21 from Uproxide/master
Browse files Browse the repository at this point in the history
More Difficulties Support
  • Loading branch information
TechStudent10 authored Apr 20, 2024
2 parents 602e333 + 0e60fea commit 4011bee
Showing 1 changed file with 47 additions and 21 deletions.
68 changes: 47 additions & 21 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <Geode/Geode.hpp>
#include <Geode/loader/Loader.hpp>

#include <Geode/modify/MenuLayer.hpp>
#include <Geode/modify/CreatorLayer.hpp>
Expand Down Expand Up @@ -168,28 +169,53 @@ std::string getAssetKey(GJGameLevel* level) {
if (level->m_levelID.value() < 128 || level->m_levelID.value() == 3001) {
return convertRobTopLevelToAssetKey(level->m_levelID.value());
}

switch (stars) {
case 1:
return "auto";
case 2:
return "easy";
case 3:
return "normal";
case 4:
return "hard";
case 5:
return "hard";
case 6:
return "harder";
case 7:
return "harder";
case 8:
return "insane";
case 9:
return "insane";
if (Loader::get()->isModLoaded("uproxide.more_difficulties"))
{
switch (stars) {
case 1:
return "auto";
case 2:
return "easy";
case 3:
return "normal";
case 4:
return "casual";
case 5:
return "hard";
case 6:
return "harder";
case 7:
return "touch";
case 8:
return "insane";
case 9:
return "cruel";
}
return "na";
} else {
switch (stars) {
case 1:
return "auto";
case 2:
return "easy";
case 3:
return "normal";
case 4:
return "hard";
case 5:
return "hard";
case 6:
return "harder";
case 7:
return "harder";
case 8:
return "insane";
case 9:
return "insane";
}
return "na";
}
return "na";

}

class $modify(MenuLayer) {
Expand Down

0 comments on commit 4011bee

Please sign in to comment.