@quenty/avatareditorutils 7.3.0 → 7.4.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,23 @@
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.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/avatareditorutils@7.3.0...@quenty/avatareditorutils@7.4.0) (2024-05-09)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix .package-lock.json replicating in packages ([75d0efe](https://github.com/Quenty/NevermoreEngine/commit/75d0efeef239f221d93352af71a5b3e930ec23c5))
12
+
13
+
14
+ ### Features
15
+
16
+ * Add AvatarEditorUtils.tryGetAccessoryType(avatarAssetType) ([2316a2e](https://github.com/Quenty/NevermoreEngine/commit/2316a2eee55174b0f1ac82d20616b03572bffd63))
17
+ * better testing when prompting inventory access ([0efbdb1](https://github.com/Quenty/NevermoreEngine/commit/0efbdb116df0770dd418b8faddbdc6671bee3d9d))
18
+
19
+
20
+
21
+
22
+
6
23
  # [7.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/avatareditorutils@7.2.0...@quenty/avatareditorutils@7.3.0) (2024-04-27)
7
24
 
8
25
  **Note:** Version bump only for package @quenty/avatareditorutils
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "name": "avatareditorutils",
3
+ "globIgnorePaths": [ "**/.package-lock.json" ],
3
4
  "tree": {
4
5
  "$path": "src"
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/avatareditorutils",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "Provides utility functions to work with the Roblox AvatarEditorService",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,16 +25,16 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/brio": "^14.2.0",
29
- "@quenty/enumutils": "^3.1.0",
30
- "@quenty/loader": "^10.2.0",
31
- "@quenty/maid": "^3.1.0",
32
- "@quenty/promise": "^10.2.0",
33
- "@quenty/rx": "^13.2.0",
34
- "@quenty/symbol": "^3.0.0"
28
+ "@quenty/brio": "^14.3.0",
29
+ "@quenty/enumutils": "^3.2.0",
30
+ "@quenty/loader": "^10.3.0",
31
+ "@quenty/maid": "^3.2.0",
32
+ "@quenty/promise": "^10.3.0",
33
+ "@quenty/rx": "^13.3.0",
34
+ "@quenty/symbol": "^3.1.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "5c9eab1eac73f0d54953cca5017b7be968182f72"
39
+ "gitHead": "3fd5cdca3128bf34c8d9dfae1e92d62533b6e6f5"
40
40
  }
@@ -7,6 +7,7 @@
7
7
  local require = require(script.Parent.loader).load(script)
8
8
 
9
9
  local AvatarEditorService = game:GetService("AvatarEditorService")
10
+ local RunService = game:GetService("RunService")
10
11
 
11
12
  local EnumUtils = require("EnumUtils")
12
13
  local Maid = require("Maid")
@@ -99,6 +100,22 @@ function AvatarEditorUtils.promiseItemDetails(itemId: number, itemType: AvatarIt
99
100
  end)
100
101
  end
101
102
 
103
+ function AvatarEditorUtils.tryGetAccessoryType(avatarAssetType)
104
+ if not avatarAssetType then
105
+ return nil, "No avatarAssetType"
106
+ end
107
+
108
+ local accessoryType
109
+ local ok, err = pcall(function()
110
+ accessoryType = AvatarEditorService:GetAccessoryType(avatarAssetType)
111
+ end)
112
+ if not ok then
113
+ return nil, err or "Failed to GetAccessoryType from avatarAssetType"
114
+ end
115
+
116
+ return accessoryType
117
+ end
118
+
102
119
  --[=[
103
120
  Gets the item details for a list of items at once. More efficient than [AvatarEditorService.GetItemDetails]
104
121
  if you need to get all the item details of a list.
@@ -466,6 +483,10 @@ function AvatarEditorUtils.promptAllowInventoryReadAccess()
466
483
  promise:Reject(err or "Failed to PromptAllowInventoryReadAccess")
467
484
  end
468
485
 
486
+ if not RunService:IsRunning() then
487
+ promise:Resolve()
488
+ end
489
+
469
490
  return promise
470
491
  end
471
492