Implement more QoL features and rebalances

This commit is contained in:
2026-10-25 02:16:30 +02:00
parent 0578913451
commit 53f831d91e
220 changed files with 14700 additions and 420 deletions
+18 -2
View File
@@ -13,6 +13,18 @@ namespace KernelPanic.UI
private static bool _reducedMotion;
private static UITextSize _textSize;
private static UILayoutDensity _density;
private static int _soundVolume = 75;
public static int SoundVolume
{
get => _soundVolume;
set
{
value = Mathf.Clamp(value, 0, 100);
if (_soundVolume == value) return;
_soundVolume = value;
Changed?.Invoke();
}
}
public static event Action Changed;
@@ -73,7 +85,9 @@ namespace KernelPanic.UI
bool motion = stored.reducedMotion;
var size = stored.textSize == (int)UITextSize.Large ? UITextSize.Large : UITextSize.Standard;
var density = stored.density == (int)UILayoutDensity.Comfortable ? UILayoutDensity.Comfortable : UILayoutDensity.Compact;
bool changed = motion != _reducedMotion || size != _textSize || density != _density;
int volume = Mathf.Clamp(stored.soundVolume, 0, 100);
bool changed = motion != _reducedMotion || size != _textSize || density != _density || volume != _soundVolume;
_soundVolume = volume;
_reducedMotion = motion;
_textSize = size;
_density = density;
@@ -86,7 +100,8 @@ namespace KernelPanic.UI
{
reducedMotion = _reducedMotion,
textSize = (int)_textSize,
density = (int)_density
density = (int)_density,
soundVolume = _soundVolume
}));
PlayerPrefs.Save();
}
@@ -98,6 +113,7 @@ namespace KernelPanic.UI
public bool reducedMotion;
public int textSize;
public int density;
public int soundVolume = 75;
}
}
}