diff options
author | Viljami Ilola <+@hix.fi> | 2024-04-27 23:15:55 +0300 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-04-27 23:15:55 +0300 |
commit | 418e9144d5059212693c3f848ecf095dbb0f690a (patch) | |
tree | 70fd12178fa2c9d64ed272c0621e9e63257fe44a | |
parent | 1727b104e6f301d3a3f007f736227d592d8ebbef (diff) |
fix default settings getterv0.4b2
-rw-r--r-- | CHANGELOG.txt | 4 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | src/sliceitoff/settings/settings.py | 2 | ||||
-rw-r--r-- | src/sliceitoff/sfx/sfx.py | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0f5c418..c51b643 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -18,3 +18,7 @@ - Settings menu. - SFX and music volume + +0.4-beta2 + + - Fix default settings reading diff --git a/pyproject.toml b/pyproject.toml index 06fb9da..93176ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sliceitoff" -version = "0.4-beta1" +version = "0.4-beta2" description = "Arcade game where one slices play area off while avoiding slicing happy faces." repository = "https://git.hix.fi/sliceitoff.git/" authors = ["Viljami Ilola <+@hix.fi>"] diff --git a/src/sliceitoff/settings/settings.py b/src/sliceitoff/settings/settings.py index 7ecfbf3..992971b 100644 --- a/src/sliceitoff/settings/settings.py +++ b/src/sliceitoff/settings/settings.py @@ -69,7 +69,7 @@ class Settings: v = self.get_value(option) if v: return v - return [x[1] for x in DEFAULT_SETTINGS if x[0]==option][1] + return [x[1] for x in DEFAULT_SETTINGS if x[0]==option][0] def put_value(self, option, value): """ Puts single value with option name """ diff --git a/src/sliceitoff/sfx/sfx.py b/src/sliceitoff/sfx/sfx.py index a72df0b..362d3ed 100644 --- a/src/sliceitoff/sfx/sfx.py +++ b/src/sliceitoff/sfx/sfx.py @@ -52,7 +52,7 @@ class Sfx: self.music_volume += 1 self.music_volume %= 11 settings.replace_value("music_volume", self.music_volume) - if self.bgm: + if self.initialized and self.bgm: self.sound[self.bgm].set_volume(self.music_volume / 10) def play(self, sample): |