@quenty/ragdoll 15.21.1-canary.534.c6c59e8.0 → 15.22.1-canary.542.7609692.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,7 +3,15 @@
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
- ## [15.21.1-canary.534.c6c59e8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.21.0...@quenty/ragdoll@15.21.1-canary.534.c6c59e8.0) (2025-02-18)
6
+ ## [15.22.1-canary.542.7609692.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.22.0...@quenty/ragdoll@15.22.1-canary.542.7609692.0) (2025-03-13)
7
+
8
+ **Note:** Version bump only for package @quenty/ragdoll
9
+
10
+
11
+
12
+
13
+
14
+ # [15.22.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.21.0...@quenty/ragdoll@15.22.0) (2025-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/ragdoll
9
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/ragdoll",
3
- "version": "15.21.1-canary.534.c6c59e8.0",
3
+ "version": "15.22.1-canary.542.7609692.0",
4
4
  "description": "Quenty's Ragdoll system for Roblox - Floppy fun ragdolls",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,39 +25,39 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/adorneedata": "7.16.1-canary.534.c6c59e8.0",
29
- "@quenty/attributeutils": "14.15.1-canary.534.c6c59e8.0",
30
- "@quenty/baseobject": "10.7.2-canary.534.c6c59e8.0",
31
- "@quenty/binder": "14.17.1-canary.534.c6c59e8.0",
32
- "@quenty/brio": "14.15.1-canary.534.c6c59e8.0",
33
- "@quenty/camera": "14.18.3-canary.534.c6c59e8.0",
28
+ "@quenty/adorneedata": "7.17.1-canary.542.7609692.0",
29
+ "@quenty/attributeutils": "14.16.1-canary.542.7609692.0",
30
+ "@quenty/baseobject": "10.8.0",
31
+ "@quenty/binder": "14.18.1-canary.542.7609692.0",
32
+ "@quenty/brio": "14.16.1-canary.542.7609692.0",
33
+ "@quenty/camera": "14.19.1-canary.542.7609692.0",
34
34
  "@quenty/cancellabledelay": "3.5.0",
35
- "@quenty/characterutils": "12.16.1-canary.534.c6c59e8.0",
36
- "@quenty/draw": "7.7.2-canary.534.c6c59e8.0",
35
+ "@quenty/characterutils": "12.17.1-canary.542.7609692.0",
36
+ "@quenty/draw": "7.8.1-canary.542.7609692.0",
37
37
  "@quenty/enumutils": "3.4.0",
38
38
  "@quenty/hapticfeedbackutils": "3.2.0",
39
- "@quenty/instanceutils": "13.15.1-canary.534.c6c59e8.0",
40
- "@quenty/loader": "10.7.2-canary.534.c6c59e8.0",
39
+ "@quenty/instanceutils": "13.16.1-canary.542.7609692.0",
40
+ "@quenty/loader": "10.8.0",
41
41
  "@quenty/maid": "3.4.0",
