Skip to content

Commit

Permalink
maybe fix weeklies. idk i cant test properly
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Feb 5, 2024
1 parent ae65d98 commit 68fc19d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"win": "2.204",
"android": "2.205"
},
"version": "v1.2.1",
"version": "v1.2.2",
"id": "geode.node-ids",
"name": "Node IDs",
"developer": "Geode Team",
Expand Down
2 changes: 1 addition & 1 deletion src/EditorPauseLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GuidelinesButton : public CCMenuItemSpriteExtra {
spr, nullptr, nullptr, this, nullptr
)) return false;

// TODO: i was also gonna call this on windows but it just crashes and i cant figure out why
// TODO: this function is cursed on windows, only takes 1 arg
#else
if (!CCMenuItemSpriteExtra::init(
spr,
Expand Down
13 changes: 9 additions & 4 deletions src/LevelCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,17 @@ struct LevelCellIDs : Modify<LevelCellIDs, LevelCell> {

bool hasCompletedLevel = m_level->m_dailyID > 0 ? m_level->m_orbCompletion > 99 : GameStatsManager::sharedState()->hasCompletedLevel(m_level);
auto savedLevel = GameLevelManager::sharedState()->getSavedLevel(m_level->m_levelID);
if(hasCompletedLevel) {
if (hasCompletedLevel) {
getChildOfType<CCSprite>(m_mainLayer, spriteOffset)->setID("completed-icon");
spriteOffset++;
} else if(savedLevel && savedLevel->m_normalPercent.value() != 0) {
getChildOfType<CCLabelBMFont>(m_mainLayer, labelOffset)->setID("percentage-label");
labelOffset++;
} else if (savedLevel && savedLevel->m_normalPercent.value() != 0) {
// TODO: this is very incorrect. on weeklies it will fetch the
// GJGameLevel for the regular level, and get the normalPercent of that
auto* node = getChildOfType<CCLabelBMFont>(m_mainLayer, labelOffset);
if (node) {
node->setID("percentage-label");
labelOffset++;
}
}

if(m_level->m_originalLevel > 0) {
Expand Down

0 comments on commit 68fc19d

Please sign in to comment.