Skip to content

Commit 2b15666

Browse files
committed
re added hidden runs counter cz apparently it deleted it cz github ig
1 parent 22629a3 commit 2b15666

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

src/nodes/layers/DTLayer.cpp

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,8 @@ bool DTLayer::createDeathsString(const Deaths& deaths, const LevelMetadeta& meta
12151215

12161216
int prevStart = -2;
12171217

1218+
int hiddenRuns = 0;
1219+
12181220
for (const auto& [run, amount] : deathVec)
12191221
{
12201222
auto runSplitRes = StatsManager::splitRunKey(run);
@@ -1233,22 +1235,29 @@ bool DTLayer::createDeathsString(const Deaths& deaths, const LevelMetadeta& meta
12331235
if (includeRunStart && !ignoreExtraSettings){
12341236
if (!meta.showAnyRun && meta.runsToShow.size()){
12351237
if (meta.runsToShow.contains(runSplit.start.value())){
1236-
if (meta.runsToShow.at(runSplit.start.value()) > runSplit.end)
1238+
if (meta.runsToShow.at(runSplit.start.value()) > runSplit.end){
1239+
hiddenRuns += amount;
12371240
continue;
1241+
}
12381242
}
12391243
else{
1244+
hiddenRuns += amount;
12401245
continue;
12411246
}
12421247
}
12431248
else{
1244-
if (meta.sharedRunToShow > runSplit.end - runSplit.start.value())
1249+
if (meta.sharedRunToShow > runSplit.end - runSplit.start.value()){
1250+
hiddenRuns += amount;
12451251
continue;
1252+
}
12461253
}
12471254
}
12481255
else if (!includeRunStart && !ignoreExtraSettings){
1249-
log::info("a {}", runSplit.end);
1250-
if (meta.hideUpto > runSplit.end && runSplit.end >= 0)
1256+
//log::info("a {}", runSplit.end);
1257+
if (meta.hideUpto > runSplit.end && runSplit.end >= 0){
1258+
hiddenRuns += amount;
12511259
continue;
1260+
}
12521261

12531262
if (newBests.has_value() && newBests.value().contains(runSplit.end)){
12541263
nbDeColor = "</wave></color>";
@@ -1284,12 +1293,18 @@ bool DTLayer::createDeathsString(const Deaths& deaths, const LevelMetadeta& meta
12841293
out += toAdd;
12851294
}
12861295

1287-
if (out == "")
1296+
if (out == "" && hiddenRuns == 0)
12881297
out = "No Deaths Found!";
12891298
else {
12901299
out.erase(out.length() - custom.seperator.length());
12911300
}
12921301

1302+
if (hiddenRuns != 0){
1303+
if (out != "")
1304+
out += "{nl}";
1305+
out += fmt::format("{}x hidden", hiddenRuns);
1306+
}
1307+
12931308
return true;
12941309
}
12951310

0 commit comments

Comments
 (0)