Skip to content

Commit

Permalink
fix things
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Mar 30, 2024
1 parent 8a18051 commit e4e7209
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _Src/_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,13 @@ class $modify(LevelPageExt, LevelPage) {
//level data
for (size_t levelID = 0; levelID < 127; levelID++) {
if (levelID > g_currentPage) {
auto filepath = CCFileUtils::sharedFileUtils()->fullPathForFilename(fmt::format("levels/{}.txt", levelID).data(), 0);
if (
!std::filesystem::exists(FilePathFromModFolder(fmt::format("levels/{}.txt", levelID)))
and std::filesystem::exists(fmt::format("Resources/levels/{}.txt", levelID))
and std::filesystem::exists(filepath.data())
)
std::filesystem::copy_file(
fmt::format("Resources/levels/{}.txt", levelID).c_str(),
filepath.data(),
FilePathFromModFolder(fmt::format("levels/{}.txt", levelID - 1)).c_str()
);
else
Expand Down

0 comments on commit e4e7209

Please sign in to comment.