steamutils 1.0.71 → 1.0.73
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/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +17 -1
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
package/.idea/steamutils.iml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager">
|
4
4
|
<content url="file://$MODULE_DIR$">
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
8
|
</content>
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/SteamClient.js
CHANGED
@@ -84,7 +84,8 @@ function SteamClient({
|
|
84
84
|
password,
|
85
85
|
cookie,
|
86
86
|
isAutoRequestFreeLicense = true,
|
87
|
-
isPartyRegister = true
|
87
|
+
isPartyRegister = true,
|
88
|
+
autoPlay = false
|
88
89
|
}) {
|
89
90
|
const steamClient = new SteamUser()
|
90
91
|
let prime = null
|
@@ -251,6 +252,16 @@ function SteamClient({
|
|
251
252
|
})
|
252
253
|
}
|
253
254
|
|
255
|
+
async function gamePlay() {
|
256
|
+
let ownedApps = null
|
257
|
+
while (!Array.isArray(ownedApps)) {
|
258
|
+
ownedApps = (await (new SteamUtils(cookie)).getDynamicStoreUserData())?.rgOwnedApps
|
259
|
+
}
|
260
|
+
ownedApps.length = Math.min(ownedApps.length, 30)
|
261
|
+
_.remove(ownedApps, 730)
|
262
|
+
steamClient.gamesPlayed([...ownedApps, 730])
|
263
|
+
}
|
264
|
+
|
254
265
|
|
255
266
|
/**
|
256
267
|
* Get a list of lobbies (* = Unsure description could be wrong)
|
@@ -651,6 +662,11 @@ function SteamClient({
|
|
651
662
|
autoRequestFreeLicense(false, 50)
|
652
663
|
}, 60000, 'autoRequestFreeLicense')
|
653
664
|
}
|
665
|
+
|
666
|
+
if (autoPlay) {
|
667
|
+
gamePlay()
|
668
|
+
doSetInterval(gamePlay, [15 * 60000, 30 * 60000], 'gamePlay')
|
669
|
+
}
|
654
670
|
})
|
655
671
|
|
656
672
|
|
package/package.json
CHANGED