@quenty/playerhumanoidbinder 9.0.0-canary.367.e9fdcbc.0 → 9.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 CHANGED
@@ -3,7 +3,117 @@
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
- # [9.0.0-canary.367.e9fdcbc.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.16.0...@quenty/playerhumanoidbinder@9.0.0-canary.367.e9fdcbc.0) (2023-06-05)
6
+ # [9.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.27.0...@quenty/playerhumanoidbinder@9.0.0) (2023-10-11)
7
+
8
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
9
+
10
+
11
+
12
+
13
+
14
+ # [8.27.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.26.0...@quenty/playerhumanoidbinder@8.27.0) (2023-09-21)
15
+
16
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
17
+
18
+
19
+
20
+
21
+
22
+ # [8.26.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.25.0...@quenty/playerhumanoidbinder@8.26.0) (2023-09-04)
23
+
24
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
25
+
26
+
27
+
28
+
29
+
30
+ # [8.25.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.24.0...@quenty/playerhumanoidbinder@8.25.0) (2023-08-23)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * Add :ObserveAutomaticTagging() ([cafbc1a](https://github.com/Quenty/NevermoreEngine/commit/cafbc1ad1420e9476206c63c8e280ad0bc8f6a28))
36
+
37
+
38
+
39
+
40
+
41
+ # [8.24.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.23.0...@quenty/playerhumanoidbinder@8.24.0) (2023-08-01)
42
+
43
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
44
+
45
+
46
+
47
+
48
+
49
+ # [8.23.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.22.0...@quenty/playerhumanoidbinder@8.23.0) (2023-07-28)
50
+
51
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
52
+
53
+
54
+
55
+
56
+
57
+ # [8.22.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.21.0...@quenty/playerhumanoidbinder@8.22.0) (2023-07-23)
58
+
59
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
60
+
61
+
62
+
63
+
64
+
65
+ # [8.21.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.20.0...@quenty/playerhumanoidbinder@8.21.0) (2023-07-15)
66
+
67
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
68
+
69
+
70
+
71
+
72
+
73
+ # [8.20.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.19.1...@quenty/playerhumanoidbinder@8.20.0) (2023-07-10)
74
+
75
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
76
+
77
+
78
+
79
+
80
+
81
+ ## [8.19.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.19.0...@quenty/playerhumanoidbinder@8.19.1) (2023-06-24)
82
+
83
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
84
+
85
+
86
+
87
+
88
+
89
+ # [8.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.18.1...@quenty/playerhumanoidbinder@8.19.0) (2023-06-24)
90
+
91
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
92
+
93
+
94
+
95
+
96
+
97
+ ## [8.18.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.18.0...@quenty/playerhumanoidbinder@8.18.1) (2023-06-23)
98
+
99
+ **Note:** Version bump only for package @quenty/playerhumanoidbinder
100
+
101
+
102
+
103
+
104
+
105
+ # [8.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.17.0...@quenty/playerhumanoidbinder@8.18.0) (2023-06-17)
106
+
107
+
108
+ ### Features
109
+
110
+ * Binders can be initialized by the ServiceBag directly instead of requireing a BinderProvider ([28ce17f](https://github.com/Quenty/NevermoreEngine/commit/28ce17fe254b7fdce115132244ca1a6e8693d24b))
111
+
112
+
113
+
114
+
115
+
116
+ # [8.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/playerhumanoidbinder@8.16.0...@quenty/playerhumanoidbinder@8.17.0) (2023-06-05)
7
117
 
8
118
  **Note:** Version bump only for package @quenty/playerhumanoidbinder
9
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/playerhumanoidbinder",
3
- "version": "9.0.0-canary.367.e9fdcbc.0",
3
+ "version": "9.0.0",
4
4
  "description": "Binder that will automatically bind to each player's humanoid",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,13 +25,14 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/binder": "9.0.0-canary.367.e9fdcbc.0",
29
- "@quenty/humanoidtracker": "8.0.0-canary.367.e9fdcbc.0",
30
- "@quenty/loader": "6.2.1",
31
- "@quenty/maid": "2.5.0"
28
+ "@quenty/binder": "^9.0.0",
29
+ "@quenty/humanoidtracker": "^8.0.0",
30
+ "@quenty/loader": "^7.0.0",
31
+ "@quenty/maid": "^2.6.0",
32
+ "@quenty/valueobject": "^8.0.0"
32
33
  },
33
34
  "publishConfig": {
34
35
  "access": "public"
35
36
  },
36
- "gitHead": "e9fdcbc6ea1d46e068bf42a08b833099e9005259"
37
+ "gitHead": "fdeae46099587019ec5fc15317dc673aed379400"
37
38
  }
@@ -9,6 +9,7 @@ local Players = game:GetService("Players")
9
9
 
10
10
  local Binder = require("Binder")
11
11
  local Maid = require("Maid")
