@quenty/gameconfig 6.3.1 → 6.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
|
+
# [6.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gameconfig@6.3.1...@quenty/gameconfig@6.4.0) (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix dependencies ([11beb58](https://github.com/Quenty/NevermoreEngine/commit/11beb582b2d238abb077399fd1c59dea1c9ac90f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Can provide translated cloud description for badges ([5a899e7](https://github.com/Quenty/NevermoreEngine/commit/5a899e77a937bc5cf424af32e03b9240ed639f76))
|
|
17
|
+
* Provider better formatted errors when prompting ([702e538](https://github.com/Quenty/NevermoreEngine/commit/702e5381c2981b6b57ba73882c7d9bc07740e99e))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [6.3.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/gameconfig@6.3.0...@quenty/gameconfig@6.3.1) (2023-10-28)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @quenty/gameconfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/gameconfig",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Configuration service to specify Roblox badges, products, and other specific assets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,30 +27,31 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/attributeutils": "^9.
|
|
31
|
-
"@quenty/badgeutils": "^7.
|
|
32
|
-
"@quenty/baseobject": "^7.
|
|
33
|
-
"@quenty/binder": "^9.
|
|
34
|
-
"@quenty/brio": "^9.
|
|
35
|
-
"@quenty/clienttranslator": "^9.
|
|
36
|
-
"@quenty/cmdrservice": "^8.
|
|
37
|
-
"@quenty/instanceutils": "^8.
|
|
38
|
-
"@quenty/loader": "^7.
|
|
30
|
+
"@quenty/attributeutils": "^9.2.0",
|
|
31
|
+
"@quenty/badgeutils": "^7.1.0",
|
|
32
|
+
"@quenty/baseobject": "^7.1.0",
|
|
33
|
+
"@quenty/binder": "^9.2.0",
|
|
34
|
+
"@quenty/brio": "^9.2.0",
|
|
35
|
+
"@quenty/clienttranslator": "^9.2.0",
|
|
36
|
+
"@quenty/cmdrservice": "^8.3.0",
|
|
37
|
+
"@quenty/instanceutils": "^8.2.0",
|
|
38
|
+
"@quenty/loader": "^7.1.0",
|
|
39
39
|
"@quenty/maid": "^2.6.0",
|
|
40
|
-
"@quenty/marketplaceutils": "^7.
|
|
41
|
-
"@quenty/observablecollection": "^6.
|
|
42
|
-
"@quenty/
|
|
43
|
-
"@quenty/
|
|
40
|
+
"@quenty/marketplaceutils": "^7.1.0",
|
|
41
|
+
"@quenty/observablecollection": "^6.3.0",
|
|
42
|
+
"@quenty/playerutils": "^3.3.0",
|
|
43
|
+
"@quenty/preferredparentutils": "^4.1.0",
|
|
44
|
+
"@quenty/promise": "^7.1.0",
|
|
44
45
|
"@quenty/pseudolocalize": "^3.2.0",
|
|
45
|
-
"@quenty/remotefunctionutils": "^7.
|
|
46
|
-
"@quenty/remoting": "^7.
|
|
47
|
-
"@quenty/rx": "^8.
|
|
48
|
-
"@quenty/rxbinderutils": "^9.
|
|
49
|
-
"@quenty/servicebag": "^7.
|
|
50
|
-
"@quenty/statestack": "^9.
|
|
46
|
+
"@quenty/remotefunctionutils": "^7.1.0",
|
|
47
|
+
"@quenty/remoting": "^7.2.0",
|
|
48
|
+
"@quenty/rx": "^8.2.0",
|
|
49
|
+
"@quenty/rxbinderutils": "^9.2.0",
|
|
50
|
+
"@quenty/servicebag": "^7.1.0",
|
|
51
|
+
"@quenty/statestack": "^9.2.0",
|
|
51
52
|
"@quenty/string": "^3.1.0",
|
|
52
|
-
"@quenty/table": "^3.
|
|
53
|
-
"@quenty/valueobject": "^8.
|
|
53
|
+
"@quenty/table": "^3.4.0",
|
|
54
|
+
"@quenty/valueobject": "^8.2.0"
|
|
54
55
|
},
|
|
55
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "2c2dbbc0cb2fbb46b4f3270c559c63890fe18b26"
|
|
56
57
|
}
|
|
@@ -10,6 +10,7 @@ local TeleportService = game:GetService("TeleportService")
|
|
|
10
10
|
|
|
11
11
|
local GameConfigCmdrUtils = require("GameConfigCmdrUtils")
|
|
12
12
|
local BadgeUtils = require("BadgeUtils")
|
|
13
|
+
local PlayerUtils = require("PlayerUtils")
|
|
13
14
|
|
|
14
15
|
local GameConfigCommandService = {}
|
|
15
16
|
GameConfigCommandService.ServiceName = "GameConfigCommandService"
|
|
@@ -57,11 +58,11 @@ function GameConfigCommandService:_registerCommands()
|
|
|
57
58
|
for _, player in pairs(players) do
|
|
58
59
|
for _, badgeId in pairs(badgeIds) do
|
|
59
60
|
BadgeUtils.promiseAwardBadge(player, badgeId)
|
|
60
|
-
table.insert(givenTo, ("%s badge %d"
|
|
61
|
+
table.insert(givenTo, string.format("%s badge %d", PlayerUtils.formatName(player), badgeId))
|
|
61
62
|
end
|
|
62
63
|
end
|
|
63
64
|
|
|
64
|
-
return ("Awards: %s"
|
|
65
|
+
return string.format("Awards: %s", table.concat(givenTo, ", "))
|
|
65
66
|
end)
|
|
66
67
|
|
|
67
68
|
self._cmdrService:RegisterCommand({
|
|
@@ -85,10 +86,10 @@ function GameConfigCommandService:_registerCommands()
|
|
|
85
86
|
|
|
86
87
|
for _, player in pairs(players) do
|
|
87
88
|
MarketplaceService:PromptProductPurchase(player, productId)
|
|
88
|
-
table.insert(givenTo, ("%s prompted purchase of %d"
|
|
89
|
+
table.insert(givenTo, string.format("%s prompted purchase of %d", PlayerUtils.formatName(player), productId))
|
|
89
90
|
end
|
|
90
91
|
|
|
91
|
-
return ("Prompted: %s"
|
|
92
|
+
return string.format("Prompted: %s", table.concat(givenTo, ", "))
|
|
92
93
|
end)
|
|
93
94
|
|
|
94
95
|
self._cmdrService:RegisterCommand({
|
|
@@ -112,10 +113,10 @@ function GameConfigCommandService:_registerCommands()
|
|
|
112
113
|
|
|
113
114
|
for _, player in pairs(players) do
|
|
114
115
|
MarketplaceService:PromptGamePassPurchase(player, gamePassId)
|
|
115
|
-
table.insert(givenTo, ("%s prompted purchase of %d"
|
|
116
|
+
table.insert(givenTo, string.format("%s prompted purchase of %d", PlayerUtils.formatName(player), gamePassId))
|
|
116
117
|
end
|
|
117
118
|
|
|
118
|
-
return ("Prompted: %s"
|
|
119
|
+
return string.format("Prompted: %s", table.concat(givenTo, ", "))
|
|
119
120
|
end)
|
|
120
121
|
|
|
121
122
|
self._cmdrService:RegisterCommand({
|
|
@@ -139,10 +140,10 @@ function GameConfigCommandService:_registerCommands()
|
|
|
139
140
|
|
|
140
141
|
for _, player in pairs(players) do
|
|
141
142
|
MarketplaceService:PromptPurchase(player, assetId)
|
|
142
|
-
table.insert(givenTo, ("%s prompted purchase of %d"
|
|
143
|
+
table.insert(givenTo, string.format("%s prompted purchase of %d", PlayerUtils.formatName(player), assetId))
|
|
143
144
|
end
|
|
144
145
|
|
|
145
|
-
return ("Prompted: %s"
|
|
146
|
+
return string.format("Prompted: %s", table.concat(givenTo, ", "))
|
|
146
147
|
end)
|
|
147
148
|
|
|
148
149
|
self._cmdrService:RegisterCommand({
|
|
@@ -166,10 +167,10 @@ function GameConfigCommandService:_registerCommands()
|
|
|
166
167
|
|
|
167
168
|
for _, player in pairs(players) do
|
|
168
169
|
MarketplaceService:PromptBundlePurchase(player, bundleId)
|
|
169
|
-
table.insert(givenTo, ("%s prompted purchase of %d"
|
|
170
|
+
table.insert(givenTo, string.format("%s prompted purchase of %d", PlayerUtils.formatName(player), bundleId))
|
|
170
171
|
end
|
|
171
172
|
|
|
172
|
-
return ("Prompted: %s"
|
|
173
|
+
return string.format("Prompted: %s", table.concat(givenTo, ", "))
|
|
173
174
|
end)
|
|
174
175
|
|
|
175
176
|
self._cmdrService:RegisterCommand({
|
|
@@ -189,7 +189,7 @@ end
|
|
|
189
189
|
@return Observable<string?>
|
|
190
190
|
]=]
|
|
191
191
|
function GameConfigAssetBase:ObserveCloudName()
|
|
192
|
-
return self:_observeCloudProperty("Name", "string")
|
|
192
|
+
return self:_observeCloudProperty({ "Name" }, "string")
|
|
193
193
|
end
|
|
194
194
|
|
|
195
195
|
--[=[
|
|
@@ -198,7 +198,7 @@ end
|
|
|
198
198
|
@return Observable<string?>
|
|
199
199
|
]=]
|
|
200
200
|
function GameConfigAssetBase:ObserveCloudDescription()
|
|
201
|
-
return self:_observeCloudProperty("Description", "string")
|
|
201
|
+
return self:_observeCloudProperty({ "Description" }, "string")
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
--[=[
|
|
@@ -206,27 +206,31 @@ end
|
|
|
206
206
|
@return Observable<number?>
|
|
207
207
|
]=]
|
|
208
208
|
function GameConfigAssetBase:ObserveCloudPriceInRobux()
|
|
209
|
-
return self:_observeCloudProperty("PriceInRobux", "number")
|
|
209
|
+
return self:_observeCloudProperty({ "PriceInRobux" }, "number")
|
|
210
210
|
end
|
|
211
211
|
|
|
212
212
|
--[=[
|
|
213
213
|
@return Observable<number?>
|
|
214
214
|
]=]
|
|
215
215
|
function GameConfigAssetBase:ObserveCloudIconImageAssetId()
|
|
216
|
-
return self:_observeCloudProperty("IconImageAssetId", "number")
|
|
216
|
+
return self:_observeCloudProperty({ "IconImageAssetId", "IconImageId" }, "number")
|
|
217
217
|
end
|
|
218
218
|
|
|
219
|
-
function GameConfigAssetBase:_observeCloudProperty(
|
|
220
|
-
assert(type(
|
|
219
|
+
function GameConfigAssetBase:_observeCloudProperty(propertyNameList, expectedType)
|
|
220
|
+
assert(type(propertyNameList) == "table", "Bad propertyNameList")
|
|
221
221
|
assert(type(expectedType) == "string", "Bad expectedType")
|
|
222
222
|
|
|
223
223
|
return self:_observeCloudDataFromState():Pipe({
|
|
224
224
|
Rx.map(function(data)
|
|
225
225
|
if type(data) == "table" then
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
for _, propertyName in pairs(propertyNameList) do
|
|
227
|
+
local result = data[propertyName]
|
|
228
|
+
if type(result) == expectedType then
|
|
229
|
+
return result
|
|
230
|
+
end
|
|
229
231
|
end
|
|
232
|
+
|
|
233
|
+
return nil
|
|
230
234
|
else
|
|
231
235
|
return nil
|
|
232
236
|
end
|