Add error sounds.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 22:30:33 +0000 (00:30 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 22:30:33 +0000 (00:30 +0200)
TODO.txt
data/sounds/beep_kind.ogg [new file with mode: 0644]
data/sounds/sources.txt
tabakrolletjie/scenes/day.py

index a32105a66c22a8fef25ad26265a31af824174643..23a39719b767d5f1a5162d4763b8d57e66e46a09 100644 (file)
--- 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 (file)
index 0000000..5a6a6e3
Binary files /dev/null and b/data/sounds/beep_kind.ogg differ
index 308881a6eeb9a2d26659c67df2100f1d806614df..021f532ae31356ac59bf93951c09d5d61b1c3a28 100644 (file)
@@ -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
index 16e2249e5c6fbb32b8007749dbd7cb08227a3934..8c42b06eebbf02a11f6c5ba2790a647269c447db 100644 (file)
@@ -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