mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-10 11:11:51 +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 int PuzzleItemNumber;
|
||||||
meta String PuzzFailMessage;
|
meta String PuzzFailMessage;
|
||||||
|
meta Sound PuzzFailSound;
|
||||||
|
|
||||||
property Number: PuzzleItemNumber;
|
property Number: PuzzleItemNumber;
|
||||||
property FailMessage: PuzzFailMessage;
|
property FailMessage: PuzzFailMessage;
|
||||||
|
property FailSound: PuzzFailSound;
|
||||||
|
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
@ -104,6 +106,7 @@ class PuzzleItem : Inventory
|
||||||
Inventory.UseSound "PuzzleSuccess";
|
Inventory.UseSound "PuzzleSuccess";
|
||||||
Inventory.PickupSound "misc/i_pkup";
|
Inventory.PickupSound "misc/i_pkup";
|
||||||
PuzzleItem.FailMessage("$TXT_USEPUZZLEFAILED");
|
PuzzleItem.FailMessage("$TXT_USEPUZZLEFAILED");
|
||||||
|
PuzzleItem.FailSound "*puzzfail";
|
||||||
}
|
}
|
||||||
|
|
||||||
override bool HandlePickup (Inventory item)
|
override bool HandlePickup (Inventory item)
|
||||||
|
@ -124,7 +127,7 @@ class PuzzleItem : Inventory
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// [RH] Always play the sound if the use fails.
|
// [RH] Always play the sound if the use fails.
|
||||||
Owner.A_StartSound ("*puzzfail", CHAN_VOICE);
|
Owner.A_StartSound (PuzzFailSound, CHAN_VOICE);
|
||||||
if (Owner.CheckLocalView())
|
if (Owner.CheckLocalView())
|
||||||
{
|
{
|
||||||
Console.MidPrint (null, PuzzFailMessage, true);
|
Console.MidPrint (null, PuzzFailMessage, true);
|
||||||
|
|
Loading…
Reference in a new issue