@quenty/scoredactionservice 16.62.2 → 16.63.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
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
|
+
# [16.63.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scoredactionservice@16.62.3...@quenty/scoredactionservice@16.63.0) (2026-11-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/scoredactionservice
|
|
9
|
+
|
|
10
|
+
## [16.62.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scoredactionservice@16.62.2...@quenty/scoredactionservice@16.62.3) (2026-11-18)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @quenty/scoredactionservice
|
|
13
|
+
|
|
6
14
|
## [16.62.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scoredactionservice@16.62.1...@quenty/scoredactionservice@16.62.2) (2026-11-12)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/scoredactionservice
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/scoredactionservice",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.63.0",
|
|
4
4
|
"description": "Scores actions and picks the highest rated one every frame",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
"Quenty"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@quenty/baseobject": "10.16.
|
|
33
|
-
"@quenty/brio": "14.38.
|
|
34
|
-
"@quenty/inputkeymaputils": "14.
|
|
35
|
-
"@quenty/inputmode": "13.43.
|
|
36
|
-
"@quenty/jestutils": "1.1.
|
|
32
|
+
"@quenty/baseobject": "10.16.4",
|
|
33
|
+
"@quenty/brio": "14.38.2",
|
|
34
|
+
"@quenty/inputkeymaputils": "14.62.0",
|
|
35
|
+
"@quenty/inputmode": "13.43.2",
|
|
36
|
+
"@quenty/jestutils": "1.1.4",
|
|
37
37
|
"@quenty/loader": "10.11.3",
|
|
38
|
-
"@quenty/maid": "3.12.
|
|
39
|
-
"@quenty/nevermore-test-runner": "1.6.
|
|
40
|
-
"@quenty/rx": "13.35.
|
|
41
|
-
"@quenty/servicebag": "11.21.
|
|
42
|
-
"@quenty/signal": "7.13.
|
|
43
|
-
"@quenty/statestack": "14.40.
|
|
44
|
-
"@quenty/steputils": "3.9.
|
|
38
|
+
"@quenty/maid": "3.12.4",
|
|
39
|
+
"@quenty/nevermore-test-runner": "1.6.4",
|
|
40
|
+
"@quenty/rx": "13.35.2",
|
|
41
|
+
"@quenty/servicebag": "11.21.4",
|
|
42
|
+
"@quenty/signal": "7.13.5",
|
|
43
|
+
"@quenty/statestack": "14.40.2",
|
|
44
|
+
"@quenty/steputils": "3.9.4",
|
|
45
45
|
"@quenty/table": "3.9.2",
|
|
46
|
-
"@quenty/valueobject": "13.39.
|
|
47
|
-
"@quentystudios/jest-lua": "3.10.0-quenty.
|
|
46
|
+
"@quenty/valueobject": "13.39.2",
|
|
47
|
+
"@quentystudios/jest-lua": "3.10.0-quenty.3"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "191a328ce40545ac6fb0282d33dde5b0576494e6"
|
|
53
53
|
}
|
|
@@ -8,7 +8,9 @@ local require = require(script.Parent.loader).load(script)
|
|
|
8
8
|
local Jest = require("Jest")
|
|
9
9
|
local JestUtils = require("JestUtils")
|
|
10
10
|
local Maid = require("Maid")
|
|
11
|
+
local RxTestUtils = require("RxTestUtils")
|
|
11
12
|
local ScoredAction = require("ScoredAction")
|
|
13
|
+
local SignalTestUtils = require("SignalTestUtils")
|
|
12
14
|
local ValueObject = require("ValueObject")
|
|
13
15
|
|
|
14
16
|
local describe = Jest.Globals.describe
|
|
@@ -19,7 +21,7 @@ type Controller = {
|
|
|
19
21
|
newAction: () -> ScoredAction.ScoredAction,
|
|
20
22
|
newLooseAction: () -> ScoredAction.ScoredAction,
|
|
21
23
|
newValue: (boolean) -> ValueObject.ValueObject<boolean>,
|
|
22
|
-
|
|
24
|
+
maid: Maid.Maid,
|
|
23
25
|
Destroy: (self: Controller) -> (),
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -39,13 +41,7 @@ local function setup(): Controller
|
|
|
39
41
|
return maid:Add(ValueObject.new(value, "boolean")) :: any
|
|
40
42
|
end,
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
local results = {}
|
|
44
|
-
maid:GiveTask(observable:Subscribe(function(value)
|
|
45
|
-
table.insert(results, value)
|
|
46
|
-
end))
|
|
47
|
-
return results
|
|
48
|
-
end,
|
|
44
|
+
maid = maid,
|
|
49
45
|
|
|
50
46
|
Destroy = function(_self)
|
|
51
47
|
maid:DoCleaning()
|
|
@@ -137,7 +133,7 @@ describe("ScoredAction.SetIsEnabled", function()
|
|
|
137
133
|
local controller = setup()
|
|
138
134
|
local action = controller.newAction()
|
|
139
135
|
|
|
140
|
-
local states = controller.
|
|
136
|
+
local states = RxTestUtils.collectList(controller.maid, action:ObserveIsEnabled())
|
|
141
137
|
action:SetIsEnabled(false)
|
|
142
138
|
action:SetIsEnabled(true)
|
|
143
139
|
|
|
@@ -152,7 +148,7 @@ describe("ScoredAction.ObserveIsEnabled", function()
|
|
|
152
148
|
local controller = setup()
|
|
153
149
|
local action = controller.newAction()
|
|
154
150
|
|
|
155
|
-
local states = controller.
|
|
151
|
+
local states = RxTestUtils.collectList(controller.maid, action:ObserveIsEnabled())
|
|
156
152
|
action:SetIsEnabled(false)
|
|
157
153
|
|
|
158
154
|
expect(states).toEqual({ true, false })
|
|
@@ -195,10 +191,7 @@ describe("ScoredAction.PushPreferred", function()
|
|
|
195
191
|
local controller = setup()
|
|
196
192
|
local action = controller.newAction()
|
|
197
193
|
|
|
198
|
-
local states =
|
|
199
|
-
action.PreferredChanged:Connect(function(isPreferred)
|
|
200
|
-
table.insert(states, isPreferred)
|
|
201
|
-
end)
|
|
194
|
+
local states = SignalTestUtils.collectFireList(controller.maid, action.PreferredChanged)
|
|
202
195
|
|
|
203
196
|
action:PushPreferred()()
|
|
204
197
|
|
|
@@ -225,7 +218,7 @@ describe("ScoredAction.ObservePreferred", function()
|
|
|
225
218
|
local controller = setup()
|
|
226
219
|
local action = controller.newAction()
|
|
227
220
|
|
|
228
|
-
local states = controller.
|
|
221
|
+
local states = RxTestUtils.collectList(controller.maid, action:ObservePreferred())
|
|
229
222
|
action:PushPreferred()()
|
|
230
223
|
|
|
231
224
|
expect(states).toEqual({ false, true, false })
|
|
@@ -239,14 +232,11 @@ describe("ScoredAction.Destroy", function()
|
|
|
239
232
|
local controller = setup()
|
|
240
233
|
local action = controller.newLooseAction()
|
|
241
234
|
|
|
242
|
-
local
|
|
243
|
-
action.Removing:Connect(function()
|
|
244
|
-
fired = true
|
|
245
|
-
end)
|
|
235
|
+
local removing = SignalTestUtils.countFires(controller.maid, action.Removing)
|
|
246
236
|
|
|
247
237
|
action:Destroy()
|
|
248
238
|
|
|
249
|
-
expect(
|
|
239
|
+
expect(removing()).toBe(1)
|
|
250
240
|
|
|
251
241
|
controller:Destroy()
|
|
252
242
|
end)
|
|
@@ -13,6 +13,7 @@ local Jest = require("Jest")
|
|
|
13
13
|
local JestUtils = require("JestUtils")
|
|
14
14
|
local Maid = require("Maid")
|
|
15
15
|
local Observable = require("Observable")
|
|
16
|
+
local ObservableSpy = require("ObservableSpy")
|
|
16
17
|
local ScoredActionServiceClient = require("ScoredActionServiceClient")
|
|
17
18
|
local ServiceBag = require("ServiceBag")
|
|
18
19
|
local StepUtils = require("StepUtils")
|
|
@@ -79,18 +80,13 @@ local function setup(): any
|
|
|
79
80
|
end,
|
|
80
81
|
|
|
81
82
|
collect = function(lists, scoreValue)
|
|
82
|
-
local actions = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
:Subscribe(function(action)
|
|
88
|
-
table.insert(actions, action)
|
|
89
|
-
end)
|
|
90
|
-
maid:GiveTask(sub)
|
|
83
|
+
local actions = ObservableSpy.new((observeLists(lists) :: any):Pipe({
|
|
84
|
+
service:ObserveNewFromInputKeyMapList(scoreValue) :: any,
|
|
85
|
+
}))
|
|
86
|
+
maid:GiveTask(actions)
|
|
91
87
|
|
|
92
88
|
return actions, function()
|
|
93
|
-
|
|
89
|
+
actions:Destroy()
|
|
94
90
|
end
|
|
95
91
|
end,
|
|
96
92
|
|