diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index 521b2c5e68..cc74b8e131 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -1380,6 +1380,7 @@ + diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 659e951332..915fdddf1d 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -3466,8 +3466,11 @@ Returns the numerical difficulty of the Steps. + + Returns true if the Steps has any attacks. + - returns true if the song has significant timing changes. + Returns true if the Steps pattern has significant timing changes. Returns the complete list of RadarValues for player pn. Use to grab a specific value. diff --git a/src/Steps.cpp b/src/Steps.cpp index c795285d30..bc28b3654e 100644 --- a/src/Steps.cpp +++ b/src/Steps.cpp @@ -40,6 +40,11 @@ Steps::~Steps() { } +bool Steps::HasAttacks() const +{ + return !this->m_Attacks.empty(); +} + unsigned Steps::GetHash() const { if( parent ) @@ -463,7 +468,18 @@ public: DEFINE_METHOD( IsAPlayerEdit, IsAPlayerEdit() ) DEFINE_METHOD( UsesSplitTiming, UsesSplitTiming() ) - static int HasSignificantTimingChanges( T* p, lua_State *L ) { lua_pushboolean(L, p->HasSignificantTimingChanges()); return 1; } + static int HasSignificantTimingChanges( T* p, lua_State *L ) + { + lua_pushboolean(L, p->HasSignificantTimingChanges()); + return 1; + } + + static int HasAttacks( T* p, lua_State *L ) + { + lua_pushboolean(L, p->HasAttacks()); + return 1; + } + static int GetRadarValues( T* p, lua_State *L ) { @@ -500,6 +516,7 @@ public: ADD_METHOD( GetHash ); ADD_METHOD( GetMeter ); ADD_METHOD( HasSignificantTimingChanges ); + ADD_METHOD( HasAttacks ); ADD_METHOD( GetRadarValues ); ADD_METHOD( GetTimingData ); //ADD_METHOD( GetSMNoteData ); diff --git a/src/Steps.h b/src/Steps.h index 3c46fa5b71..08cbd1d357 100644 --- a/src/Steps.h +++ b/src/Steps.h @@ -1,6 +1,7 @@ #ifndef STEPS_H #define STEPS_H +#include "Attack.h" #include "GameConstantsAndTypes.h" #include "PlayerNumber.h" #include "Grade.h" @@ -92,6 +93,11 @@ public: */ RString GetCredit() const { return Real()->m_sCredit; } + /** @brief The list of attacks. */ + AttackArray m_Attacks; + /** @brief The stringified list of attacks. */ + vector m_sAttackString; + void SetFilename( RString fn ) { m_sFilename = fn; } RString GetFilename() const { return m_sFilename; } void SetSavedToDisk( bool b ) { DeAutogen(); m_bSavedToDisk = b; } @@ -128,6 +134,11 @@ public: * @brief Determine if the Steps have any major timing changes during gameplay. * @return true if it does, or false otherwise. */ bool HasSignificantTimingChanges() const; + + /** + * @brief Determine if the Steps have any attacks. + * @return true if it does, or false otherwise. */ + bool HasAttacks() const; // Lua void PushSelf( lua_State *L );