@@ -209,7 +209,7 @@ export const fullscreenPipelabStateToC3State = (/** @type {import('@pipelab/core
209209const defaultSteamId = {
210210 accountId : - 1 ,
211211 steamId32 : '' ,
212- steamId64 : BigInt ( - 1 ) ,
212+ steamId64 : '' ,
213213}
214214
215215/**
@@ -319,14 +319,16 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
319319 /** @type {import("./sdk.js").IsFullScreenState } */
320320 _fullscreenState = 0 ;
321321
322- /** @type {import('@pipelab/core').NamespacedFunctionReturnType<'localplayer', 'getSteamId'> } */
322+ /** @type {{accountId: number, steamId32: string, steamId64: string} } */
323323 _steam_SteamId = defaultSteamId
324324 /** @type {import('@pipelab/core').NamespacedFunctionReturnType<'localplayer', 'getName'> } */
325325 _steam_Name = ""
326326 /** @type {import('@pipelab/core').NamespacedFunctionReturnType<'localplayer', 'getLevel'> } */
327327 _steam_Level = - 1
328328 /** @type {import('@pipelab/core').NamespacedFunctionReturnType<'localplayer', 'getIpCountry'> } */
329329 _steam_IpCountry = ''
330+ /** @type {import('@pipelab/core').NamespacedFunctionReturnType<'utils', 'isSteamRunningOnSteamDeck'> } */
331+ _steam_IsRunningOnSteamDeck = false
330332
331333 /** @type {string } */
332334 _platform = ''
@@ -522,19 +524,19 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
522524 }
523525
524526 // TODO: BigInt support
525- // promises.push(async () => {
526- // /** @type {import('@pipelab/core').MakeInputOutput<import('@pipelab/core').SteamRaw<'localplayer', 'getSteamId'>, 'input'> } */
527- // const order = {
528- // url: '/steam/raw',
529- // body: {
530- // namespace: 'localplayer',
531- // method: 'getSteamId',
532- // args: [],
533- // },
534- // };
535- // const response = await this.ws?.sendAndWaitForResponse(order);
536- // this._steam_SteamId = response?.body.data ?? defaultSteamId
537- // })
527+ promises . push ( async ( ) => {
528+ /** @type {import('@pipelab/core').MakeInputOutput<import('@pipelab/core').SteamRaw<'localplayer', 'getSteamId'>, 'input'> } */
529+ const order = {
530+ url : '/steam/raw' ,
531+ body : {
532+ namespace : 'localplayer' ,
533+ method : 'getSteamId' ,
534+ args : [ ] ,
535+ } ,
536+ } ;
537+ const response = await this . ws ?. sendAndWaitForResponse ( order ) ;
538+ this . _steam_SteamId = response ?. body . data ?? defaultSteamId
539+ } )
538540
539541 promises . push ( async ( ) => {
540542 /** @type {import('@pipelab/core').MakeInputOutput<import('@pipelab/core').SteamRaw<'localplayer', 'getName'>, 'input'> } */
@@ -580,6 +582,20 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
580582 this . _steam_IpCountry = response ?. body . data ?? '' ;
581583 } )
582584
585+ promises . push ( async ( ) => {
586+ /** @type {import('@pipelab/core').MakeInputOutput<import('@pipelab/core').SteamRaw<'utils', 'isSteamRunningOnSteamDeck'>, 'input'> } */
587+ const order = {
588+ url : '/steam/raw' ,
589+ body : {
590+ namespace : 'utils' ,
591+ method : 'isSteamRunningOnSteamDeck' ,
592+ args : [ ] ,
593+ } ,
594+ } ;
595+ const response = await this . ws ?. sendAndWaitForResponse ( order ) ;
596+ this . _steam_IsRunningOnSteamDeck = response ?. body . data ?? false ;
597+ } )
598+
583599 promises . push ( async ( ) => {
584600 /** @type {import('@pipelab/core').MakeInputOutput<import('@pipelab/core').MessageInfos, 'input'> } */
585601 const order = {
@@ -2417,6 +2433,9 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
24172433 _SteamIpCountry = this . exprs ( super . _SteamIpCountry , ( ) => {
24182434 return this . _steam_IpCountry
24192435 } )
2436+ _SteamIsRunningOnSteamDeck = this . exprs ( super . _SteamIsRunningOnSteamDeck , ( ) => {
2437+ return this . _steam_IsRunningOnSteamDeck ? 1 : 0
2438+ } )
24202439
24212440 _InitializeError = this . exprs ( super . _InitializeError , ( ) => {
24222441 return this . _InitializeErrorValue
0 commit comments