mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
split save logic
This commit is contained in:
@ -98,6 +98,20 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
#endregion
|
||||
|
||||
public bool SaveCurrentMod()
|
||||
{
|
||||
if (!checkCurrentModCanBeSave())
|
||||
return false;
|
||||
|
||||
Preset.PerformWrite(s =>
|
||||
{
|
||||
s.Mods = selectedMods.Value.ToArray();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool checkCurrentModCanBeSave() => (!Active.Value && selectedMods.Value.Any());
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
Reference in New Issue
Block a user