Skip to content

Commit

Permalink
Do not overwrite daily level name if record is not blank
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Dec 9, 2023
1 parent 32de836 commit 3d601a2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/layers/DailyCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ void DailyCell::loadFromLevel(GJGameLevel* level) {
}

//fix level data (deleted from saved)
level->m_levelName = biCache->getLevelName(level->m_levelID);
level->m_coins = biCache->getCoinCount(level->m_levelID);
level->m_coinsVerified = true;
if(std::string(level->m_levelName) == "" && level->m_coins == 0 && level->m_coinsVerified == false) {
level->m_levelName = biCache->getLevelName(level->m_levelID);
level->m_coins = biCache->getCoinCount(level->m_levelID);
level->m_coinsVerified = true;
}

//buttons
auto menu = CCMenu::create();
Expand Down

0 comments on commit 3d601a2

Please sign in to comment.