@quenty/seatutils 7.18.0 → 7.18.1

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
+ ## [7.18.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/seatutils@7.18.0...@quenty/seatutils@7.18.1) (2025-03-21)
7
+
8
+ **Note:** Version bump only for package @quenty/seatutils
9
+
10
+
11
+
12
+
13
+
6
14
  # [7.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/seatutils@7.17.0...@quenty/seatutils@7.18.0) (2025-02-18)
7
15
 
8
16
  **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.18.0",
3
+ "version": "7.18.1",
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": "^14.16.0",
29
- "@quenty/characterutils": "^12.17.0",
30
- "@quenty/instanceutils": "^13.16.0",
28
+ "@quenty/brio": "^14.16.1",
29
+ "@quenty/characterutils": "^12.17.1",
30
+ "@quenty/instanceutils": "^13.16.1",
31
31
  "@quenty/loader": "^10.8.0",
32
- "@quenty/rx": "^13.16.0",
33
- "@quenty/statestack": "^14.17.0"
32
+ "@quenty/rx": "^13.16.1",
33
+ "@quenty/statestack": "^14.17.1"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "184a407d8d7366c39009444c3c9a7023cb176471"
38
+ "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
39
39
  }
@@ -18,38 +18,38 @@ local RxSeatUtils = {}
18
18
  @param seat Seat | VehicleSeat
19
19
  @return Observable<Brio<Humanoid>>
20
20
  ]=]
21
- function RxSeatUtils.observeOccupantBrio(seat)
21
+ function RxSeatUtils.observeOccupantBrio(seat: Seat | VehicleSeat)
22
22
  return RxInstanceUtils.observeChildrenOfNameBrio(seat, "Weld", "SeatWeld"):Pipe({
23
23
  RxBrioUtils.flatMapBrio(function(weld)
24
24
  return RxBrioUtils.flatCombineLatest({
25
25
  isPart0Seat = RxInstanceUtils.observePropertyBrio(weld, "Part0", function(part)
26
- return part == seat;
27
- end);
26
+ return part == seat
27
+ end),
28
28
 
29
29
  humanoid = RxInstanceUtils.observePropertyBrio(weld, "Part1", function(part)
30
- return part ~= nil;
30
+ return part ~= nil
31
31
  end):Pipe({
32
32
  RxBrioUtils.switchMapBrio(function(part)
33
33
  return RxInstanceUtils.observePropertyBrio(part, "Parent", function(parent)
34
34
  return parent ~= nil
35
35
  end)
36
- end);
36
+ end),
37
37
 
38
38
  RxBrioUtils.switchMapBrio(function(character)
39
39
  return RxInstanceUtils.observeLastNamedChildBrio(character, "Humanoid", "Humanoid")
40
- end);
41
- });
40
+ end),
41
+ }),
42
42
  })
43
- end);
43
+ end),
44
44
 
45
45
  -- Reduce state to humanoid
46
46
  RxBrioUtils.where(function(state)
47
47
  return state.isPart0Seat ~= nil and state.humanoid ~= nil
48
- end);
48
+ end),
49
49
  -- Reduce state to humanoid
50
50
  RxBrioUtils.map(function(state)
51
51
  return state.humanoid
52
- end);
52
+ end),
53
53
  })
54
54
  end
55
55
 
@@ -59,14 +59,14 @@ end
59
59
  @param seat Seat | VehicleSeat
60
60
  @return Observable<Humanoid | nil>
61
61
  ]=]
62
- function RxSeatUtils.observeOccupant(seat)
62
+ function RxSeatUtils.observeOccupant(seat: Seat | VehicleSeat)
63
63
  assert(typeof(seat) == "Instance", "Bad seat")
64
64
 
65
65
  return RxSeatUtils.observeOccupantBrio(seat):Pipe({
66
66
  -- Switch to top
67
- RxStateStackUtils.topOfStack();
68
- Rx.distinct();
67
+ RxStateStackUtils.topOfStack(),
68
+ Rx.distinct(),
69
69
  })
70
70
  end
71
71
 
72
- return RxSeatUtils
72
+ return RxSeatUtils
@@ -14,7 +14,7 @@ local SeatUtils = {}
14
14
  @param seats { Seat }
15
15
  @return { Player }
16
16
  ]=]
17
- function SeatUtils.getPlayerOccupants(seats)
17
+ function SeatUtils.getPlayerOccupants(seats: { Seat | VehicleSeat }): { Player }
18
18
  local players = {}
19
19
 
20
20
  for _, seat in pairs(seats) do
@@ -30,4 +30,4 @@ function SeatUtils.getPlayerOccupants(seats)
30
30
  return players
31
31
  end
32
32
 
33
- return SeatUtils
33
+ return SeatUtils