@quenty/ragdoll 15.74.0 → 15.75.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,16 @@
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.75.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.74.1...@quenty/ragdoll@15.75.0) (2026-11-24)
7
+
8
+ **Note:** Version bump only for package @quenty/ragdoll
9
+
10
+ ## [15.74.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.74.0...@quenty/ragdoll@15.74.1) (2026-11-18)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **ragdoll:** Fire Unragdolled when a humanoid is unragdolled ([a834de6](https://github.com/Quenty/NevermoreEngine/commit/a834de60d7cb2a85d134ae8eb5bfbdd3f89b00c3))
15
+
6
16
  # [15.74.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.73.1...@quenty/ragdoll@15.74.0) (2026-10-24)
7
17
 
8
18
  **Note:** Version bump only for package @quenty/ragdoll
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/ragdoll",
3
- "version": "15.74.0",
3
+ "version": "15.75.0",
4
4
  "description": "Quenty's Ragdoll system for Roblox - Floppy fun ragdolls",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,47 +28,48 @@
28
28
  "Quenty"
29
29
  ],
30
30
  "dependencies": {
31
- "@quenty/adorneedata": "7.44.1",
32
- "@quenty/attributeutils": "14.39.1",
33
- "@quenty/baseobject": "10.16.3",
34
- "@quenty/binder": "14.48.1",
35
- "@quenty/brio": "14.38.1",
36
- "@quenty/camera": "14.58.1",
31
+ "@quenty/adorneedata": "7.44.2",
32
+ "@quenty/attributeutils": "14.39.2",
33
+ "@quenty/baseobject": "10.16.4",
34
+ "@quenty/binder": "14.48.2",
35
+ "@quenty/brio": "14.38.2",
36
+ "@quenty/camera": "14.59.0",
37
37
  "@quenty/cancellabledelay": "3.6.2",
38
- "@quenty/characterutils": "12.46.1",
39
- "@quenty/cmdrservice": "13.65.0",
40
- "@quenty/draw": "7.17.3",
38
+ "@quenty/characterutils": "12.46.2",
39
+ "@quenty/cmdrservice": "13.66.0",
40
+ "@quenty/draw": "7.17.4",
41
41
  "@quenty/enumutils": "3.4.6",
42
42
  "@quenty/hapticfeedbackutils": "3.3.3",
43
- "@quenty/instanceutils": "13.38.1",
44
- "@quenty/jestutils": "1.1.3",
43
+ "@quenty/instanceutils": "13.38.2",
44
+ "@quenty/jestutils": "1.1.4",
45
45
  "@quenty/loader": "10.11.3",
46
- "@quenty/maid": "3.12.3",
47
- "@quenty/motor6d": "7.58.1",
48
- "@quenty/nevermore-test-runner": "1.6.3",
49
- "@quenty/physicsutils": "8.36.1",
50
- "@quenty/playerhumanoidbinder": "14.53.1",
51
- "@quenty/playermock": "1.11.1",
52
- "@quenty/playerutils": "8.46.1",
53
- "@quenty/promise": "10.25.1",
54
- "@quenty/qframe": "10.37.1",
55
- "@quenty/r15utils": "13.39.1",
56
- "@quenty/remoting": "12.46.1",
57
- "@quenty/rigbuilderutils": "10.49.1",
58
- "@quenty/rx": "13.35.1",
59
- "@quenty/rxbinderutils": "14.48.1",
60
- "@quenty/rxsignal": "7.35.1",
61
- "@quenty/servicebag": "11.21.3",
62
- "@quenty/spring": "10.12.3",
63
- "@quenty/steputils": "3.9.3",
46
+ "@quenty/maid": "3.12.4",
47
+ "@quenty/motor6d": "7.59.0",
48
+ "@quenty/nevermore-test-runner": "1.6.4",
49
+ "@quenty/physicsutils": "8.36.2",
50
+ "@quenty/playerhumanoidbinder": "14.53.2",
51
+ "@quenty/playermock": "1.11.2",
52
+ "@quenty/playerutils": "8.46.2",
53
+ "@quenty/promise": "10.25.2",
54
+ "@quenty/qframe": "10.38.0",
55
+ "@quenty/r15utils": "13.39.2",
56
+ "@quenty/remoting": "12.46.2",
57
+ "@quenty/rigbuilderutils": "10.50.0",
58
+ "@quenty/rx": "13.35.2",
59
+ "@quenty/rxbinderutils": "14.48.2",
60
+ "@quenty/rxsignal": "7.35.2",
61
+ "@quenty/servicebag": "11.21.4",
62
+ "@quenty/signal": "7.13.5",
63
+ "@quenty/spring": "10.13.0",
64
+ "@quenty/steputils": "3.9.4",
64
65
  "@quenty/table": "3.9.2",
65
- "@quenty/tie": "10.52.1",
66
- "@quenty/valuebaseutils": "13.38.1",
67
- "@quenty/valueobject": "13.39.1",
68
- "@quentystudios/jest-lua": "3.10.0-quenty.2"
66
+ "@quenty/tie": "10.52.2",
67
+ "@quenty/valuebaseutils": "13.38.2",
68
+ "@quenty/valueobject": "13.39.2",
69
+ "@quentystudios/jest-lua": "3.10.0-quenty.3"
69
70
  },
