From 6b790436c05693789880b4f8d05bbab70e65cb2a Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 26 May 2024 12:44:58 -0500 Subject: [PATCH] rebirth delay playerConfig options saving in settings themeConfig options still save immediately because they are needed --- .../Rebirth/BGAnimations/playerInfoFrame/settings.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua index f202d1e751..ed42ae69e8 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua @@ -2851,6 +2851,8 @@ local function rightFrame() local modsToApplyAtExit = {} local function checkModsToApply() + -- force save playerConfig + playerConfig:save() local setGraphics = false local setGame = nil local setTheme = nil @@ -2912,6 +2914,11 @@ local function rightFrame() self:diffusealpha(0) self:x(offscreenX) end, + EndCommand = function(self) + -- apply options when exiting screen + -- sometimes, this throws you to the main menu + checkModsToApply() + end, ShowRightCommand = function(self) -- move on screen from right and go visible self:finishtweening() @@ -3221,7 +3228,8 @@ local function rightFrame() local function setdataPLAYER(propertyname, val) playerConfig:get_data()[propertyname] = val playerConfig:set_dirty() - playerConfig:save() + -- save playerConfig when closing settings + -- playerConfig:save() end local function themeoption(category, propertyname) return {get = getdataTHEME(category, propertyname), set = function(x) setdataTHEME(category, propertyname, x) end}