steamworks.js icon indicating copy to clipboard operation
steamworks.js copied to clipboard

Request for Integration of ISteamInventory Interface.

Open TinyKiecoo opened this issue 2 years ago • 1 comments

Judging by some of the games that have been released recently, the popularity of the Steam inventory service is highly increasing. And many developers are interested in it, including me.

So could you please add ISteamInventory interface? Appreciate your hard work.

https://partner.steamgames.com/doc/api/ISteamInventory

TinyKiecoo avatar Jul 17 '24 04:07 TinyKiecoo

I'd been trying to extend the module API but unfortunately I've zero experience with rust. I only managed to figure out how the steamworks.js itself works, maybe this will help in some way.

For example, achievements.rs exposes Steamworks library method 'SetAchievement' in rust this way:

#[napi]
pub fn activate(achievement: String) -> bool {
    let client = crate::client::get_client();
    client
        .user_stats()
        .achievement(&achievement)
        .set()
        .and_then(|_| client.user_stats().store_stats())
        .is_ok()
}

Then it is declared in the 'client.d.ts' so it can be used in node through javascript.

JohnRacism avatar Aug 02 '24 11:08 JohnRacism