42
- "@quenty/motor6d": "7.18.2-canary.534.c6c59e8.0",
43
- "@quenty/physicsutils": "8.15.1-canary.534.c6c59e8.0",
44
- "@quenty/playerhumanoidbinder": "14.17.2-canary.534.c6c59e8.0",
45
- "@quenty/promise": "10.9.1-canary.534.c6c59e8.0",
46
- "@quenty/qframe": "10.9.1-canary.534.c6c59e8.0",
47
- "@quenty/r15utils": "13.15.1-canary.534.c6c59e8.0",
48
- "@quenty/remoting": "12.16.1-canary.534.c6c59e8.0",
49
- "@quenty/rx": "13.15.1-canary.534.c6c59e8.0",
50
- "@quenty/rxbinderutils": "14.17.1-canary.534.c6c59e8.0",
51
- "@quenty/rxsignal": "7.15.1-canary.534.c6c59e8.0",
52
- "@quenty/spring": "10.7.2-canary.534.c6c59e8.0",
53
- "@quenty/steputils": "3.5.2",
54
- "@quenty/table": "3.7.0",
55
- "@quenty/tie": "10.18.2-canary.534.c6c59e8.0",
56
- "@quenty/valuebaseutils": "13.15.1-canary.534.c6c59e8.0",
57
- "@quenty/valueobject": "13.15.1-canary.534.c6c59e8.0"
42
+ "@quenty/motor6d": "7.19.1-canary.542.7609692.0",
43
+ "@quenty/physicsutils": "8.16.1-canary.542.7609692.0",
44
+ "@quenty/playerhumanoidbinder": "14.18.1-canary.542.7609692.0",
45
+ "@quenty/promise": "10.10.1-canary.542.7609692.0",
46
+ "@quenty/qframe": "10.10.1-canary.542.7609692.0",
47
+ "@quenty/r15utils": "13.16.1-canary.542.7609692.0",
48
+ "@quenty/remoting": "12.17.1-canary.542.7609692.0",
49
+ "@quenty/rx": "13.16.1-canary.542.7609692.0",
50
+ "@quenty/rxbinderutils": "14.18.1-canary.542.7609692.0",
51
+ "@quenty/rxsignal": "7.16.1-canary.542.7609692.0",
52
+ "@quenty/spring": "10.8.1-canary.542.7609692.0",
53
+ "@quenty/steputils": "3.5.3-canary.542.7609692.0",
54
+ "@quenty/table": "3.7.1-canary.542.7609692.0",
55
+ "@quenty/tie": "10.19.1-canary.542.7609692.0",
56
+ "@quenty/valuebaseutils": "13.16.1-canary.542.7609692.0",
57
+ "@quenty/valueobject": "13.16.1-canary.542.7609692.0"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "c6c59e8e4b98466955aafe50473027d316ab4ac7"
62
+ "gitHead": "76096921c6c965e5c4f9c796f97642d16d628c6b"
63
63
  }
@@ -12,24 +12,24 @@ local RagdollableBase = setmetatable({}, BaseObject)
12
12
  RagdollableBase.ClassName = "RagdollableBase"
13
13
  RagdollableBase.__index = RagdollableBase
14
14
 
15
- function RagdollableBase.new(humanoid)
15
+ function RagdollableBase.new(humanoid: Humanoid)
16
16
  local self = setmetatable(BaseObject.new(humanoid), RagdollableBase)
17
17
 
18
18
  self.Ragdolled = RxSignal.new(function()
19
19
  return self:ObserveIsRagdolled():Pipe({
20
- Rx.skip(1);
20
+ Rx.skip(1),
21
21
  Rx.where(function(value)
22
22
  return value == true
23
- end);
23
+ end),
24
24
  })
25
25
  end)
26
26
 
27
27
  self.Unragdolled = RxSignal.new(function()
28
28
  return self:ObserveIsRagdolled():Pipe({
29
- Rx.skip(1);
29
+ Rx.skip(1),
30
30
  Rx.where(function(value)
31
31
  return value == true
32
- end);
32
+ end),
33
33
  })
34
34
  end)
35
35
 
@@ -52,5 +52,4 @@ function RagdollableBase:IsRagdolled()
52
52
  return self._obj:HasTag("Ragdoll")
53
53
  end
54
54
 
55
-
56
- return RagdollableBase
55
+ return RagdollableBase
@@ -18,17 +18,29 @@ local CharacterUtils = require("CharacterUtils")
18
18
 
19
19
  local RxRagdollUtils = {}
20
20
 
21
- function RxRagdollUtils.observeRigType(humanoid)
21
+ --[=[
22
+ Observes the RigType of a Humanoid.
23
+
24
+ @param humanoid Humanoid
25
+ @return Observable<Enum.RigType>
26
+ ]=]
27
+ function RxRagdollUtils.observeRigType(humanoid: Humanoid)
22
28
  return RxInstanceUtils.observeProperty(humanoid, "RigType")
