Skip to content

Commit 045c6d5

Browse files
committed
STOP WARNING ME I DONT CARE
1 parent f74614e commit 045c6d5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

mod.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
"Show As Addt'l Info"
157157
]
158158
},
159+
"totalAttemptsAndJumpsCommas": {
160+
"name": "Use Commas When Showing Attempts + Jumps",
161+
"description": "<cp>Inspired by YT videos published by Doggie.</c>",
162+
"type": "bool",
163+
"default": true
164+
},
159165
"classicFlukedFrom": {
160166
"name": "Classic \"Fluked From\" %",
161167
"description": "<cl>Original idea by yolodomo.</c>\n\nShows your last best percentage on the \"Level Complete\" screen when completing Classic levels.\n\n<cy>To disable, set this setting to \"[Disabled]\". Otherwise, choose a prefix for this label to enable this feature.</c>\n\n<cr>I am not responsible if some of these prefix options will overlap past the borders of the endscreen or the level completion rewards; go experiment on your own.</c>",

src/EndLevelLayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using namespace geode::prelude;
1212

1313
class $modify(MyEndLevelLayer, EndLevelLayer) {
1414
static void onModify(auto& self) {
15-
self.setHookPriority("EndLevelLayer::onHideLayer", Priority::Replace);
15+
(void) self.setHookPriority("EndLevelLayer::onHideLayer", Priority::Replace);
1616
}
1717
static CCActionInterval* getEaseTypeForCustomScaleAnimation(CCActionInterval* action, const std::string& modStringSetting, const float easingRate, const EasingReason easingReason) {
1818
if (!action) return nullptr;
@@ -219,8 +219,8 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
219219

220220
if (!attemptLabel || !jumpsLabel) return;
221221

222-
const std::string& totalAttemptsString = fmt::format(std::locale("en_US.UTF-8"), "{:L}", level->m_attempts.value()).c_str();
223-
const std::string& totalJumpsString = fmt::format(std::locale("en_US.UTF-8"), "{:L}", level->m_jumps.value()).c_str();
222+
const std::string& totalAttemptsString = getModBool("totalAttemptsAndJumpsCommas") ? fmt::format(std::locale("en_US.UTF-8"), "{:L}", level->m_attempts.value()) : geode::utils::numToString(level->m_attempts.value());
223+
const std::string& totalJumpsString = getModBool("totalAttemptsAndJumpsCommas") ? fmt::format(std::locale("en_US.UTF-8"), "{:L}", level->m_jumps.value()) : geode::utils::numToString(level->m_jumps.value());
224224
if (showTotalAttemptsAndJumps == "fully replace") {
225225
attemptLabel->setString(fmt::format(std::locale("en_US.UTF-8"), "Total Attempts: {}", totalAttemptsString).c_str());
226226
jumpsLabel->setString(fmt::format(std::locale("en_US.UTF-8"), "Total Jumps: {}", totalJumpsString).c_str());

0 commit comments

Comments
 (0)