70
71
  "publishConfig": {
71
72
  "access": "public"
72
73
  },
73
- "gitHead": "eefcb7e24fe7642e06e4ceed920aceecdad97cd1"
74
+ "gitHead": "191a328ce40545ac6fb0282d33dde5b0576494e6"
74
75
  }
@@ -47,7 +47,7 @@ function RagdollableClient.new(humanoid: Humanoid, serviceBag: ServiceBag.Servic
47
47
  self:_onRagdollChanged(ragdoll)
48
48
  end))
49
49
 
50
- self._maid:GiveTask((RagdollableInterface :: any).Client:Implement(self._obj :: Instance, self))
50
+ self._maid:GiveTask(RagdollableInterface.Client:Implement(self._obj :: Instance, self))
51
51
 
52
52
  return self
53
53
  end
@@ -16,6 +16,7 @@ local Jest = require("Jest")
16
16
  local JestUtils = require("JestUtils")
17
17
  local Maid = require("Maid")
18
18
  local PlayerMock = require("PlayerMock")
19
+ local PromiseTestUtils = require("PromiseTestUtils")
19
20
  local RagdollClient = require("RagdollClient")
20
21
  local RagdollServiceClient = require("RagdollServiceClient")
21
22
  local RagdollTestUtils = require("RagdollTestUtils")
@@ -98,17 +99,12 @@ describe("RagdollServiceClient with a mocked local player", function()
98
99
  local ragdollBinder = state.serviceBag:GetService(RagdollClient)
99
100
 
100
101
  ragdollableBinder:Bind(humanoid)
101
- local ok = ragdollableBinder:Promise(humanoid):Yield()
102
- assert(ok, "RagdollableClient never bound")
102
+ PromiseTestUtils.awaitFulfilled(ragdollableBinder:Promise(humanoid))
103
103
 
104
104
  ragdollBinder:Bind(humanoid)
105
- expect(RagdollTestUtils.waitFor(function()
106
- return RagdollTestUtils.areMotorsEnabled(character, false)
107
- end)).toBe(true)
105
+ expect(RagdollTestUtils.areMotorsEnabled(character, false)).toBe(true)
108
106
 
109
107
  ragdollBinder:Unbind(humanoid)
110
- expect(RagdollTestUtils.waitFor(function()
111
- return RagdollTestUtils.areMotorsEnabled(character, true)
112
- end)).toBe(true)
108
+ expect(RagdollTestUtils.areMotorsEnabled(character, true)).toBe(true)
113
109
  end)
114
110
  end)
@@ -82,7 +82,7 @@ function Ragdollable.new(humanoid: Humanoid, serviceBag: ServiceBag.ServiceBag):
82
82
  end))
83
83
  self:_onRagdollChanged()
84
84
 
