You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} elseif(Mod::get()->getSettingValue<std::string>("rate-mode-selection") == "Current Difficulty") { // Only rate the current difficulty if the user chose it.
95
-
starsRated = level->getAverageDifficulty();
95
+
starsRated = p0->getAverageDifficulty();
96
96
97
97
switch (starsRated) {
98
98
case0:
@@ -130,7 +130,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
130
130
// Check if the difficulty selection button exists
131
131
if (!button) {
132
132
log::warn("Difficulty selection button not found!");
133
-
returnfalse;
133
+
return;
134
134
}
135
135
136
136
button->activate();
@@ -140,7 +140,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
140
140
// Check if the submit rating button exists
141
141
if (!button) {
142
142
log::warn("Submit rating button not found!");
143
-
returnfalse;
143
+
return;
144
144
}
145
145
146
146
button->activate();
@@ -166,15 +166,15 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
166
166
167
167
if (!newRateLayer) {
168
168
log::warn("RateStarsLayer could not be found!");
169
-
returnfalse;
169
+
return;
170
170
}
171
171
172
172
// We can just use the first object because it is the only object.
173
173
auto newMainLayer = static_cast<CCNode*>(newRateLayer->getChildren()->objectAtIndex(0));
174
174
175
175
if (!newMainLayer) {
176
176
log::warn("Main Layer not found inside RateStarsLayer!");
177
-
returnfalse;
177
+
return;
178
178
}
179
179
180
180
CCMenu* newMenuLayer = nullptr;
@@ -193,7 +193,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
193
193
194
194
if (!newMenuLayer) {
195
195
log::warn("Main CCMenu Layer could not be found!");
196
-
returnfalse;
196
+
return;
197
197
}
198
198
199
199
CCMenuItemSpriteExtra* newButton;
@@ -202,15 +202,15 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
202
202
203
203
// Only rate the requested difficulty if the user chose it.
204
204
if (Mod::get()->getSettingValue<std::string>("rate-mode-selection") == "Requested Difficulty"){
205
-
if (level->m_starsRequested == 0) { // If they never requested any stars (N/A)
205
+
if (p0->m_starsRequested == 0) { // If they never requested any stars (N/A)
} elseif(Mod::get()->getSettingValue<std::string>("rate-mode-selection") == "Current Difficulty") { // Only rate the current difficulty if the user chose it.
213
-
newStarsRated = level->getAverageDifficulty();
213
+
newStarsRated = p0->getAverageDifficulty();
214
214
215
215
switch (newStarsRated) {
216
216
case0:
@@ -248,7 +248,7 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
248
248
// Check if the difficulty selection button exists
249
249
if (!newButton) {
250
250
log::warn("Difficulty selection button not found!");
251
-
returnfalse;
251
+
return;
252
252
}
253
253
254
254
newButton->activate();
@@ -258,14 +258,13 @@ class $modify(AutoLevelRate, LevelInfoLayer) {
258
258
// Check if the submit rating button exists
259
259
if (!newButton) {
260
260
log::warn("Submit rating button not found!");
261
-
returnfalse;
261
+
return;
262
262
}
263
263
264
264
newButton->activate();
265
265
266
266
log::info("Successfully rated the level {}*", newStarsRated);
0 commit comments