From: Neil Date: Sat, 5 Mar 2016 20:05:32 +0000 (+0200) Subject: Add sound parameter to weapon class X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=b9e17cb11c1ec0f2ceefe228bb7751a06ae19877;p=koperkapel.git Add sound parameter to weapon class --- diff --git a/koperkapel/weapons.py b/koperkapel/weapons.py index 890743d..0050879 100644 --- a/koperkapel/weapons.py +++ b/koperkapel/weapons.py @@ -7,18 +7,19 @@ from .util import safepath class Weapon: def __init__(self, name, damage, image_name=None, bullet_range=0, - can_tape=True, frames=("_1",)): + can_tape=True, frames=("_1",), sound=None): self.name = name self.image_name = image_name or name self.frames = frames self.damage = damage self.bullet_range = bullet_range self.can_tape = can_tape + self.sound = sound WEAPONS = [ Weapon("spit", damage=1, bullet_range=2, can_tape=False, - image_name="blank", frames=("",)), + image_name="blank", frames=("",), sound="fire_spit"), Weapon("butter_knife", damage=2), Weapon("crowbar", damage=4), Weapon("gun", damage=4, bullet_range=4),