From: Simon Cross Date: Sat, 5 Mar 2016 23:26:00 +0000 (+0200) Subject: Merge branch 'master' of ctpug.org.za:koperkapel X-Git-Url: https://git.ctpug.org.za/?p=koperkapel.git;a=commitdiff_plain;h=69b69112b4c08e85a5ec11d9a9abdb34205d2cee;hp=cc4eaf7d2fcb43531d3c6800d1fe481bb8094a51 Merge branch 'master' of ctpug.org.za:koperkapel --- diff --git a/koperkapel/gamelib/keypad.py b/koperkapel/gamelib/keypad.py index bf9e084..5658db4 100644 --- a/koperkapel/gamelib/keypad.py +++ b/koperkapel/gamelib/keypad.py @@ -2,8 +2,10 @@ import os from pgzero.loaders import images +from pgzero.ptext import getsurf from ..actors.orientatedsurf import SurfActor from ..constants import TILE_SIZE +from ..serums import SERUM_OVERLAY_COLORS class Keypad(SurfActor): @@ -12,8 +14,9 @@ class Keypad(SurfActor): self._doors = doors self.game_pos = (x, y) self.required_smart = required_smart - surf = images.load(os.path.join('fixtures', 'keypad')) - super().__init__(surf, anchor=(0, 0)) + surf = images.load(os.path.join('fixtures', 'keypad')).copy() + surf.blit(getsurf(str(required_smart), owidth=2, ocolor=SERUM_OVERLAY_COLORS["smart"], color="black"), (0, 0)) + super().__init__(surf, anchor=(1, 1)) def activate(self, smart): if smart >= self.required_smart: diff --git a/koperkapel/sounds/cut.wav b/koperkapel/sounds/cut.wav new file mode 100644 index 0000000..d0b86c8 Binary files /dev/null and b/koperkapel/sounds/cut.wav differ diff --git a/koperkapel/weapons.py b/koperkapel/weapons.py index 4f7bd6c..cfc6ba8 100644 --- a/koperkapel/weapons.py +++ b/koperkapel/weapons.py @@ -33,7 +33,7 @@ WEAPONS = [ Weapon("spit", damage=1, bullet_range=2, can_tape=False, image_name="blank", frames=("",), sound="fire_spit", projectile="spit"), - Weapon("butter_knife", damage=2), + Weapon("butter_knife", damage=2, sound='cut'), Weapon("crowbar", damage=4), Weapon("gun", damage=4, bullet_range=4, sound='gun_fire', projectile="bullet"), diff --git a/sources/source.txt b/sources/source.txt index 40d7493..f344689 100644 --- a/sources/source.txt +++ b/sources/source.txt @@ -49,3 +49,11 @@ Credit: Sound samples by Boulanger TamTam Replacements recorded for Richard Boul Transformed by Neil Muller, using: sox birdscreech1.wav screech.wav vol 0.5 fade 0 0.4 0.15 +cut.wav +Created from ./Berklee44v8/cut_cardboard_2.wav +URL: http://www.archive.org/download/Berklee44v8/Berklee44v8.zip +Source: http://www.archive.org/details/Berklee44v8 +License: http://creativecommons.org/licenses/by/3.0/ +Credit: Sound samples from Berklee recorded for Richard Boulanger for use in the One Laptop per Child music library. See http://wiki.laptop.org/go/Sound_samples for details. +Transformed by Neil Muller, using: +sox cut_cardboard_2.wav cut.wav fade 0 0.4 0.05