mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- added FailSound property to PuzzleItem
This commit is contained in:
parent
f1dec835d7
commit
d862bf4347
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue