@quenty/attributeutils 7.0.1 → 7.2.0-canary.4096cd9.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 +24 -0
- package/package.json +7 -7
- package/src/Shared/AttributeUtils.lua +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.2.0-canary.4096cd9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@7.1.0...@quenty/attributeutils@7.2.0-canary.4096cd9.0) (2022-09-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add IntValue support as a valid AttributeUtil ([1cec7d9](https://github.com/Quenty/NevermoreEngine/commit/1cec7d9cce47811e1e4afe6b49ae94a050fa6a1f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Add AttributeUtils.removeAllAttributes() ([4096cd9](https://github.com/Quenty/NevermoreEngine/commit/4096cd94d2c38d382b7aafe8cb2fcb8bb340d051))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [7.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@7.0.1...@quenty/attributeutils@7.1.0) (2022-08-22)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @quenty/attributeutils
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [7.0.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/attributeutils@7.0.0...@quenty/attributeutils@7.0.1) (2022-08-16)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @quenty/attributeutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/attributeutils",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.2.0-canary.4096cd9.0",
|
|
4
4
|
"description": "Provides utility functions to work with attributes in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/brio": "
|
|
29
|
-
"@quenty/loader": "
|
|
30
|
-
"@quenty/maid": "
|
|
31
|
-
"@quenty/rx": "
|
|
32
|
-
"@quenty/symbol": "
|
|
28
|
+
"@quenty/brio": "7.2.0-canary.4096cd9.0",
|
|
29
|
+
"@quenty/loader": "5.0.1",
|
|
30
|
+
"@quenty/maid": "2.4.0",
|
|
31
|
+
"@quenty/rx": "6.2.0-canary.4096cd9.0",
|
|
32
|
+
"@quenty/symbol": "2.1.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "4096cd94d2c38d382b7aafe8cb2fcb8bb340d051"
|
|
38
38
|
}
|
|
@@ -24,6 +24,7 @@ local VALID_ATTRIBUTE_TYPES = {
|
|
|
24
24
|
["Vector3"] = true;
|
|
25
25
|
["NumberSequence"] = true;
|
|
26
26
|
["ColorSequence"] = true;
|
|
27
|
+
["IntValue"] = true;
|
|
27
28
|
["NumberRange"] = true;
|
|
28
29
|
["Rect"] = true;
|
|
29
30
|
}
|
|
@@ -145,4 +146,17 @@ function AttributeUtils.getAttribute(instance, attributeName, default)
|
|
|
145
146
|
return value
|
|
146
147
|
end
|
|
147
148
|
|
|
149
|
+
--[=[
|
|
150
|
+
Removes all attributes from an instance.
|
|
151
|
+
|
|
152
|
+
@param instance Instance
|
|
153
|
+
]=]
|
|
154
|
+
function AttributeUtils.removeAllAttributes(instance: Instance)
|
|
155
|
+
assert(typeof(instance) == "Instance", "Bad instance")
|
|
156
|
+
|
|
157
|
+
for key, _ in pairs(instance:GetAttributes()) do
|
|
158
|
+
instance:SetAttribute(key, nil)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
148
162
|
return AttributeUtils
|