23
29
  end
24
30
 
25
- function RxRagdollUtils.observeCharacterBrio(humanoid)
31
+ --[=[
32
+ Observes the character of a Humanoid.
33
+
34
+ @param humanoid Humanoid
35
+ @return Observable<Model>
36
+ ]=]
37
+ function RxRagdollUtils.observeCharacterBrio(humanoid: Humanoid)
26
38
  return RxInstanceUtils.observePropertyBrio(humanoid, "Parent", function(value)
27
39
  return value ~= nil
28
40
  end)
29
41
  end
30
42
 
31
- function RxRagdollUtils.suppressRootPartCollision(character)
43
+ function RxRagdollUtils.suppressRootPartCollision(character: Model)
32
44
  assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
33
45
 
34
46
  local topMaid = Maid.new()
@@ -46,11 +58,12 @@ function RxRagdollUtils.suppressRootPartCollision(character)
46
58
 
47
59
  -- Reduce impact of rootPart mass as much as possible.
48
60
  rootPart.CustomPhysicalProperties = PhysicalProperties.new(
49
- 0.01,
50
- current.Friction,
51
- current.Elasticity,
52
- current.FrictionWeight,
53
- current.ElasticityWeight)
61
+ 0.01,
62
+ current.Friction,
63
+ current.Elasticity,
64
+ current.FrictionWeight,
65
+ current.ElasticityWeight
66
+ )
54
67
  rootPart.CanCollide = false
