diff --git a/Themes/Til Death/BGAnimations/ScreenGameplay underlay/default.lua b/Themes/Til Death/BGAnimations/ScreenGameplay underlay/default.lua index 672c68de9c..f69e58fee5 100644 --- a/Themes/Til Death/BGAnimations/ScreenGameplay underlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenGameplay underlay/default.lua @@ -2,6 +2,10 @@ local modslevel = topscreen == "ScreenEditOptions" and "ModsLevel_Stage" or "ModsLevel_Preferred" local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions(modslevel) playeroptions:Mini( 2 - playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).ReceptorSize/50 ) +local profile = PROFILEMAN:GetProfile(PLAYER_1) +if profile:IsCurrentChartPermamirror() then -- turn on mirror if song is flagged as perma mirror + playeroptions:Mirror( true ) +end local bgtype = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).BackgroundType local songoptions = GAMESTATE:GetSongOptionsObject('ModsLevel_Preferred') diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua index 2d6f52502b..12cf46c793 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/wifeTwirl.lua @@ -57,7 +57,8 @@ t[#t+1] = Def.Actor{ alreadybroadcasted = true end, CurrentSongChangedMessageCommand=function(self) - if playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).OneShotMirror then -- This will disable mirror when switching songs if OneShotMirror is enabled + -- This will disable mirror when switching songs if OneShotMirror is enabled or if permamirror is flagged on the chart (it is enabled if so in screengameplayunderlay/default) + if playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).OneShotMirror or profile:IsCurrentChartPermamirror() then local modslevel = topscreen == "ScreenEditOptions" and "ModsLevel_Stage" or "ModsLevel_Preferred" local playeroptions = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions(modslevel) playeroptions:Mirror( false ) diff --git a/src/Profile.cpp b/src/Profile.cpp index c88a3537d4..e0d03a5a89 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -2512,7 +2512,7 @@ class LunaProfile : public Luna return 1; } - DEFINE_METHOD(GetGUID, m_sGuid); + DEFINE_METHOD(GetGUID, m_sGuid); static int GetAllGoals(T* p, lua_State *L) { lua_newtable(L); int idx = 0; @@ -2525,7 +2525,7 @@ class LunaProfile : public Luna tsg.PushSelf(L); lua_rawseti(L, -2, idx + 1); idx++; - } + } } return 1; } @@ -2539,6 +2539,16 @@ class LunaProfile : public Luna return 1; } + static int IsCurrentChartPermamirror(T* p, lua_State *L) { + bool o = false; + const string& cck = GAMESTATE->m_pCurSteps[PLAYER_1]->ChartKey; + FOREACH(string, p->PermaMirrorCharts, ck) + if (*ck == cck) + o = true; + + lua_pushboolean(L, o); + return 1; + } LunaProfile() { ADD_METHOD( AddScreenshot ); @@ -2584,6 +2594,7 @@ class LunaProfile : public Luna ADD_METHOD( GetAllGoals ); ADD_METHOD(GetIgnoreStepCountCalories); ADD_METHOD(CalculateCaloriesFromHeartRate); + ADD_METHOD(IsCurrentChartPermamirror); } }; diff --git a/src/Profile.h b/src/Profile.h index 2607afa5d0..a8edbbd244 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -257,6 +257,7 @@ class Profile int m_iNumStagesPassedByGrade[NUM_Grade]; // if anymore of these are added they should be enum'd to reduce copy pasta -mina + // and also should be sets void AddToFavorites(const string& ck) { FavoritedCharts.emplace_back(ck); } void AddToPermaMirror(const string& ck) { PermaMirrorCharts.emplace_back(ck); } void RemoveFromFavorites(const string& ck);