From ce910728f42ff1a8c7ce818e1111c159fa70938b Mon Sep 17 00:00:00 2001 From: Barinade Date: Thu, 21 Oct 2021 23:16:36 -0500 Subject: [PATCH] respect permamirror and receptorsize --- .../Rebirth/BGAnimations/ScreenGameplay underlay.lua | 10 ++++++++++ .../Rebirth/BGAnimations/playerInfoFrame/settings.lua | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua b/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua index b692ced945..ff5f5b4e36 100644 --- a/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua +++ b/Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua @@ -1,6 +1,16 @@ -- the literal background is handled by the c++ -- so here we micromanage underlay layer stuff +-- also permamirror and receptorsize/mini because this is early in gameplay init again +local modslevel = "ModsLevel_Preferred" +local playeroptions = GAMESTATE:GetPlayerState():GetPlayerOptions(modslevel) +playeroptions:Mini(2 - playerConfig:get_data().ReceptorSize / 50) +local profile = PROFILEMAN:GetProfile(PLAYER_1) +local replaystate = GAMESTATE:GetPlayerState():GetPlayerController() == "PlayerController_Replay" +if profile:IsCurrentChartPermamirror() and not replaystate then -- turn on mirror if song is flagged as perma mirror + playeroptions:Mirror(true) +end + -- we can set staticbg prefs here and somehow that works out to be early enough to matter local staticbg = themeConfig:get_data().global.StaticBackgrounds local songoptions = GAMESTATE:GetSongOptionsObject("ModsLevel_Preferred") diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua index b4eb9c9dda..b60c006891 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua @@ -3157,13 +3157,13 @@ local function rightFrame() Explanation = "Size of receptors and notes. 50% Receptor Size may be called 100% Mini.", Directions = { Left = function() - local sz = optionData.receptorSize + local sz = optionData["receptorSize"].get() sz = sz - 1 if sz < 1 then sz = 200 end optionData["receptorSize"].set(sz) end, Right = function() - local sz = optionData.receptorSize + local sz = optionData["receptorSize"].get() sz = sz + 1 if sz > 200 then sz = 1 end optionData["receptorSize"].set(sz)