Skip to content

Commit

Permalink
v1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimjasmine00 committed Jun 27, 2024
1 parent 53c8db9 commit c31fd64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

project(FakeRate VERSION 1.2.3)
project(FakeRate VERSION 1.2.4)

add_library(${PROJECT_NAME} SHARED
src/FakeRate.cpp
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Fake Rate Changelog
## v1.2.4 (2024-06-27)
- Fixed a bug that caused orbs not to display correctly in map packs

## v1.2.3 (2024-06-27)
- Fixed a bug that caused the game to crash when a difficulty face in the difficulty selection popup was clicked with More Difficulties uninstalled or disabled

Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"win": "2.206",
"mac": "2.206"
},
"version": "v1.2.3",
"version": "v1.2.4",
"id": "hiimjustin000.fake_rate",
"name": "Fake Rate",
"developer": "hiimjustin000",
Expand Down
13 changes: 7 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class $modify(FRLevelInfoLayer, LevelInfoLayer) {
m_starsLabel->setPosition(m_starsIcon->getPositionX() - 8.0f, m_starsIcon->getPositionY());
m_starsLabel->setString(std::to_string(stars).c_str());
m_starsLabel->setVisible(showStars);
m_starsLabel->setColor({ 255, 255, (unsigned char)(gsm->hasCompletedLevel(m_level) ? 50 : 255) });
if (gsm->hasCompletedLevel(m_level)) m_starsLabel->setColor({ 255, 255, 50 });
for (int i = 0; i < m_coins->count(); i++) {
auto coin = static_cast<CCSprite*>(m_coins->objectAtIndex(i));
coin->setPositionY(position.y - 31.5f - (showStars ? 14.0f : 0.0f)
Expand Down Expand Up @@ -279,7 +279,7 @@ class $modify(FRLevelCell, LevelCell) {
difficultyContainer->addChild(starsLabel);
}
starsLabel->setString(std::to_string(fakeRateData.stars).c_str());
starsLabel->setColor({ 255, 255, (unsigned char)(gsm->hasCompletedLevel(level) ? 50 : 255) });
if (gsm->hasCompletedLevel(level)) starsLabel->setColor({ 255, 255, 50 });
}
else {
if (auto starsIcon = static_cast<CCSprite*>(difficultyContainer->getChildByID("stars-icon"))) starsIcon->removeFromParent();
Expand Down Expand Up @@ -336,11 +336,12 @@ class $modify(FRLevelCell, LevelCell) {
}
auto orbs = FakeRate::getBaseCurrency(fakeRateData.stars);
auto totalOrbs = (int)floorf(orbs * 1.25f);
orbsLabel->setString((level->m_normalPercent == 100 ?
fmt::format("{}", totalOrbs) :
fmt::format("{}/{}", (int)floorf(orbs * level->m_normalPercent / 100.0f), totalOrbs)).c_str());
auto percent = level->m_normalPercent.value();
auto savedLevel = GameLevelManager::sharedState()->getSavedLevel(level->m_levelID);
if (savedLevel) percent = savedLevel->m_normalPercent.value();
orbsLabel->setString((percent == 100 ? fmt::format("{}", totalOrbs) : fmt::format("{}/{}", (int)floorf(orbs * percent / 100.0f), totalOrbs)).c_str());
orbsLabel->limitLabelWidth(45.0f, m_compactView ? 0.3f : 0.4f, 0.0f);
if (level->m_normalPercent == 100) orbsLabel->setColor({ 100, 255, 255 });
if (percent == 100) orbsLabel->setColor({ 100, 255, 255 });
}
else {
if (auto orbsIcon = static_cast<CCSprite*>(m_mainLayer->getChildByID("orbs-icon"))) orbsIcon->removeFromParent();
Expand Down

0 comments on commit c31fd64

Please sign in to comment.