12
+ local ValueObject = require("ValueObject")
12
13
 
13
14
  local PlayerCharacterBinder = setmetatable({}, Binder)
14
15
  PlayerCharacterBinder.ClassName = "PlayerCharacterBinder"
@@ -24,13 +25,24 @@ PlayerCharacterBinder.__index = PlayerCharacterBinder
24
25
  function PlayerCharacterBinder.new(tag, class, ...)
25
26
  local self = setmetatable(Binder.new(tag, class, ...), PlayerCharacterBinder)
26
27
 
27
- self._shouldTag = Instance.new("BoolValue")
28
- self._shouldTag.Value = true
29
- self._maid:GiveTask(self._shouldTag)
30
-
31
28
  return self
32
29
  end
33
30
 
31
+ --[=[
32
+ Inits the binder. See [Binder.Init].
33
+ Should be done via a [ServiceBag].
34
+
35
+ @param ... any
36
+ ]=]
37
+ function PlayerCharacterBinder:Init(...)
38
+ getmetatable(PlayerCharacterBinder).Init(self, ...)
39
+
40
+ if not self._shouldTag then
41
+ self._shouldTag = ValueObject.new(true, "boolean")
42
+ self._maid:GiveTask(self._shouldTag)
43
+ end
44
+ end
45
+
34
46
  --[=[
35
47
  Sets whether tagging should be enabled
36
48
  @param shouldTag boolean
@@ -42,6 +54,21 @@ function PlayerCharacterBinder:SetAutomaticTagging(shouldTag)
42
54
  self._shouldTag.Value = shouldTag
43
55
  end
44
56
 
57
+ --[=[
58
+ @return Observable<boolean>
59
+ ]=]
60
+ function PlayerCharacterBinder:ObserveAutomaticTagging()
61
+ return self._shouldTag:Observe()
62
+ end
63
+
64
+ --[=[
65
+ @param predicate function -- Optional predicate
66
+ @return Observable<Brio<boolean>>
67
+ ]=]
68
+ function PlayerCharacterBinder:ObserveAutomaticTaggingBrio(predicate)
69
+ return self._shouldTag:ObserveBrio(predicate)
70
+ end
71
+
45
72
  --[=[
46
73
  Starts the binder. See [Binder.Start].
47
74
  Should be done via a [ServiceBag].
@@ -10,6 +10,7 @@ local Players = game:GetService("Players")
10
10
  local Binder = require("Binder")
11
11
  local Maid = require("Maid")
12
12
  local HumanoidTracker = require("HumanoidTracker")
13
+ local ValueObject = require("ValueObject")
13
14
 
14
15
  local PlayerHumanoidBinder = setmetatable({}, Binder)
15
16
  PlayerHumanoidBinder.ClassName = "PlayerHumanoidBinder"
@@ -25,13 +26,24 @@ PlayerHumanoidBinder.__index = PlayerHumanoidBinder
25
26
  function PlayerHumanoidBinder.new(tag, class, ...)
26
27
  local self = setmetatable(Binder.new(tag, class, ...), PlayerHumanoidBinder)
27
28
 
28
- self._shouldTag = Instance.new("BoolValue")
29
- self._shouldTag.Value = true
30
- self._maid:GiveTask(self._shouldTag)
31
-
32
29
  return self
33
30
  end
34
31
 
32
+ --[=[
33
+ Inits the binder. See [Binder.Init].
34
+ Should be done via a [ServiceBag].
35
+
36
+ @param ... any
37
+ ]=]
38
+ function PlayerHumanoidBinder:Init(...)
39
+ getmetatable(PlayerHumanoidBinder).Init(self, ...)
40
+
41
+ if not self._shouldTag then
42
+ self._shouldTag = ValueObject.new(true, "boolean")
43
+ self._maid:GiveTask(self._shouldTag)
44
+ end
45
+ end
46
+
35
47
  --[=[
36
48
  Sets whether tagging should be enabled
37
49
  @param shouldTag boolean
@@ -43,6 +55,21 @@ function PlayerHumanoidBinder:SetAutomaticTagging(shouldTag)
43
55
  self._shouldTag.Value = shouldTag
44
56
  end
45
57
 
58
+ --[=[
59
+ @return Observable<boolean>
60
+ ]=]
61
+ function PlayerHumanoidBinder:ObserveAutomaticTagging()
62
+ return self._shouldTag:Observe()
63
+ end
64
+
65
+ --[=[
66
+ @param predicate function -- Optional predicate
67
+ @return Observable<Brio<boolean>>
68
+ ]=]
69
+ function PlayerHumanoidBinder:ObserveAutomaticTaggingBrio(predicate)
70
+ return self._shouldTag:ObserveBrio(predicate)
71
+ end
72
+
46
73
  --[=[
47
74
  Starts the binder. See [Binder.Start].
48
75
  Should be done via a [ServiceBag].