@quenty/sounds 10.10.3 → 10.10.4-canary.550.afa1b3b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +7 -7
- package/src/Shared/SoundUtils.lua +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.10.4-canary.550.afa1b3b.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/sounds@10.10.3...@quenty/sounds@10.10.4-canary.550.afa1b3b.0) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/sounds
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [10.10.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/sounds@10.10.1...@quenty/sounds@10.10.3) (2025-04-07)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/sounds",
|
|
3
|
-
"version": "10.10.
|
|
3
|
+
"version": "10.10.4-canary.550.afa1b3b.0",
|
|
4
4
|
"description": "Utility functions involving sounds and their state",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/maid": "
|
|
31
|
-
"@quenty/promise": "
|
|
32
|
-
"@quenty/promisemaid": "
|
|
33
|
-
"@quenty/rbxasset": "
|
|
29
|
+
"@quenty/loader": "10.8.3-canary.550.afa1b3b.0",
|
|
30
|
+
"@quenty/maid": "3.4.3-canary.550.afa1b3b.0",
|
|
31
|
+
"@quenty/promise": "10.10.4-canary.550.afa1b3b.0",
|
|
32
|
+
"@quenty/promisemaid": "5.10.4-canary.550.afa1b3b.0",
|
|
33
|
+
"@quenty/rbxasset": "5.8.3-canary.550.afa1b3b.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "afa1b3b99b862698c3ab46009497bd507150867c"
|
|
39
39
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
--!strict
|
|
1
2
|
--[=[
|
|
2
3
|
Helps plays back sounds in the Roblox engine.
|
|
3
4
|
|
|
@@ -64,8 +65,9 @@ function SoundUtils.createSoundFromId(id: string | number | SoundOptions): Sound
|
|
|
64
65
|
return sound
|
|
65
66
|
end
|
|
66
67
|
|
|
67
|
-
function SoundUtils.applyPropertiesFromId(sound: Sound, id: string | number | SoundOptions)
|
|
68
|
-
local soundId = SoundUtils.toRbxAssetId(id)
|
|
68
|
+
function SoundUtils.applyPropertiesFromId(sound: Sound, id: string | number | SoundOptions): ()
|
|
69
|
+
local soundId = assert(SoundUtils.toRbxAssetId(id), "Unable to convert id to rbxassetid")
|
|
70
|
+
|
|
69
71
|
sound.Name = string.format("Sound_%s", soundId)
|
|
70
72
|
sound.SoundId = soundId
|
|
71
73
|
sound.RollOffMode = Enum.RollOffMode.InverseTapered
|
|
@@ -111,7 +113,7 @@ end
|
|
|
111
113
|
|
|
112
114
|
@param sound Sound
|
|
113
115
|
]=]
|
|
114
|
-
function SoundUtils.removeAfterTimeLength(sound: Sound)
|
|
116
|
+
function SoundUtils.removeAfterTimeLength(sound: Sound): ()
|
|
115
117
|
-- TODO: clean up on destroying
|
|
116
118
|
SoundPromiseUtils.promiseLoaded(sound):Then(function()
|
|
117
119
|
task.delay(sound.TimeLength + 0.05, function()
|
|
@@ -155,7 +157,7 @@ end
|
|
|
155
157
|
@return string?
|
|
156
158
|
@within SoundUtils
|
|
157
159
|
]=]
|
|
158
|
-
function SoundUtils.toRbxAssetId(soundId: string | number | SoundOptions)
|
|
160
|
+
function SoundUtils.toRbxAssetId(soundId: string | number | SoundOptions): string?
|
|
159
161
|
if type(soundId) == "table" then
|
|
160
162
|
return RbxAssetUtils.toRbxAssetId(soundId.SoundId)
|
|
161
163
|
else
|
|
@@ -183,8 +185,8 @@ end
|
|
|
183
185
|
@param parent Instance
|
|
184
186
|
@return Sound
|
|
185
187
|
]=]
|
|
186
|
-
function SoundUtils.playTemplateInParent(templates, templateName: string, parent: Instance)
|
|
187
|
-
local sound = templates:Clone(templateName)
|
|
188
|
+
function SoundUtils.playTemplateInParent(templates, templateName: string, parent: Instance): Sound
|
|
189
|
+
local sound: Sound = templates:Clone(templateName)
|
|
188
190
|
sound.Archivable = false
|
|
189
191
|
sound.Parent = parent
|
|
190
192
|
|