From f59a5b1e725a9405a391dc1fba9a4956364bb5b8 Mon Sep 17 00:00:00 2001 From: Crash Cringle <30600688+CrashCringle12@users.noreply.github.com> Date: Thu, 23 Jan 2025 00:55:43 -0500 Subject: [PATCH] Rename group.ini back to pack.ini to avoid conflict with the existing waiei standard. See: https://github.com/waiei/Group.ini-lua --- src/Group.cpp | 18 +++++++++--------- src/Group.h | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Group.cpp b/src/Group.cpp index 3c38e3b209..034ac2dad7 100644 --- a/src/Group.cpp +++ b/src/Group.cpp @@ -22,7 +22,7 @@ Group::Group() { m_sTranslitTitle = ""; m_sSeries = ""; m_fSyncOffset = 0; - m_bHasGroupIni = false; + m_bHasPackIni = false; m_iYearReleased = 0; m_sBannerPath = ""; m_sCredits.clear(); @@ -35,7 +35,7 @@ Group::~Group() { } Group::Group(const RString& sDir, const RString& sGroupDirName) { - RString sGroupIniPath = sDir + sGroupDirName + "/Group.ini"; + RString sPackIniPath = sDir + sGroupDirName + "/pack.ini"; RString credits = ""; RString sDisplayTitle = sGroupDirName; RString SortTitle = sGroupDirName; @@ -45,9 +45,9 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) { RString authorsNotes = ""; float fOffset = PREFSMAN->m_fDefaultGroupOffsetSeconds; - if (FILEMAN->DoesFileExist(sGroupIniPath)) { + if (FILEMAN->DoesFileExist(sPackIniPath)) { IniFile ini; - ini.ReadFile(sGroupIniPath); + ini.ReadFile(sPackIniPath); ini.GetValue("Group", "DisplayTitle", sDisplayTitle); Trim(sDisplayTitle); if (sDisplayTitle.empty()) { @@ -82,13 +82,13 @@ Group::Group(const RString& sDir, const RString& sGroupDirName) { ini.GetValue("Group", "Credits", credits); ini.GetValue("Group", "AuthorsNotes", authorsNotes); } else { - m_bHasGroupIni = false; + m_bHasPackIni = false; } // Look for a group banner in this group folder std::vector arrayGroupBanners; - // First check if there is a banner provided in group.ini + // First check if there is a banner provided in pack.ini if(!bannerPath.empty()) { GetDirListing(sDir + sGroupDirName + "/" + bannerPath, arrayGroupBanners); @@ -205,9 +205,9 @@ public: return 1; } - static int HasGroupIni(T* p, lua_State *L) + static int HasPackIni(T* p, lua_State *L) { - lua_pushboolean(L, p->HasGroupIni()); + lua_pushboolean(L, p->HasPackIni()); return 1; } @@ -244,7 +244,7 @@ public: ADD_METHOD(GetTranslitTitle); ADD_METHOD(GetSeries); ADD_METHOD(GetSyncOffset); - ADD_METHOD(HasGroupIni); + ADD_METHOD(HasPackIni); ADD_METHOD(GetBannerPath); ADD_METHOD(GetStepArtistCredits); ADD_METHOD(GetAuthorsNotes); diff --git a/src/Group.h b/src/Group.h index f7492261b8..96cce1f42a 100644 --- a/src/Group.h +++ b/src/Group.h @@ -78,11 +78,11 @@ public: float GetSyncOffset() const { return m_fSyncOffset; }; /** - * @brief Whether the group has a group.ini file. + * @brief Whether the group has a pack.ini file. * - * @return true if the group has a group.ini file, false otherwise. + * @return true if the group has a pack.ini file, false otherwise. */ - bool HasGroupIni() const { return m_bHasGroupIni; }; + bool HasPackIni() const { return m_bHasPackIni; }; /** @@ -142,8 +142,8 @@ public: /** @brief Defines the offset applied to all songs within the group. */ float m_fSyncOffset; - /** @brief Whether the group has a group.ini file. */ - bool m_bHasGroupIni; + /** @brief Whether the group has a pack.ini file. */ + bool m_bHasPackIni; /** @brief The path to the group's banner. */ RString m_sBannerPath;