@quenty/soundgroup 1.20.3 → 1.20.4-canary.11a5dcf.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 +11 -0
- package/package.json +11 -11
- package/src/Client/SoundGroupServiceClient.lua +3 -3
- package/src/Server/SoundGroupService.lua +3 -3
- package/src/Shared/Effects/SoundEffectsList.lua +8 -8
- package/src/Shared/Effects/SoundEffectsRegistry.lua +9 -6
- package/src/Shared/SoundEffectService.lua +11 -13
- package/src/Shared/SoundGroupTracker.lua +5 -5
- package/src/Shared/Utils/SoundGroupPathUtils.lua +1 -1
- package/test/scripts/Client/ClientMain.client.lua +1 -1
- package/test/scripts/Server/ServerMain.server.lua +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [1.20.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/soundgroup@1.20.3...@quenty/soundgroup@1.20.4-canary.11a5dcf.0) (2025-05-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.20.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/soundgroup@1.20.2...@quenty/soundgroup@1.20.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/soundgroup
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/soundgroup",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.4-canary.11a5dcf.0",
|
|
4
4
|
"description": "Service and utility methods to working with sound groups and sounds in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/counter": "
|
|
30
|
-
"@quenty/instanceutils": "
|
|
31
|
-
"@quenty/loader": "
|
|
32
|
-
"@quenty/maid": "
|
|
33
|
-
"@quenty/observablecollection": "
|
|
34
|
-
"@quenty/rx": "
|
|
35
|
-
"@quenty/table": "
|
|
36
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/baseobject": "10.8.4-canary.11a5dcf.0",
|
|
29
|
+
"@quenty/counter": "7.17.4-canary.11a5dcf.0",
|
|
30
|
+
"@quenty/instanceutils": "13.17.4-canary.11a5dcf.0",
|
|
31
|
+
"@quenty/loader": "10.8.4-canary.11a5dcf.0",
|
|
32
|
+
"@quenty/maid": "3.4.4-canary.11a5dcf.0",
|
|
33
|
+
"@quenty/observablecollection": "12.20.4-canary.11a5dcf.0",
|
|
34
|
+
"@quenty/rx": "13.17.4-canary.11a5dcf.0",
|
|
35
|
+
"@quenty/table": "3.7.5-canary.11a5dcf.0",
|
|
36
|
+
"@quenty/valueobject": "13.17.4-canary.11a5dcf.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
|
|
42
42
|
}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
7
|
local Maid = require("Maid")
|
|
8
|
-
local
|
|
8
|
+
local ServiceBag = require("ServiceBag")
|
|
9
9
|
|
|
10
10
|
local SoundGroupServiceClient = {}
|
|
11
11
|
SoundGroupServiceClient.ServiceName = "SoundGroupServiceClient"
|
|
12
12
|
|
|
13
|
-
function SoundGroupServiceClient:Init(serviceBag:
|
|
13
|
+
function SoundGroupServiceClient:Init(serviceBag: ServiceBag.ServiceBag)
|
|
14
14
|
assert(not self._serviceBag, "Already initialized")
|
|
15
15
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
16
16
|
self._maid = Maid.new()
|
|
@@ -23,4 +23,4 @@ function SoundGroupServiceClient:Destroy()
|
|
|
23
23
|
self._maid:DoCleaning()
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
return SoundGroupServiceClient
|
|
26
|
+
return SoundGroupServiceClient
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
7
|
local Maid = require("Maid")
|
|
8
|
+
local ServiceBag = require("ServiceBag")
|
|
8
9
|
local WellKnownSoundGroups = require("WellKnownSoundGroups")
|
|
9
|
-
local _ServiceBag = require("ServiceBag")
|
|
10
10
|
|
|
11
11
|
local SoundGroupService = {}
|
|
12
12
|
SoundGroupService.ServiceName = "SoundGroupService"
|
|
13
13
|
|
|
14
|
-
function SoundGroupService:Init(serviceBag:
|
|
14
|
+
function SoundGroupService:Init(serviceBag: ServiceBag.ServiceBag)
|
|
15
15
|
assert(not self._serviceBag, "Already initialized")
|
|
16
16
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
17
17
|
self._maid = Maid.new()
|
|
@@ -32,4 +32,4 @@ function SoundGroupService:Destroy()
|
|
|
32
32
|
self._maid:DoCleaning()
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
return SoundGroupService
|
|
35
|
+
return SoundGroupService
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
local require = require(script.Parent.loader).load(script)
|
|
9
9
|
|
|
10
10
|
local BaseObject = require("BaseObject")
|
|
11
|
-
local
|
|
11
|
+
local Counter = require("Counter")
|
|
12
12
|
local Maid = require("Maid")
|
|
13
13
|
local MaidTaskUtils = require("MaidTaskUtils")
|
|
14
|
-
local
|
|
15
|
-
local
|
|
14
|
+
local Observable = require("Observable")
|
|
15
|
+
local ObservableList = require("ObservableList")
|
|
16
16
|
local Rx = require("Rx")
|
|
17
|
-
local
|
|
18
|
-
local
|
|
17
|
+
local Signal = require("Signal")
|
|
18
|
+
local ValueObject = require("ValueObject")
|
|
19
19
|
|
|
20
20
|
local SoundEffectsList = setmetatable({}, BaseObject)
|
|
21
21
|
SoundEffectsList.ClassName = "SoundEffectsList"
|
|
@@ -29,7 +29,7 @@ export type SoundEffectsList = typeof(setmetatable(
|
|
|
29
29
|
_appliedCount: Counter.Counter,
|
|
30
30
|
_isActive: ValueObject.ValueObject<boolean>,
|
|
31
31
|
_hasEffects: ValueObject.ValueObject<boolean>,
|
|
32
|
-
IsActiveChanged:
|
|
32
|
+
IsActiveChanged: Signal.Signal<boolean>,
|
|
33
33
|
HasEffects: () -> boolean,
|
|
34
34
|
},
|
|
35
35
|
{} :: typeof({ __index = SoundEffectsList })
|
|
@@ -72,7 +72,7 @@ end
|
|
|
72
72
|
|
|
73
73
|
@return Observable<boolean>
|
|
74
74
|
]=]
|
|
75
|
-
function SoundEffectsList.ObserveHasEffects(self: SoundEffectsList):
|
|
75
|
+
function SoundEffectsList.ObserveHasEffects(self: SoundEffectsList): Observable.Observable<boolean>
|
|
76
76
|
return self._hasEffects:Observe()
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -140,4 +140,4 @@ function SoundEffectsList.ApplyEffects(self: SoundEffectsList, instance: SoundGr
|
|
|
140
140
|
end
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
return SoundEffectsList
|
|
143
|
+
return SoundEffectsList
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
local require = require(script.Parent.loader).load(script)
|
|
10
10
|
|
|
11
11
|
local BaseObject = require("BaseObject")
|
|
12
|
+
local Brio = require("Brio")
|
|
12
13
|
local Maid = require("Maid")
|
|
14
|
+
local Observable = require("Observable")
|
|
13
15
|
local ObservableMap = require("ObservableMap")
|
|
16
|
+
local ObservableSet = require("ObservableSet")
|
|
14
17
|
local SoundEffectsList = require("SoundEffectsList")
|
|
15
18
|
local SoundGroupPathUtils = require("SoundGroupPathUtils")
|
|
16
|
-
local ObservableSet = require("ObservableSet")
|
|
17
|
-
local _Observable = require("Observable")
|
|
18
|
-
local _Brio = require("Brio")
|
|
19
19
|
|
|
20
20
|
local SoundEffectsRegistry = setmetatable({}, BaseObject)
|
|
21
21
|
SoundEffectsRegistry.ClassName = "SoundEffectsRegistry"
|
|
@@ -64,11 +64,14 @@ end
|
|
|
64
64
|
|
|
65
65
|
function SoundEffectsRegistry.ObserveActiveEffectsPathBrios(
|
|
66
66
|
self: SoundEffectsRegistry
|
|
67
|
-
):
|
|
67
|
+
): Observable.Observable<Brio.Brio<string>>
|
|
68
68
|
return self._activeEffectsPathSet:ObserveItemsBrio() :: any
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
function SoundEffectsRegistry._getOrCreateEffectList(
|
|
71
|
+
function SoundEffectsRegistry._getOrCreateEffectList(
|
|
72
|
+
self: SoundEffectsRegistry,
|
|
73
|
+
soundGroupPath: string
|
|
74
|
+
): SoundEffectsList.SoundEffectsList
|
|
72
75
|
assert(SoundGroupPathUtils.isSoundGroupPath(soundGroupPath), "Bad soundGroupPath")
|
|
73
76
|
|
|
74
77
|
local found = self._pathToEffectList:Get(soundGroupPath)
|
|
@@ -100,4 +103,4 @@ function SoundEffectsRegistry._getOrCreateEffectList(self: SoundEffectsRegistry,
|
|
|
100
103
|
return soundEffectsList
|
|
101
104
|
end
|
|
102
105
|
|
|
103
|
-
return SoundEffectsRegistry
|
|
106
|
+
return SoundEffectsRegistry
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
-
local SoundService = game:GetService("SoundService")
|
|
10
9
|
local RunService = game:GetService("RunService")
|
|
10
|
+
local SoundService = game:GetService("SoundService")
|
|
11
11
|
|
|
12
12
|
local Maid = require("Maid")
|
|
13
|
+
local ServiceBag = require("ServiceBag")
|
|
13
14
|
local SoundEffectsRegistry = require("SoundEffectsRegistry")
|
|
14
15
|
local SoundGroupPathUtils = require("SoundGroupPathUtils")
|
|
15
16
|
local SoundGroupTracker = require("SoundGroupTracker")
|
|
16
17
|
local WellKnownSoundGroups = require("WellKnownSoundGroups")
|
|
17
|
-
local _ServiceBag = require("ServiceBag")
|
|
18
18
|
|
|
19
19
|
local SoundEffectService = {}
|
|
20
20
|
SoundEffectService.ServiceName = "SoundEffectService"
|
|
21
21
|
|
|
22
|
-
function SoundEffectService:Init(serviceBag:
|
|
22
|
+
function SoundEffectService:Init(serviceBag: ServiceBag.ServiceBag)
|
|
23
23
|
assert(not self._serviceBag, "Already initialized")
|
|
24
24
|
self._serviceBag = assert(serviceBag, "No serviceBag")
|
|
25
25
|
self._maid = Maid.new()
|
|
@@ -97,14 +97,13 @@ function SoundEffectService:_setupEffectApplication()
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
local maid, soundGroup = brio:ToMaidAndValue()
|
|
100
|
-
maid:GiveTask(self._tracker:ObserveSoundGroupPath(soundGroup)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
end))
|
|
100
|
+
maid:GiveTask(self._tracker:ObserveSoundGroupPath(soundGroup):Subscribe(function(soundGroupPath)
|
|
101
|
+
if soundGroupPath then
|
|
102
|
+
maid._currentEffects = self._soundEffectsRegister:ApplyEffects(soundGroupPath, soundGroup)
|
|
103
|
+
else
|
|
104
|
+
maid._currentEffects = nil
|
|
105
|
+
end
|
|
106
|
+
end))
|
|
108
107
|
end))
|
|
109
108
|
|
|
110
109
|
-- Render sound groups
|
|
@@ -122,9 +121,8 @@ function SoundEffectService:_setupEffectApplication()
|
|
|
122
121
|
end))
|
|
123
122
|
end
|
|
124
123
|
|
|
125
|
-
|
|
126
124
|
function SoundEffectService:Destroy()
|
|
127
125
|
self._maid:DoCleaning()
|
|
128
126
|
end
|
|
129
127
|
|
|
130
|
-
return SoundEffectService
|
|
128
|
+
return SoundEffectService
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
local require = require(script.Parent.loader).load(script)
|
|
7
7
|
|
|
8
8
|
local BaseObject = require("BaseObject")
|
|
9
|
-
local RxInstanceUtils = require("RxInstanceUtils")
|
|
10
|
-
local ObservableMapList = require("ObservableMapList")
|
|
11
9
|
local Maid = require("Maid")
|
|
10
|
+
local Observable = require("Observable")
|
|
12
11
|
local ObservableMap = require("ObservableMap")
|
|
13
|
-
local
|
|
12
|
+
local ObservableMapList = require("ObservableMapList")
|
|
14
13
|
local Rx = require("Rx")
|
|
15
|
-
local
|
|
14
|
+
local RxInstanceUtils = require("RxInstanceUtils")
|
|
15
|
+
local SoundGroupPathUtils = require("SoundGroupPathUtils")
|
|
16
16
|
|
|
17
17
|
local SoundGroupTracker = setmetatable({}, BaseObject)
|
|
18
18
|
SoundGroupTracker.ClassName = "SoundGroupTracker"
|
|
@@ -123,4 +123,4 @@ function SoundGroupTracker._track(self: SoundGroupTracker, observeRootPath, pare
|
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
return SoundGroupTracker
|
|
126
|
+
return SoundGroupTracker
|