from retail
This commit is contained in:
@@ -187,13 +187,22 @@ local function filterUsedProperties(indexToProperty, allDisplays, usedProperties
|
||||
return filtered;
|
||||
end
|
||||
|
||||
--- a sound from each setter
|
||||
local lastPlayedSoundFromSet
|
||||
|
||||
local function wrapWithPlaySound(func, kit)
|
||||
return function(info, v)
|
||||
func(info, v);
|
||||
if (tonumber(v)) then
|
||||
pcall(PlaySound, tonumber(v), "Master");
|
||||
if lastPlayedSoundFromSet ~= GetTime() then
|
||||
pcall(PlaySound, tonumber(v), "Master")
|
||||
lastPlayedSoundFromSet = GetTime()
|
||||
end
|
||||
else
|
||||
pcall(PlaySoundFile, v, "Master");
|
||||
if lastPlayedSoundFromSet ~= GetTime() then
|
||||
pcall(PlaySoundFile, v, "Master")
|
||||
lastPlayedSoundFromSet = GetTime()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user