Open GammaGames opened 1 month ago
That's a nice idea. A couple of suggested tweaks to the test data:
Relatedly, everyone using these scoreboards has to figure out how to properly order them for display since they don't come sorted. Perhaps a helper for this would be worth including. Something like this:
function getRankedScores(scores)
local rankedScores = {}
for i, score in ipairs(scores) do
rankedScores[i] = score
end
table.sort(rankedScores, function(a, b) return a.rank < b.rank end)
return rankedScores
end
:thinking: It might be useful to make the function something like pdScoreboards.getDummyData(ascending)
where you pass a bool that defaults to sorting descending
Scenic Route said on discord:
might be useful too include a function to check for default user strings, and include them in the dummy data