Skip to content

Commit

Permalink
respect permamirror and receptorsize
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 22, 2021
1 parent 686b0b8 commit ce91072
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Themes/Rebirth/BGAnimations/ScreenGameplay underlay.lua
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
4 changes: 2 additions & 2 deletions Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ce91072

Please sign in to comment.