Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Integration of ISteamInventory Interface. #152

Open
LHYLHY-git opened this issue Jul 17, 2024 · 1 comment
Open

Request for Integration of ISteamInventory Interface. #152

LHYLHY-git opened this issue Jul 17, 2024 · 1 comment

Comments

@LHYLHY-git
Copy link

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

@AmogusJS
Copy link

AmogusJS commented Aug 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants