@quenty/ragdoll 6.2.1-canary.256.edbbcfc.0 → 7.0.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 +12 -1
- package/LICENSE.md +1 -1
- package/package.json +17 -17
- package/src/Server/Classes/RagdollHumanoidOnFall.lua +1 -0
- package/src/Server/Classes/Ragdollable.lua +1 -0
- package/src/Server/Classes/UnragdollAutomatically.lua +21 -6
- package/src/Server/Classes/UnragdollAutomaticallyConstants.lua +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,18 @@
|
|
|
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
|
-
|
|
6
|
+
# [7.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@6.3.0...@quenty/ragdoll@7.0.0) (2022-05-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* More control over automatic unragdoll behavior ([8c71438](https://github.com/Quenty/NevermoreEngine/commit/8c71438ee9854d800c7fec5c5e844f841aeae378))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [6.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@6.2.0...@quenty/ragdoll@6.3.0) (2022-03-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/ragdoll
|
|
9
20
|
|
package/LICENSE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/ragdoll",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Quenty's Ragdoll system for Roblox - Floppy fun ragdolls",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/attributeutils": "
|
|
29
|
-
"@quenty/baseobject": "
|
|
30
|
-
"@quenty/binder": "
|
|
31
|
-
"@quenty/camera": "
|
|
32
|
-
"@quenty/characterutils": "
|
|
33
|
-
"@quenty/hapticfeedbackutils": "3.
|
|
34
|
-
"@quenty/humanoidanimatorutils": "2.
|
|
35
|
-
"@quenty/loader": "
|
|
36
|
-
"@quenty/maid": "2.
|
|
37
|
-
"@quenty/playerhumanoidbinder": "
|
|
38
|
-
"@quenty/promise": "
|
|
39
|
-
"@quenty/remoting": "
|
|
40
|
-
"@quenty/rx": "
|
|
41
|
-
"@quenty/table": "
|
|
42
|
-
"@quenty/valuebaseutils": "
|
|
28
|
+
"@quenty/attributeutils": "^6.0.0",
|
|
29
|
+
"@quenty/baseobject": "^5.0.0",
|
|
30
|
+
"@quenty/binder": "^6.0.0",
|
|
31
|
+
"@quenty/camera": "^7.0.0",
|
|
32
|
+
"@quenty/characterutils": "^5.0.0",
|
|
33
|
+
"@quenty/hapticfeedbackutils": "^3.1.0",
|
|
34
|
+
"@quenty/humanoidanimatorutils": "^2.1.0",
|
|
35
|
+
"@quenty/loader": "^5.0.0",
|
|
36
|
+
"@quenty/maid": "^2.3.0",
|
|
37
|
+
"@quenty/playerhumanoidbinder": "^6.0.0",
|
|
38
|
+
"@quenty/promise": "^5.0.0",
|
|
39
|
+
"@quenty/remoting": "^5.0.0",
|
|
40
|
+
"@quenty/rx": "^5.0.0",
|
|
41
|
+
"@quenty/table": "^3.0.0",
|
|
42
|
+
"@quenty/valuebaseutils": "^5.0.0"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9f7eaea7543c33c89d2e32c38491b13f9271f4f7"
|
|
48
48
|
}
|
|
@@ -35,6 +35,7 @@ function RagdollHumanoidOnFall.new(humanoid, serviceBag)
|
|
|
35
35
|
|
|
36
36
|
self._remoteEvent = Instance.new("RemoteEvent")
|
|
37
37
|
self._remoteEvent.Name = RagdollHumanoidOnFallConstants.REMOTE_EVENT_NAME
|
|
38
|
+
self._remoteEvent.Archivable = false
|
|
38
39
|
self._remoteEvent.Parent = self._obj
|
|
39
40
|
self._maid:GiveTask(self._remoteEvent)
|
|
40
41
|
|
|
@@ -40,6 +40,7 @@ function Ragdollable.new(humanoid, serviceBag)
|
|
|
40
40
|
|
|
41
41
|
self._remoteEvent = Instance.new("RemoteEvent")
|
|
42
42
|
self._remoteEvent.Name = RagdollableConstants.REMOTE_EVENT_NAME
|
|
43
|
+
self._remoteEvent.Archivable = false
|
|
43
44
|
self._remoteEvent.Parent = self._obj
|
|
44
45
|
self._maid:GiveTask(self._remoteEvent)
|
|
45
46
|
|
|
@@ -11,6 +11,9 @@ local RunService = game:GetService("RunService")
|
|
|
11
11
|
local BaseObject = require("BaseObject")
|
|
12
12
|
local RagdollBindersServer = require("RagdollBindersServer")
|
|
13
13
|
local CharacterUtils = require("CharacterUtils")
|
|
14
|
+
local AttributeValue = require("AttributeValue")
|
|
15
|
+
local Maid = require("Maid")
|
|
16
|
+
local UnragdollAutomaticallyConstants = require("UnragdollAutomaticallyConstants")
|
|
14
17
|
|
|
15
18
|
local UnragdollAutomatically = setmetatable({}, BaseObject)
|
|
16
19
|
UnragdollAutomatically.ClassName = "UnragdollAutomatically"
|
|
@@ -28,10 +31,22 @@ function UnragdollAutomatically.new(humanoid, serviceBag)
|
|
|
28
31
|
self._ragdollBindersServer = serviceBag:GetService(RagdollBindersServer)
|
|
29
32
|
self._player = CharacterUtils.getPlayerFromCharacter(self._obj)
|
|
30
33
|
|
|
31
|
-
self.
|
|
32
|
-
|
|
34
|
+
self._disabledUnragdoll = AttributeValue.new(self._obj, UnragdollAutomaticallyConstants.DISABLE_UNRAGDOLL_AUTOMATICALLY_ATTRIBUTE, false)
|
|
35
|
+
self._maid:GiveTask(self._disabledUnragdoll:Observe():Subscribe(function(isDisabled)
|
|
36
|
+
if isDisabled then
|
|
37
|
+
self._maid._updater = nil
|
|
38
|
+
return
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
local maid = Maid.new()
|
|
42
|
+
|
|
43
|
+
maid:GiveTask(self._ragdollBindersServer.Ragdoll:ObserveInstance(self._obj, function()
|
|
44
|
+
self:_handleRagdollChanged(maid)
|
|
45
|
+
end))
|
|
46
|
+
self:_handleRagdollChanged(maid)
|
|
47
|
+
|
|
48
|
+
self._maid._updater = maid
|
|
33
49
|
end))
|
|
34
|
-
self:_handleRagdollChanged()
|
|
35
50
|
|
|
36
51
|
return self
|
|
37
52
|
end
|
|
@@ -44,11 +59,11 @@ function UnragdollAutomatically:_getTime()
|
|
|
44
59
|
end
|
|
45
60
|
end
|
|
46
61
|
|
|
47
|
-
function UnragdollAutomatically:_handleRagdollChanged()
|
|
62
|
+
function UnragdollAutomatically:_handleRagdollChanged(maid)
|
|
48
63
|
if self._ragdollBindersServer.Ragdoll:Get(self._obj) then
|
|
49
64
|
self._ragdollTime = tick()
|
|
50
65
|
|
|
51
|
-
|
|
66
|
+
maid._conn = RunService.Stepped:Connect(function()
|
|
52
67
|
if tick() - self._ragdollTime >= self:_getTime() then
|
|
53
68
|
if self._obj.Health > 0 then
|
|
54
69
|
self._ragdollBindersServer.Ragdoll:Unbind(self._obj)
|
|
@@ -56,7 +71,7 @@ function UnragdollAutomatically:_handleRagdollChanged()
|
|
|
56
71
|
end
|
|
57
72
|
end)
|
|
58
73
|
else
|
|
59
|
-
|
|
74
|
+
maid._conn = nil
|
|
60
75
|
end
|
|
61
76
|
end
|
|
62
77
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
--[=[
|
|
2
|
+
@class UnragdollAutomaticallyConstants
|
|
3
|
+
]=]
|
|
4
|
+
|
|
5
|
+
local require = require(script.Parent.loader).load(script)
|
|
6
|
+
|
|
7
|
+
local Table = require("Table")
|
|
8
|
+
|
|
9
|
+
return Table.readonly({
|
|
10
|
+
DISABLE_UNRAGDOLL_AUTOMATICALLY_ATTRIBUTE = "DisableUnragdollAutomatically";
|
|
11
|
+
})
|