From b9e17cb11c1ec0f2ceefe228bb7751a06ae19877 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 5 Mar 2016 22:05:32 +0200 Subject: [PATCH] Add sound parameter to weapon class --- koperkapel/weapons.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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), -- 2.34.1