@quenty/avatareditorutils 7.21.0-canary.559.b31717d.0 → 7.21.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,7 @@
|
|
|
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.21.0
|
|
6
|
+
# [7.21.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/avatareditorutils@7.20.3...@quenty/avatareditorutils@7.21.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/avatareditorutils",
|
|
3
|
-
"version": "7.21.0
|
|
3
|
+
"version": "7.21.0",
|
|
4
4
|
"description": "Provides utility functions to work with the Roblox AvatarEditorService",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/aggregator": "1.5.0
|
|
29
|
-
"@quenty/brio": "14.18.0
|
|
30
|
-
"@quenty/enumutils": "3.4.2",
|
|
31
|
-
"@quenty/loader": "10.
|
|
32
|
-
"@quenty/maid": "3.
|
|
33
|
-
"@quenty/memoize": "1.7.0
|
|
34
|
-
"@quenty/observablecollection": "12.21.0
|
|
35
|
-
"@quenty/pagesutils": "5.12.0
|
|
36
|
-
"@quenty/promise": "10.11.0
|
|
37
|
-
"@quenty/rx": "13.18.0
|
|
38
|
-
"@quenty/servicebag": "11.12.0
|
|
39
|
-
"@quenty/symbol": "3.
|
|
40
|
-
"@quenty/valueobject": "13.18.0
|
|
28
|
+
"@quenty/aggregator": "^1.5.0",
|
|
29
|
+
"@quenty/brio": "^14.18.0",
|
|
30
|
+
"@quenty/enumutils": "^3.4.2",
|
|
31
|
+
"@quenty/loader": "^10.9.0",
|
|
32
|
+
"@quenty/maid": "^3.5.0",
|
|
33
|
+
"@quenty/memoize": "^1.7.0",
|
|
34
|
+
"@quenty/observablecollection": "^12.21.0",
|
|
35
|
+
"@quenty/pagesutils": "^5.12.0",
|
|
36
|
+
"@quenty/promise": "^10.11.0",
|
|
37
|
+
"@quenty/rx": "^13.18.0",
|
|
38
|
+
"@quenty/servicebag": "^11.12.0",
|
|
39
|
+
"@quenty/symbol": "^3.5.0",
|
|
40
|
+
"@quenty/valueobject": "^13.18.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
|
|
46
46
|
}
|
|
@@ -84,7 +84,10 @@ end
|
|
|
84
84
|
@param assetId number
|
|
85
85
|
@return Observable<AssetData>
|
|
86
86
|
]=]
|
|
87
|
-
function AvatarEditorInventory.ObserveAssetIdInInventory(
|
|
87
|
+
function AvatarEditorInventory.ObserveAssetIdInInventory(
|
|
88
|
+
self: AvatarEditorInventory,
|
|
89
|
+
assetId: number
|
|
90
|
+
): Observable.Observable<AssetData>
|
|
88
91
|
assert(type(assetId) == "number", "Bad assetId")
|
|
89
92
|
|
|
90
93
|
return self._assetIdToAsset:ObserveAtKey(assetId):Pipe({
|
|
@@ -94,4 +97,4 @@ function AvatarEditorInventory.ObserveAssetIdInInventory(self: AvatarEditorInven
|
|
|
94
97
|
}) :: any
|
|
95
98
|
end
|
|
96
99
|
|
|
97
|
-
return AvatarEditorInventory
|
|
100
|
+
return AvatarEditorInventory
|
|
@@ -11,10 +11,10 @@ local AvatarEditorUtils = require("AvatarEditorUtils")
|
|
|
11
11
|
local EnumUtils = require("EnumUtils")
|
|
12
12
|
local Maid = require("Maid")
|
|
13
13
|
local MemorizeUtils = require("MemorizeUtils")
|
|
14
|
-
local Promise = require("Promise")
|
|
15
|
-
local ValueObject = require("ValueObject")
|
|
16
14
|
local PagesProxy = require("PagesProxy")
|
|
15
|
+
local Promise = require("Promise")
|
|
17
16
|
local ServiceBag = require("ServiceBag")
|
|
17
|
+
local ValueObject = require("ValueObject")
|
|
18
18
|
|
|
19
19
|
local AvatarEditorInventoryServiceClient = {}
|
|
20
20
|
AvatarEditorInventoryServiceClient.ServiceName = "AvatarEditorInventoryServiceClient"
|
|
@@ -34,11 +34,10 @@ function AvatarEditorInventoryServiceClient:Init(serviceBag: ServiceBag.ServiceB
|
|
|
34
34
|
end))
|
|
35
35
|
|
|
36
36
|
self._promiseInventoryPages = MemorizeUtils.memoize(function(avatarAssetTypes)
|
|
37
|
-
return AvatarEditorUtils.promiseInventoryPages(avatarAssetTypes)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
end)
|
|
37
|
+
return AvatarEditorUtils.promiseInventoryPages(avatarAssetTypes):Then(function(catalogPages)
|
|
38
|
+
-- Allow for replay
|
|
39
|
+
return PagesProxy.new(catalogPages)
|
|
40
|
+
end)
|
|
42
41
|
end)
|
|
43
42
|
end
|
|
44
43
|
|
|
@@ -108,4 +107,4 @@ function AvatarEditorInventoryServiceClient:Destroy()
|
|
|
108
107
|
self._maid:DoCleaning()
|
|
109
108
|
end
|
|
110
109
|
|
|
111
|
-
return AvatarEditorInventoryServiceClient
|
|
110
|
+
return AvatarEditorInventoryServiceClient
|
|
@@ -184,7 +184,9 @@ end
|
|
|
184
184
|
@param humanoidDescription HumanoidDescription
|
|
185
185
|
@return Promise<HumanoidDescription?>
|
|
186
186
|
]=]
|
|
187
|
-
function AvatarEditorUtils.promiseCheckApplyDefaultClothing(
|
|
187
|
+
function AvatarEditorUtils.promiseCheckApplyDefaultClothing(
|
|
188
|
+
humanoidDescription: HumanoidDescription
|
|
189
|
+
): Promise.Promise<HumanoidDescription?>
|
|
188
190
|
assert(
|
|
189
191
|
typeof(humanoidDescription) == "Instance" and humanoidDescription:IsA("HumanoidDescription"),
|
|
190
192
|
"Bad humanoidDescription"
|
|
@@ -763,7 +765,11 @@ end
|
|
|
763
765
|
@param rigType HumanoidRigType
|
|
764
766
|
@return Promise<AvatarPromptResult>
|
|
765
767
|
]=]
|
|
766
|
-
function AvatarEditorUtils.promptUpdateOutfit(
|
|
768
|
+
function AvatarEditorUtils.promptUpdateOutfit(
|
|
769
|
+
outfitId: number,
|
|
770
|
+
updatedOutfit: HumanoidDescription,
|
|
771
|
+
rigType: Enum.HumanoidRigType
|
|
772
|
+
)
|
|
767
773
|
assert(type(outfitId) == "number", "Bad outfitId")
|
|
768
774
|
assert(typeof(updatedOutfit) == "Instance" and updatedOutfit:IsA("HumanoidDescription"), "Bad updatedOutfit")
|
|
769
775
|
assert(EnumUtils.isOfType(Enum.HumanoidRigType, rigType), "Bad rigType")
|
|
@@ -776,13 +782,15 @@ function AvatarEditorUtils.promptUpdateOutfit(outfitId: number, updatedOutfit: H
|
|
|
776
782
|
maid:DoCleaning()
|
|
777
783
|
end)
|
|
778
784
|
|
|
779
|
-
maid:GiveTask(
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
785
|
+
maid:GiveTask(
|
|
786
|
+
AvatarEditorService.PromptUpdateOutfitCompleted:Connect(function(avatarPromptResult: Enum.AvatarPromptResult)
|
|
787
|
+
if avatarPromptResult == Enum.AvatarPromptResult.Success then
|
|
788
|
+
promise:Resolve(avatarPromptResult)
|
|
789
|
+
else
|
|
790
|
+
promise:Reject(avatarPromptResult)
|
|
791
|
+
end
|
|
792
|
+
end)
|
|
793
|
+
)
|
|
786
794
|
|
|
787
795
|
local ok, err = pcall(function()
|
|
788
796
|
AvatarEditorService:PromptUpdateOutfit(outfitId, updatedOutfit, rigType)
|
|
@@ -795,4 +803,4 @@ function AvatarEditorUtils.promptUpdateOutfit(outfitId: number, updatedOutfit: H
|
|
|
795
803
|
return promise
|
|
796
804
|
end
|
|
797
805
|
|
|
798
|
-
return AvatarEditorUtils
|
|
806
|
+
return AvatarEditorUtils
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
local require = require(script.Parent.loader).load(script)
|
|
6
6
|
|
|
7
|
-
local MemorizeUtils = require("MemorizeUtils")
|
|
8
|
-
local AvatarEditorUtils = require("AvatarEditorUtils")
|
|
9
7
|
local Aggregator = require("Aggregator")
|
|
8
|
+
local AvatarEditorUtils = require("AvatarEditorUtils")
|
|
10
9
|
local Maid = require("Maid")
|
|
10
|
+
local MemorizeUtils = require("MemorizeUtils")
|
|
11
11
|
local PagesProxy = require("PagesProxy")
|
|
12
12
|
local ServiceBag = require("ServiceBag")
|
|
13
13
|
|
|
@@ -21,10 +21,9 @@ function CatalogSearchServiceCache:Init(serviceBag: ServiceBag.ServiceBag)
|
|
|
21
21
|
|
|
22
22
|
-- TODO: If you scroll down long enough this leaks memory
|
|
23
23
|
self._promiseSearchCatalog = MemorizeUtils.memoize(function(params)
|
|
24
|
-
return AvatarEditorUtils.promiseSearchCatalog(params)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
end)
|
|
24
|
+
return AvatarEditorUtils.promiseSearchCatalog(params):Then(function(catalogPages)
|
|
25
|
+
return PagesProxy.new(catalogPages)
|
|
26
|
+
end)
|
|
28
27
|
end)
|
|
29
28
|
|
|
30
29
|
self._assetAggregator = self._maid:Add(Aggregator.new("AvatarEditorUtils.promiseBatchItemDetails", function(itemIds)
|
|
@@ -32,9 +31,10 @@ function CatalogSearchServiceCache:Init(serviceBag: ServiceBag.ServiceBag)
|
|
|
32
31
|
end))
|
|
33
32
|
self._assetAggregator:SetMaxBatchSize(100)
|
|
34
33
|
|
|
35
|
-
self._bundleAggregator =
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
self._bundleAggregator =
|
|
35
|
+
self._maid:Add(Aggregator.new("AvatarEditorUtils.promiseBatchItemDetails", function(itemIds)
|
|
36
|
+
return AvatarEditorUtils.promiseBatchItemDetails(itemIds, Enum.AvatarItemType.Bundle)
|
|
37
|
+
end))
|
|
38
38
|
self._bundleAggregator:SetMaxBatchSize(100)
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -58,14 +58,13 @@ function CatalogSearchServiceCache:PromiseItemDetails(assetId, avatarItemType)
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
function CatalogSearchServiceCache:PromiseSearchCatalog(params)
|
|
61
|
-
return self._promiseSearchCatalog(params)
|
|
62
|
-
:
|
|
63
|
-
|
|
64
|
-
end)
|
|
61
|
+
return self._promiseSearchCatalog(params):Then(function(pagesProxy)
|
|
62
|
+
return pagesProxy:Clone()
|
|
63
|
+
end)
|
|
65
64
|
end
|
|
66
65
|
|
|
67
66
|
function CatalogSearchServiceCache:Destroy()
|
|
68
67
|
self._maid:DoCleaning()
|
|
69
68
|
end
|
|
70
69
|
|
|
71
|
-
return CatalogSearchServiceCache
|
|
70
|
+
return CatalogSearchServiceCache
|