From d862bf4347bb79eafeefe7079a8c2dcb85638fb7 Mon Sep 17 00:00:00 2001 From: Blue Shadow Date: Sun, 12 Jun 2022 14:03:14 +0300 Subject: [PATCH] - added FailSound property to PuzzleItem --- wadsrc/static/zscript/actors/inventory/inv_misc.zs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/actors/inventory/inv_misc.zs b/wadsrc/static/zscript/actors/inventory/inv_misc.zs index da3625743..a31efc5b1 100644 --- a/wadsrc/static/zscript/actors/inventory/inv_misc.zs +++ b/wadsrc/static/zscript/actors/inventory/inv_misc.zs @@ -92,9 +92,11 @@ class PuzzleItem : Inventory { meta int PuzzleItemNumber; meta String PuzzFailMessage; + meta Sound PuzzFailSound; property Number: PuzzleItemNumber; property FailMessage: PuzzFailMessage; + property FailSound: PuzzFailSound; Default { @@ -104,6 +106,7 @@ class PuzzleItem : Inventory Inventory.UseSound "PuzzleSuccess"; Inventory.PickupSound "misc/i_pkup"; PuzzleItem.FailMessage("$TXT_USEPUZZLEFAILED"); + PuzzleItem.FailSound "*puzzfail"; } override bool HandlePickup (Inventory item) @@ -124,7 +127,7 @@ class PuzzleItem : Inventory return true; } // [RH] Always play the sound if the use fails. - Owner.A_StartSound ("*puzzfail", CHAN_VOICE); + Owner.A_StartSound (PuzzFailSound, CHAN_VOICE); if (Owner.CheckLocalView()) { Console.MidPrint (null, PuzzFailMessage, true);