Add a Lua method for forcing recalculation of GrooveStats hash.
This commit is contained in:
+11
-3
@@ -783,9 +783,9 @@ const RString Steps::GetGrooveStatsHash() const
|
||||
return GrooveStatsHash;
|
||||
}
|
||||
|
||||
void Steps::CalculateGrooveStatsHash()
|
||||
void Steps::CalculateGrooveStatsHash(bool forceRecalculate)
|
||||
{
|
||||
if (m_bIsCachedGrooveStatsHashJustLoaded == true)
|
||||
if (!forceRecalculate && m_bIsCachedGrooveStatsHashJustLoaded == true)
|
||||
{
|
||||
m_bIsCachedGrooveStatsHashJustLoaded = false;
|
||||
return;
|
||||
@@ -1167,12 +1167,19 @@ public:
|
||||
{
|
||||
if(p->GetGrooveStatsHash().empty())
|
||||
{
|
||||
p->CalculateGrooveStatsHash();
|
||||
p->CalculateGrooveStatsHash(true);
|
||||
}
|
||||
lua_pushstring(L, p->GetGrooveStatsHash());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int CalculateGrooveStatsHash(T *p, lua_State *L)
|
||||
{
|
||||
p->CalculateGrooveStatsHash(true);
|
||||
lua_pushstring(L, p->GetGrooveStatsHash());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetChartName(T *p, lua_State *L)
|
||||
{
|
||||
lua_pushstring(L, p->GetChartName());
|
||||
@@ -1270,6 +1277,7 @@ public:
|
||||
ADD_METHOD( GetHash );
|
||||
ADD_METHOD( GetMinimizedChartString );
|
||||
ADD_METHOD( GetGrooveStatsHash );
|
||||
ADD_METHOD( CalculateGrooveStatsHash );
|
||||
ADD_METHOD( GetMeter );
|
||||
ADD_METHOD( HasSignificantTimingChanges );
|
||||
ADD_METHOD( HasAttacks );
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ public:
|
||||
RString MinimizedChartString();
|
||||
|
||||
/** @brief Generates a hash used for GrooveStats integration. */
|
||||
void CalculateGrooveStatsHash();
|
||||
void CalculateGrooveStatsHash(bool forceRecalculate);
|
||||
const RString GetGrooveStatsHash() const;
|
||||
|
||||
/** @brief Produces a chart that's reduced to it's smallest unique representable form. */
|
||||
|
||||
Reference in New Issue
Block a user