From: Simon Cross Date: Sat, 10 Sep 2016 22:30:33 +0000 (+0200) Subject: Add error sounds. X-Git-Tag: tabakrolletjie-v1.0.0~24 X-Git-Url: https://git.ctpug.org.za/?p=tabakrolletjie.git;a=commitdiff_plain;h=7062402aa29c06de2d4ae7340f5e3c1f210f87a7 Add error sounds. --- diff --git a/TODO.txt b/TODO.txt index a32105a..23a3971 100644 --- a/TODO.txt +++ b/TODO.txt @@ -2,7 +2,6 @@ TODO ==== * Five levels -* Add placement error sounds * Add sound for battery going dead Done @@ -26,3 +25,4 @@ Done * Save game * Light removing tool * Image for pulsating lamp +* Add placement error sounds diff --git a/data/sounds/beep_kind.ogg b/data/sounds/beep_kind.ogg new file mode 100644 index 0000000..5a6a6e3 Binary files /dev/null and b/data/sounds/beep_kind.ogg differ diff --git a/data/sounds/sources.txt b/data/sounds/sources.txt index 308881a..021f532 100644 --- a/data/sounds/sources.txt +++ b/data/sounds/sources.txt @@ -23,6 +23,19 @@ Notes: Ogg generated using 'oggenc -q -1 mouth_pop_2a.wav' +beep_kind.ogg +------------- + +URL: + http://archive.org/download/PIR/PIR.zip +Source: + http://archive.org/details/PIR +License: + http://creativecommons.org/licenses/by/3.0 +Notes: + Ogg generated using 'oggenc -q -1 -o beep_kind.ogg BEEPKIND.WAV' + + eating_chips_1.ogg eating_chips_2.ogg eating_chips_3.ogg diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index 16e2249..8c42b06 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -17,6 +17,7 @@ from ..obstacles import ObstacleManager from ..events import SceneChangeEvent from ..utils import debug_timer, shadowed_text, write_save_file from ..loader import loader +from ..sound import sound from ..transforms import Overlay, Alpha, ColourWedges from ..constants import SCREEN_SIZE, FONTS, FPS, NIGHT_HOURS_PER_TICK, DEBUG @@ -202,8 +203,7 @@ class DayScene(BaseScene): self._turnips.append(turnip) gamestate.seeds -= 1 except TurnipInvalidPosition: - # TODO: Add error sound or something - pass + sound.play_sound("beep_kind.ogg") def _update_light_angle(self, pos, gamestate): # Update the angle of the given light @@ -228,6 +228,7 @@ class DayScene(BaseScene): ev.pos, pygame.display.get_surface()) # Bail if we're too close to an existing light, obstacle or turnip if check_space_for_light(self._space, pos, max_distance=25): + sound.play_sound("beep_kind.ogg") return gamestate.seeds -= cost cfg["position"] = pos