@quenty/adorneeutils 3.3.1 → 3.3.2

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,17 @@
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
+ ## [3.3.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@3.3.1...@quenty/adorneeutils@3.3.2) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.3.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/adorneeutils@3.3.0...@quenty/adorneeutils@3.3.1) (2025-03-21)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/adorneeutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/adorneeutils",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "AdorneeUtils - Generic adornee functions to make attaching to objects in Roblox easier.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
30
+ "gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
31
31
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Utilities involving an "Adornee" effectively, any Roblox instance. This is an extremely
3
4
  useful library to use as it lets you abstract applying effects to any Roblox instance
@@ -54,7 +55,7 @@ end
54
55
  @return CFrame? -- Center of the bounding box
55
56
  @return Vector3? -- Size of the bounding box
56
57
  ]=]
57
- function AdorneeUtils.getBoundingBox(adornee: Instance): (CFrame, Vector3)
58
+ function AdorneeUtils.getBoundingBox(adornee: Instance): (CFrame?, Vector3?)
58
59
  if adornee:IsA("Model") then
59
60
  return adornee:GetBoundingBox()
60
61
  elseif adornee:IsA("Attachment") then
@@ -97,15 +98,15 @@ function AdorneeUtils.getParts(adornee: Instance): { BasePart }
97
98
  table.insert(parts, adornee)
98
99
  end
99
100
 
100
- local searchParent
101
+ local searchParent: Instance?
101
102
  if adornee:IsA("Humanoid") then
102
103
  searchParent = adornee.Parent
103
104
  else
104
105
  searchParent = adornee
105
106
  end
106
107
 
107
- if searchParent then
108
- for _, part in pairs(searchParent:GetDescendants()) do
108
+ if searchParent ~= nil then
109
+ for _, part in searchParent:GetDescendants() do
109
110
  if part:IsA("BasePart") then
110
111
  table.insert(parts, part)
111
112
  end
@@ -183,7 +184,7 @@ function AdorneeUtils.getPartVelocity(adornee: Instance): Vector3?
183
184
  return nil
184
185
  end
185
186
 
186
- return part.Velocity
187
+ return part.AssemblyLinearVelocity
187
188
  end
188
189
 
189
190
  --[=[
@@ -197,10 +198,11 @@ function AdorneeUtils.getPart(adornee: Instance): BasePart?
197
198
  if adornee:IsA("BasePart") then
198
199
  return adornee
199
200
  elseif adornee:IsA("Model") then
200
- if adornee.PrimaryPart then
201
+ if adornee.PrimaryPart ~= nil then
201
202
  return adornee.PrimaryPart
202
203
  else
203
- return adornee:FindFirstChildWhichIsA("BasePart")
204
+ local basePart: BasePart? = adornee:FindFirstChildWhichIsA("BasePart")
205
+ return basePart
204
206
  end
205
207
  elseif adornee:IsA("Attachment") then
206
208
  return adornee:FindFirstAncestorWhichIsA("BasePart")
@@ -237,7 +239,8 @@ function AdorneeUtils.getRenderAdornee(adornee: Instance): Instance?
237
239
  elseif adornee:IsA("Humanoid") then
238
240
  return adornee.Parent
239
241
  elseif adornee:IsA("Accessory") or adornee:IsA("Clothing") then
240
- return adornee:FindFirstChildWhichIsA("BasePart")
242
+ local basePart = adornee:FindFirstChildWhichIsA("BasePart")
243
+ return basePart
241
244
  elseif adornee:IsA("Tool") then
242
245
  local handle = adornee:FindFirstChild("Handle")
243
246
  if handle and handle:IsA("BasePart") then