Skip to content

Commit

Permalink
beta 43
Browse files Browse the repository at this point in the history
  • Loading branch information
Minemaker0430 committed Sep 16, 2024
1 parent 18d3b4b commit 07b8f1b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 91 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v1.0.0-beta.43

* Fixed Recommendations not recognizing Swing XP
* Ported settings to the new system
* Fixed a crash
* Recommendations now start generating upon beating a level in the GDDP
* Fixed a visual bug involving Stats

# v1.0.0-beta.42

* Added Swing as a new Skill XP
Expand Down
22 changes: 12 additions & 10 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"geode": "3.5.0",
"geode": "3.7.1",
"gd": {
"win": "2.206",
"android": "2.206"
},
"version": "v1.0.0-beta.42",
"version": "v1.0.0-beta.43",
"id": "minemaker0430.gddp_integration",
"name": "GDDP Integration",
"developer": "Minemaker0430",
Expand Down Expand Up @@ -43,15 +43,15 @@
"dependencies": [
{
"id": "geode.node-ids",
"version": ">=1.13.1",
"version": ">=1.14.0",
"importance": "required"
}
],

"settings": {
"bypass-section": {
"name": "Bypass",
"type": "custom"
"type": "title"
},
"unlock-all-tiers": {
"name": "Unlock All Tiers",
Expand All @@ -75,7 +75,8 @@
"name": "Show Faces Outside Menus",
"description": "Makes Custom Difficulty Faces no longer require GDDP Menus to activate.",
"type": "bool",
"default": false
"default": false,
"enable-if": "custom-difficulty-faces"
},
"skillset-badges": {
"name": "Enable Skillset Badges",
Expand All @@ -97,7 +98,7 @@
},
"menu-section": {
"name": "Menu",
"type": "custom"
"type": "title"
},
"alt-button-texture": {
"name": "Alternate Button Texture",
Expand Down Expand Up @@ -125,7 +126,7 @@
},
"cosmetic-section": {
"name": "Cosmetic",
"type": "custom"
"type": "title"
},
"restore-bg-color": {
"name": "Vanilla Background Color",
Expand All @@ -141,9 +142,10 @@
},
"all-demons-rated": {
"name": "Rate All Demons",
"description": "Shows custom difficulty faces on all rated demons. Please note that demons without GDDL Ratings will not be given ratings. <cr>Requires \"Show Faces Outside Menus\".</c> \n\n(Option created by wint0r)",
"description": "Shows custom difficulty faces on all rated demons. Please note that demons without GDDL Ratings will not be given ratings.\n\n(Option created by wint0r)",
"type": "bool",
"default": false
"default": false,
"enable-if": "custom-difficulty-faces && show-outside-menus"
},
"replace-epic": {
"name": "Replace Epic Fire",
Expand Down Expand Up @@ -171,7 +173,7 @@
},
"compatibility-section": {
"name": "Compatibility",
"type": "custom"
"type": "title"
},
"override-grandpa-demon": {
"name": "Override Grandpa Demon",
Expand Down
6 changes: 3 additions & 3 deletions src/RecommendedUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void RecommendedUtils::validateLevels() {
//check if data exists
if (!data["main"].is_array() && !data["legacy"].is_array()) { return; }

if (levels.empty()) {
if (levels.empty() && completedLvls.size() > 0) {
generateRecommendations();
}
else {
Expand Down Expand Up @@ -148,10 +148,10 @@ void RecommendedUtils::generateRecommendations() {
log::info("highest partial rank: {}", highestPartial);

//Sort Skills
std::vector<int> skills = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //Highest -> Lowest
std::vector<int> skills = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //Highest -> Lowest
for (int i = 0; i < skills.size(); i++) {

auto xp = Mod::get()->getSavedValue<matjson::Array>("xp", { 0, 0, 0, 0, 0, 0, 0, 0, 0 });
auto xp = Mod::get()->getSavedValue<matjson::Array>("xp", { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });

for (int j = 0; j < skillIDs.size(); j++) {
if (i == 0 && xp[j].as_double() > xp[skills[i]].as_double()) {
Expand Down
66 changes: 0 additions & 66 deletions src/Settings.hpp

This file was deleted.

10 changes: 0 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@
#include <Geode/utils/web.hpp>
#include <Geode/loader/Event.hpp>

#include "Settings.hpp"
#include "ListManager.hpp"

//geode namespace
using namespace geode::prelude;

SettingNode* SectionSettingValue::createNode(float width) {
return SectionSettingNode::create(this, width);
}

$on_mod(Loaded) {
Mod::get()->addCustomSetting<SectionSettingValue>("bypass-section", "");
Mod::get()->addCustomSetting<SectionSettingValue>("menu-section", "");
Mod::get()->addCustomSetting<SectionSettingValue>("cosmetic-section", "");
Mod::get()->addCustomSetting<SectionSettingValue>("compatibility-section", "");

ListManager::init();
}
7 changes: 7 additions & 0 deletions src/menus/RecommendedLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ void RecommendedLayer::loadLevelsFailed(const char*) {

m_loadCircle->fadeAndRemove();

if (m_IDs.size() > 0) {
m_errorText->setCString("Something went wrong...");
}
else {
m_errorText->setCString("Beat a level to generate Recommendations!");
}

/*auto alert = FLAlertLayer::create("ERROR", "Failed to load levels. Please try again later.", "OK");
alert->setParent(this);
alert->show();*/
Expand Down
2 changes: 0 additions & 2 deletions src/popups/StatsPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ void StatsPopup::loadTab(int id) {
else {
if (i == 0) {
highestRankSprite->setColor({ 0, 0, 0 });
break;
}
}
}
Expand Down Expand Up @@ -294,7 +293,6 @@ void StatsPopup::loadTab(int id) {
else {
if (i == 0) {
highestPlusSprite->setColor({ 0, 0, 0 });
break;
}
}
}
Expand Down

0 comments on commit 07b8f1b

Please sign in to comment.