Skip to content

Commit

Permalink
verified text technicality fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Mar 19, 2024
1 parent 4c9debf commit e82ea1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
void customSetup() {
EndLevelLayer::customSetup();
if (!Mod::get()->getSettingValue<bool>("enabled")) { return; }
auto playLayer = GameManager::sharedState()->getPlayLayer();
auto theLevel = playLayer->m_level;
auto theLevel = GameManager::sharedState()->getPlayLayer()->m_level;
if (auto completeMessage = typeinfo_cast<TextArea*>(getChildByIDRecursive("complete-message"))) {
// ensure that no one's up to any funny business by hardcoding the scale and contents of vanilla complete messages
completeMessage->setScale(0.55f);
if (getChildByIDRecursive("level-complete-text")) {
if (!playLayer->m_isTestMode) { completeMessage->setString("Level Verified!"); }
if (theLevel->m_isVerifiedRaw) { completeMessage->setString("Level Verified!"); }
else { completeMessage->setString("You cannot verify a level if it\nhas a start pos."); }
} else {
if (theLevel->m_levelID.value() == 0) { completeMessage->setString("Complete the level in normal mode\nto verify it!"); }
Expand Down

0 comments on commit e82ea1c

Please sign in to comment.