aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Parrill <[email protected]>2019-06-05 22:28:05 -0400
committerMatthew Collins <[email protected]>2019-06-09 23:50:11 +0100
commit1db54ed7e950f227fb323d0a9a8783477603811b (patch)
tree13de67354cab9784f9b188d75ad49a5e20048181 /src
parentAdd Utils::set_warning_callback for logging Steam warnings (diff)
downloadsteamworks-rs-1db54ed7e950f227fb323d0a9a8783477603811b.tar.xz
steamworks-rs-1db54ed7e950f227fb323d0a9a8783477603811b.zip
Add SteamId::account_id to get the account ID
The account ID is used in a few places in the API.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 1bcf828..37bedcd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -345,6 +345,13 @@ impl SteamId {
sys::steam_rust_is_steam_id_valid(self.0) != 0
}
}
+
+ /// Returns the account id for this steam id
+ pub fn account_id(&self) -> u32 {
+ unsafe {
+ sys::steam_rust_get_account_id_from_steam_id(self.0).0
+ }
+ }
}
/// A game id