steamutils 1.0.72 → 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
5
  </component>
6
6
  </project>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "dependencies": {
5
5
  "axios": "^1.3.4",
6
6
  "cheerio": "^1.0.0-rc.12",
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4
- </state>
5
- </component>