from retail

This commit is contained in:
NoM0Re
2025-01-11 16:33:30 +01:00
parent 49d0fa5f38
commit d7233fe5d7
7 changed files with 159 additions and 27 deletions
+11 -2
View File
@@ -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