85
- self._maid:GiveTask((RagdollableInterface :: any).Server:Implement(self._obj, self))
85
+ self._maid:GiveTask(RagdollableInterface.Server:Implement(self._obj :: Instance, self))
86
86
 
87
87
  return self
88
88
  end
@@ -20,6 +20,7 @@ local Maid = require("Maid")
20
20
  local PlayerMock = require("PlayerMock")
21
21
  local PlayerMockService = require("PlayerMockService")
22
22
  local Promise = require("Promise")
23
+ local PromiseTestUtils = require("PromiseTestUtils")
23
24
  local Ragdoll = require("Ragdoll")
24
25
  local RagdollCmdrService = require("RagdollCmdrService")
25
26
  local RagdollService = require("RagdollService")
@@ -91,8 +92,7 @@ local function setup()
91
92
 
92
93
  -- Ragdolling only reaches the motors once Ragdollable has rigged the character, which mock
93
94
  -- discovery does on its own a moment after the character loads.
94
- local ok = ragdollableBinder:Promise(humanoid):Yield()
95
- assert(ok, "Ragdollable never bound")
95
+ PromiseTestUtils.awaitFulfilled(ragdollableBinder:Promise(humanoid))
96
96
 
97
97
  return {
98
98
  mock = mock,
@@ -126,16 +126,12 @@ describe("RagdollCmdrService", function()
126
126
  local output = controller.run("ragdoll", { player.mock })
127
127
  expect(string.find(output, "Ragdolled", 1, true) ~= nil).toEqual(true)
128
128
  expect(controller.ragdollBinder:Get(player.humanoid)).toBeDefined()
129
- expect(RagdollTestUtils.waitFor(function()
130
- return RagdollTestUtils.areMotorsEnabled(player.character, false)
131
- end)).toBe(true)
129
+ expect(RagdollTestUtils.areMotorsEnabled(player.character, false)).toBe(true)
132
130
 
133
131
  output = controller.run("unragdoll", { player.mock })
134
132
  expect(string.find(output, "Unragdolled", 1, true) ~= nil).toEqual(true)
135
133
  expect(controller.ragdollBinder:Get(player.humanoid)).toBeNil()
136
- expect(RagdollTestUtils.waitFor(function()
137
- return RagdollTestUtils.areMotorsEnabled(player.character, true)
138
- end)).toBe(true)
134
+ expect(RagdollTestUtils.areMotorsEnabled(player.character, true)).toBe(true)
139
135
 
140
136
  controller:Destroy()
141
137
  end)
@@ -17,6 +17,7 @@ local JestUtils = require("JestUtils")
17
17
  local Maid = require("Maid")
18
18
  local PlayerMock = require("PlayerMock")
19
19
  local PlayerMockService = require("PlayerMockService")
20
+ local PromiseTestUtils = require("PromiseTestUtils")
20
21
  local Ragdoll = require("Ragdoll")
21
22
  local RagdollHumanoidOnFall = require("RagdollHumanoidOnFall")
22
23
  local RagdollHumanoidOnFallConstants = require("RagdollHumanoidOnFallConstants")
@@ -94,12 +95,9 @@ describe("RagdollService with a mock player R6 character", function()
94
95
  local state = setup()
95
96
 
96
97
  local ragdollableBinder = state.serviceBag:GetService(Ragdollable)
97
- local ok = ragdollableBinder:Promise(state.humanoid):Yield()
98
- assert(ok, "Ragdollable never bound")
98
+ PromiseTestUtils.awaitFulfilled(ragdollableBinder:Promise(state.humanoid))
99
99
 
100
- expect(RagdollTestUtils.waitFor(function()
101
- return RagdollTestUtils.countBallSockets(state.character) == 5
102
- end)).toBe(true)
100
+ expect(RagdollTestUtils.countBallSockets(state.character)).toEqual(5)
103
101
 
104
102
  local torso = assert(state.character:FindFirstChild("Torso"), "No torso")
105
103
  expect(torso:FindFirstChild("NeckAttachment")).toBeDefined()
@@ -112,22 +110,17 @@ describe("RagdollService with a mock player R6 character", function()
112
110
  local state = setup()
113
111
 
114
112
  local ragdollableBinder = state.serviceBag:GetService(Ragdollable)
115
- local ok = ragdollableBinder:Promise(state.humanoid):Yield()
116
- assert(ok, "Ragdollable never bound")
113
+ PromiseTestUtils.awaitFulfilled(ragdollableBinder:Promise(state.humanoid))
117
114
 
118
115
  local ragdollBinder = state.serviceBag:GetService(Ragdoll)
119
116
  expect(RagdollTestUtils.areMotorsEnabled(state.character, true)).toBe(true)
120
117
 
121
118
  ragdollBinder:Bind(state.humanoid)
122
- expect(RagdollTestUtils.waitFor(function()
123
- return RagdollTestUtils.areMotorsEnabled(state.character, false)
124
- end)).toBe(true)
119
+ expect(RagdollTestUtils.areMotorsEnabled(state.character, false)).toBe(true)
125
120
  expect(ragdollBinder:Get(state.humanoid)).toBeDefined()
126
121
 
127
122
  ragdollBinder:Unbind(state.humanoid)
128
- expect(RagdollTestUtils.waitFor(function()
129
- return RagdollTestUtils.areMotorsEnabled(state.character, true)
130
- end)).toBe(true)
123
+ expect(RagdollTestUtils.areMotorsEnabled(state.character, true)).toBe(true)
131
124
  expect(ragdollBinder:Get(state.humanoid)).toBeNil()
132
125
 
133
126
  state:Destroy()
@@ -137,20 +130,15 @@ describe("RagdollService with a mock player R6 character", function()
137
130
  local state = setup()
138
131
 
139
132
  local ragdollableBinder = state.serviceBag:GetService(Ragdollable)
140
- local ok = ragdollableBinder:Promise(state.humanoid):Yield()
141
- assert(ok, "Ragdollable never bound")
133
+ PromiseTestUtils.awaitFulfilled(ragdollableBinder:Promise(state.humanoid))
142
134
 
143
135
  state.serviceBag:GetService(Ragdoll):Bind(state.humanoid)
144
- expect(RagdollTestUtils.waitFor(function()
145
- return RagdollTestUtils.areMotorsEnabled(state.character, false)
146
- end)).toBe(true)
136
+ expect(RagdollTestUtils.areMotorsEnabled(state.character, false)).toBe(true)
147
137
 
148
138
  state.destroyBag()
149
139
 
150
140
  -- The bag's PlayerMockService owns the mock, so teardown despawns the character with it.
151
- expect(RagdollTestUtils.waitFor(function()
152
- return state.character.Parent == nil
153
- end)).toBe(true)
141
+ expect(state.character.Parent).toBeNil()
154
142
 
155
143
  state:Destroy()
156
144
  end)
@@ -163,8 +151,7 @@ describe("RagdollService with a mock player R6 character", function()
163
151
 
164
152
  state.ragdollService:SetRagdollOnFall(true)
165
153
 
166
- local ok = onFallBinder:Promise(state.humanoid):Yield()
167
- assert(ok, "RagdollHumanoidOnFall never bound")
154
+ PromiseTestUtils.awaitFulfilled(onFallBinder:Promise(state.humanoid))
168
155
  expect(state.humanoid:FindFirstChild(RagdollHumanoidOnFallConstants.REMOTE_EVENT_NAME)).toBeDefined()
169
156
 
170
157
  state.ragdollService:SetRagdollOnFall(false)
@@ -40,7 +40,7 @@ function RagdollableBase.new(humanoid: Humanoid): RagdollableBase
40
40
  return (self:ObserveIsRagdolled() :: any):Pipe({
41
41
  Rx.skip(1),
42
42
  Rx.where(function(value): any
43
- return value == true
43
+ return value == false
44
44
  end),
45
45
  })
46
46
  end) :: any
@@ -0,0 +1,70 @@
1
+ --!strict
2
+ --[[
3
+ @class RagdollableBase.spec.lua
4
+ ]]
5
+
6
+ local require = require(script.Parent.loader).load(script)
7
+
8
+ local Jest = require("Jest")
9
+ local JestUtils = require("JestUtils")
10
+ local Maid = require("Maid")
11
+ local RagdollableBase = require("RagdollableBase")
12
+ local SignalTestUtils = require("SignalTestUtils")
13
+ local ValueObject = require("ValueObject")
14
+
15
+ local describe = Jest.Globals.describe
16
+ local expect = Jest.Globals.expect
17
+ local it = Jest.Globals.it
18
+
19
+ local function setup()
20
+ local maid = Maid.new()
21
+
22
+ local isRagdolled = maid:Add(ValueObject.new(false, "boolean"))
23
+
24
+ local humanoid = maid:Add(Instance.new("Humanoid"))
25
+ local ragdollable: any = maid:Add(RagdollableBase.new(humanoid))
26
+ ragdollable.ObserveIsRagdolled = function()
27
+ return isRagdolled:Observe()
28
+ end
29
+
30
+ local controller = {
31
+ isRagdolled = isRagdolled,
32
+ ragdolledCount = SignalTestUtils.countFires(maid, ragdollable.Ragdolled),
33
+ unragdolledCount = SignalTestUtils.countFires(maid, ragdollable.Unragdolled),
34
+ Destroy = function(_self)
35
+ maid:DoCleaning()
36
+ end,
37
+ }
38
+
39
+ maid:GiveTask(JestUtils.afterThis(controller))
40
+
41
+ return controller
42
+ end
43
+
44
+ describe("RagdollableBase", function()
45
+ it("fires neither signal for the initial state", function()
46
+ local controller = setup()
47
+
48
+ expect(controller.ragdolledCount()).toEqual(0)
49
+ expect(controller.unragdolledCount()).toEqual(0)
50
+ end)
51
+
52
+ it("fires only Ragdolled on ragdoll", function()
53
+ local controller = setup()
54
+
55
+ controller.isRagdolled.Value = true
56
+
57
+ expect(controller.ragdolledCount()).toEqual(1)
58
+ expect(controller.unragdolledCount()).toEqual(0)
59
+ end)
60
+
61
+ it("fires Unragdolled on unragdoll", function()
62
+ local controller = setup()
63
+
64
+ controller.isRagdolled.Value = true
65
+ controller.isRagdolled.Value = false
66
+
67
+ expect(controller.ragdolledCount()).toEqual(1)
68
+ expect(controller.unragdolledCount()).toEqual(1)
69
+ end)
70
+ end)
@@ -2,9 +2,7 @@
2
2
  --[=[
3
3
  Shared helpers for the ragdoll specs. Rigging is asserted against the local R6 rig from
4
4
  [RigBuilderUtils.createR6BaseRig] -- the R15 builders need InsertService, which headless test
5
- places cannot reach. Suppression/restore assertions poll: motor suppression settles a couple of
6
- task resumptions after the Ragdoll bind (velocity-recording promise, then the rigging
7
- subscriptions).
5
+ places cannot reach.
8
6
 
9
7
  @class RagdollTestUtils
10
8
  ]=]
@@ -26,25 +24,6 @@ RagdollTestUtils.R6_RAGDOLL_MOTOR_NAMES = {
26
24
  "Right Hip",
27
25
  }
28
26
 
29
- --[=[
30
- Polls until the condition passes or the timeout elapses. Returns the final condition result so
31
- specs can `expect(...).toBe(true)` on it.
32
-
33
- @param condition () -> boolean
34
- @param timeout number?
35
- @return boolean
36
- ]=]
37
- function RagdollTestUtils.waitFor(condition: () -> boolean, timeout: number?): boolean
38
- local deadline = os.clock() + (timeout or 5)
39
- while os.clock() < deadline do
40
- if condition() then
41
- return true
42
- end
43
- task.wait(0.05)
44
- end
45
- return condition()
46
- end
47
-
48
27
  --[=[
49
28
  Returns whether every R6 ragdoll motor in the character matches the given Enabled state.
50
29