steamutils 1.2.89 → 1.2.90
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +9 -2
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -340,9 +340,16 @@ function SteamClient({
|
|
340
340
|
|
341
341
|
async function gamePlay() {
|
342
342
|
let ownedApps = null
|
343
|
-
|
344
|
-
|
343
|
+
for (let i = 0; i < 10; i++) {
|
344
|
+
if (!Array.isArray(ownedApps)) {
|
345
|
+
ownedApps = Array.isArray(steamClient.licenses) ? steamClient.licenses.map(({package_id}) => package_id) : (await (new SteamUtils(await getCookiesWait())).getDynamicStoreUserData())?.rgOwnedApps
|
346
|
+
await sleep(1000)
|
347
|
+
} else {
|
348
|
+
break
|
349
|
+
}
|
345
350
|
}
|
351
|
+
|
352
|
+
ownedApps = _.shuffle(ownedApps || [])
|
346
353
|
ownedApps.length = Math.min(ownedApps.length, 10)
|
347
354
|
_.remove(ownedApps, 730)
|
348
355
|
gamesPlayed([...ownedApps, 730])
|