@quenty/seatutils 7.19.3 → 7.19.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 +8 -8
- package/src/Shared/RxSeatUtils.lua +11 -10
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
|
+
## [7.19.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/seatutils@7.19.3...@quenty/seatutils@7.19.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
|
## [7.19.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/seatutils@7.19.2...@quenty/seatutils@7.19.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/seatutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/seatutils",
|
|
3
|
-
"version": "7.19.
|
|
3
|
+
"version": "7.19.4-canary.11a5dcf.0",
|
|
4
4
|
"description": "Holds utilities to work with Roblox seats",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/brio": "
|
|
29
|
-
"@quenty/characterutils": "
|
|
30
|
-
"@quenty/instanceutils": "
|
|
31
|
-
"@quenty/loader": "
|
|
32
|
-
"@quenty/rx": "
|
|
33
|
-
"@quenty/statestack": "
|
|
28
|
+
"@quenty/brio": "14.17.4-canary.11a5dcf.0",
|
|
29
|
+
"@quenty/characterutils": "12.18.4-canary.11a5dcf.0",
|
|
30
|
+
"@quenty/instanceutils": "13.17.4-canary.11a5dcf.0",
|
|
31
|
+
"@quenty/loader": "10.8.4-canary.11a5dcf.0",
|
|
32
|
+
"@quenty/rx": "13.17.4-canary.11a5dcf.0",
|
|
33
|
+
"@quenty/statestack": "14.18.4-canary.11a5dcf.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
|
|
39
39
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
local require = require(script.Parent.loader).load(script)
|
|
8
8
|
|
|
9
|
-
local
|
|
9
|
+
local Brio = require("Brio")
|
|
10
|
+
local Observable = require("Observable")
|
|
11
|
+
local Rx = require("Rx")
|
|
10
12
|
local RxBrioUtils = require("RxBrioUtils")
|
|
13
|
+
local RxInstanceUtils = require("RxInstanceUtils")
|
|
11
14
|
local RxStateStackUtils = require("RxStateStackUtils")
|
|
12
|
-
local Rx = require("Rx")
|
|
13
|
-
local _Observable = require("Observable")
|
|
14
|
-
local _Brio = require("Brio")
|
|
15
15
|
|
|
16
16
|
local RxSeatUtils = {}
|
|
17
17
|
|
|
@@ -21,7 +21,8 @@ local RxSeatUtils = {}
|
|
|
21
21
|
@param seat Seat | VehicleSeat
|
|
22
22
|
@return Observable<Brio<Humanoid>>
|
|
23
23
|
]=]
|
|
24
|
-
function RxSeatUtils.observeOccupantBrio(seat: Seat | VehicleSeat):
|
|
24
|
+
function RxSeatUtils.observeOccupantBrio(seat: Seat | VehicleSeat): Observable.Observable<Brio.Brio<Humanoid>>
|
|
25
|
+
-- stylua: ignore
|
|
25
26
|
return RxInstanceUtils.observeChildrenOfNameBrio(seat, "Weld", "SeatWeld"):Pipe({
|
|
26
27
|
RxBrioUtils.flatMapBrio(function(weld)
|
|
27
28
|
return RxBrioUtils.flatCombineLatest({
|
|
@@ -36,11 +37,11 @@ function RxSeatUtils.observeOccupantBrio(seat: Seat | VehicleSeat): _Observable.
|
|
|
36
37
|
return RxInstanceUtils.observePropertyBrio(part, "Parent", function(parent)
|
|
37
38
|
return parent ~= nil
|
|
38
39
|
end)
|
|
39
|
-
end),
|
|
40
|
+
end) :: any,
|
|
40
41
|
|
|
41
42
|
RxBrioUtils.switchMapBrio(function(character)
|
|
42
43
|
return RxInstanceUtils.observeLastNamedChildBrio(character, "Humanoid", "Humanoid")
|
|
43
|
-
end),
|
|
44
|
+
end) :: any,
|
|
44
45
|
}),
|
|
45
46
|
})
|
|
46
47
|
end) :: any,
|
|
@@ -48,11 +49,11 @@ function RxSeatUtils.observeOccupantBrio(seat: Seat | VehicleSeat): _Observable.
|
|
|
48
49
|
-- Reduce state to humanoid
|
|
49
50
|
RxBrioUtils.where(function(state)
|
|
50
51
|
return state.isPart0Seat ~= nil and state.humanoid ~= nil
|
|
51
|
-
end),
|
|
52
|
+
end) :: any,
|
|
52
53
|
-- Reduce state to humanoid
|
|
53
54
|
RxBrioUtils.map(function(state)
|
|
54
55
|
return state.humanoid
|
|
55
|
-
end),
|
|
56
|
+
end) :: any,
|
|
56
57
|
}) :: any
|
|
57
58
|
end
|
|
58
59
|
|
|
@@ -62,7 +63,7 @@ end
|
|
|
62
63
|
@param seat Seat | VehicleSeat
|
|
63
64
|
@return Observable<Humanoid?>
|
|
64
65
|
]=]
|
|
65
|
-
function RxSeatUtils.observeOccupant(seat: Seat | VehicleSeat):
|
|
66
|
+
function RxSeatUtils.observeOccupant(seat: Seat | VehicleSeat): Observable.Observable<Humanoid?>
|
|
66
67
|
assert(typeof(seat) == "Instance", "Bad seat")
|
|
67
68
|
|
|
68
69
|
return RxSeatUtils.observeOccupantBrio(seat):Pipe({
|