55
68
  maid:GiveTask(function()
56
69
  rootPart.CustomPhysicalProperties = oldProperties
@@ -61,7 +74,7 @@ function RxRagdollUtils.suppressRootPartCollision(character)
61
74
  return topMaid
62
75
  end
63
76
 
64
- function RxRagdollUtils.enforceHeadCollision(character)
77
+ function RxRagdollUtils.enforceHeadCollision(character: Model)
65
78
  assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
66
79
 
67
80
  local topMaid = Maid.new()
@@ -82,50 +95,52 @@ function RxRagdollUtils.enforceHeadCollision(character)
82
95
  return topMaid
83
96
  end
84
97
 
85
- function RxRagdollUtils.enforceHumanoidStateMachineOff(character, humanoid)
98
+ function RxRagdollUtils.enforceHumanoidStateMachineOff(character: Model, humanoid: Humanoid)
86
99
  assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
87
100
 
88
101
  local topMaid = Maid.new()
89
102
 
90
- topMaid:GiveTask(RxInstanceUtils.observePropertyBrio(humanoid, "EvaluateStateMachine", function(evaluateStateMachine)
91
- return not evaluateStateMachine
92
- end):Subscribe(function(brio)
93
- if brio:IsDead() then
94
- return
95
- end
103
+ topMaid:GiveTask(
104
+ RxInstanceUtils.observePropertyBrio(humanoid, "EvaluateStateMachine", function(evaluateStateMachine)
105
+ return not evaluateStateMachine
106
+ end):Subscribe(function(brio)
107
+ if brio:IsDead() then
108
+ return
109
+ end
96
110
 
97
- local maid = brio:ToMaid()
98
- maid:GiveTask(RxRagdollUtils.enforceLimbCollisions(character))
99
- end))
111
+ local maid = brio:ToMaid()
112
+ maid:GiveTask(RxRagdollUtils.enforceLimbCollisions(character))
113
+ end)
114
+ )
100
115
 
101
116
  return topMaid
102
117
  end
103
118
 
104
- function RxRagdollUtils.enforceLimbCollisions(character)
119
+ function RxRagdollUtils.enforceLimbCollisions(character: Model)
105
120
  assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
106
121
 
107
122
  local topMaid = Maid.new()
108
123
 
109
124
  local LIMB_NAMES = {
110
125
  -- R6
111
- ["Left Arm"] = true;
112
- ["Right Arm"] = true;
113
- ["Left Leg"] = true;
114
- ["Right Leg"] = true;
126
+ ["Left Arm"] = true,
127
+ ["Right Arm"] = true,
128
+ ["Left Leg"] = true,
129
+ ["Right Leg"] = true,
115
130
 
116
131
  -- R15
117
- ["LeftUpperArm"] = true;
118
- ["LeftLowerArm"] = true;
119
- ["LeftHand"] = true;
120
- ["LeftUpperLeg"] = true;
121
- ["LeftLowerLeg"] = true;
122
- ["LeftFoot"] = true;
123
- ["RightUpperArm"] = true;
124
- ["RightLowerArm"] = true;
125
- ["RightHand"] = true;
126
- ["RightUpperLeg"] = true;
127
- ["RightLowerLeg"] = true;
128
- ["RightFoot"] = true;
132
+ ["LeftUpperArm"] = true,
133
+ ["LeftLowerArm"] = true,
134
+ ["LeftHand"] = true,
135
+ ["LeftUpperLeg"] = true,
136
+ ["LeftLowerLeg"] = true,
137
+ ["LeftFoot"] = true,
138
+ ["RightUpperArm"] = true,
139
+ ["RightLowerArm"] = true,
140
+ ["RightHand"] = true,
141
+ ["RightUpperLeg"] = true,
142
+ ["RightLowerLeg"] = true,
143
+ ["RightFoot"] = true,
129
144
  }
130
145
 
131
146
  topMaid:GiveTask(RxInstanceUtils.observeChildrenBrio(character, function(child)
@@ -145,13 +160,12 @@ function RxRagdollUtils.enforceLimbCollisions(character)
145
160
  return topMaid
146
161
  end
147
162
 
148
-
149
- function RxRagdollUtils.runLocal(humanoid)
163
+ function RxRagdollUtils.runLocal(humanoid: Humanoid)
150
164
  local topMaid = Maid.new()
151
165
 
152
166
  topMaid:GiveTask(RxBrioUtils.flatCombineLatest({
153
- character = RxRagdollUtils.observeCharacterBrio(humanoid);
154
- rigType = RxRagdollUtils.observeRigType(humanoid);
167
+ character = RxRagdollUtils.observeCharacterBrio(humanoid),
168
+ rigType = RxRagdollUtils.observeRigType(humanoid),
155
169
  }):Subscribe(function(state)
156
170
  if state.character and state.rigType then
157
171
  local character = state.character
@@ -195,7 +209,7 @@ function RxRagdollUtils.runLocal(humanoid)
195
209
  return topMaid
196
210
  end
197
211
 
198
- function RxRagdollUtils.enforceHumanoidState(humanoid)
212
+ function RxRagdollUtils.enforceHumanoidState(humanoid: Humanoid)
199
213
  local maid = Maid.new()
200
214
  humanoid:ChangeState(Enum.HumanoidStateType.Physics)
201
215
 
@@ -203,9 +217,7 @@ function RxRagdollUtils.enforceHumanoidState(humanoid)
203
217
  -- changes to your humanoid's state.
204
218
 
205
219
  maid._keepAsPhysics = humanoid.StateChanged:Connect(function(_old, new)
206
- if new ~= Enum.HumanoidStateType.Physics
207
- and new ~= Enum.HumanoidStateType.Dead then
208
-
220
+ if new ~= Enum.HumanoidStateType.Physics and new ~= Enum.HumanoidStateType.Dead then
209
221
  humanoid:ChangeState(Enum.HumanoidStateType.Physics)
210
222
  end
211
223
  end)
@@ -221,5 +233,4 @@ function RxRagdollUtils.enforceHumanoidState(humanoid)
221
233
  return maid
222
234
  end
223
235
 
224
-
225
- return RxRagdollUtils
236
+ return RxRagdollUtils