Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Tell Steam that you're "playing" zero or more games.
- * @param {array} apps - Array of integers (AppIDs) or strings (non-Steam game names) for the games you're playing. Empty to play nothing.
- * @param {boolean} [force=false] If true, kick any other sessions logged into this account and playing games from Steam
- */
- SteamUser.prototype.gamesPlayed = function(apps, force) {
- if (!(apps instanceof Array)) {
- apps = [apps];
- }
- var self = this;
- if (this._playingBlocked && force) {
- this.kickPlayingSession(doTheThing);
- } else {
- doTheThing();
- }
- function doTheThing() {
- self._send(SteamUser.EMsg.ClientGamesPlayed, apps.map(function(app) {
- if (typeof app === 'string') {
- return {
- "game_id": "15190414816125648896",
- "game_extra_info": app
- };
- }
- if (typeof app === 'object') {
- return app;
- }
- return {"game_id": app};
- }));
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement