Skip to content

Commit

Permalink
Updated script api
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Nov 15, 2023
1 parent e8becd2 commit 2ec789a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion api_script.mtl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{/params}}
{{/has_params}}
{{#has_returns}}
return:
returns:
{{#returns}}
- name: {{name}}
type: {{type}}
Expand Down
78 changes: 39 additions & 39 deletions steam/api/steam.script_api
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: init
type: function
desc: Initialize Steamworks.
return:
returns:
- name: success
type: Boolean
desc: True if successful
Expand Down Expand Up @@ -101,7 +101,7 @@
- name: app_id
type: number

return:
returns:
- name: installed
type: bool

Expand All @@ -113,23 +113,23 @@
- name: CSteamID
type: friendId

return:
returns:
- name: String
type: name
desc: Name of user

- name: friends_get_persona_name
type: function
desc: Returns the local players name - guaranteed to not be NULL. This is the same name as on the users community profile page. This is stored in UTF-8 format.
return:
returns:
- name: String
type: name
desc: Name of user

- name: friends_get_persona_state
type: function
desc: Gets the status of the current user. Returned as EPersonaState.
return:
returns:
- name: Number
type: state
desc: Status of user.
Expand All @@ -141,7 +141,7 @@
- name: steamIDFriend
type: number
desc: Id of friend
return:
returns:
- name: Number
type: state
desc: State of friend
Expand All @@ -153,7 +153,7 @@
- name: steamIDFriend
type: number
desc: Id of friend
return:
returns:
- name: Number
type: level
desc: Steam level of friend
Expand All @@ -165,7 +165,7 @@
- name: steamIDFriend
type: number
desc: Id of friend
return:
returns:
- name: Number
type: relationship
desc: Relationship to the user.
Expand Down Expand Up @@ -203,23 +203,23 @@
- name: user_get_steam_id
type: function
desc: Returns the CSteamID of the account currently logged into the Steam client. A CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API.
return:
returns:
- name: id
type: CSteamID


- name: user_get_player_steam_level
type: function
desc: Gets the Steam Level of the user, as shown on their profile.
return:
returns:
- name: level
type: number


- name: user_get_game_badge_level
type: function
desc: Trading Card badges data access. If you only have one set of cards, the series will be 1. The user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1).
return:
returns:
- name: series
type: number

Expand All @@ -230,47 +230,47 @@
- name: user_logged_on
type: function
desc: Returns true if the Steam client current has a live connection to the Steam Servers.
return:
returns:
- name: logged_on
type: boolean


- name: user_is_behind_nat
type: function
desc: Returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam .
return:
returns:
- name: behind_nat
type: boolean


- name: user_is_phone_verified
type: function
desc: Gets whether the users phone number is verified.
return:
returns:
- name: verified
type: boolean


- name: user_is_phone_identifying
type: function
desc: Gets whether the users phone number is identifying.
return:
returns:
- name: verifying
type: boolean


- name: user_is_phone_requiring_verification
type: function
desc: Gets whether the users phone number is awaiting (re)verification.
return:
returns:
- name: verification
type: boolean


- name: user_is_two_factor_enabled
type: function
desc: Gets whether the user has two factor enabled on their account.
return:
returns:
- name: enabled
type: boolean

Expand All @@ -282,7 +282,7 @@
- name: id
type: string
desc: Id of the stat to get
return:
returns:
- name: Boolean
type: ok

Expand All @@ -300,7 +300,7 @@
- name: stat
type: number
desc: Number to set
return:
returns:
- name: ok
type: boolean

Expand All @@ -312,7 +312,7 @@
- name: id
type: string
desc: Id of the stat to get
return:
returns:
- name: ok
type: Boolean

Expand All @@ -330,15 +330,15 @@
- name: stat
type: number
desc: Number to set
return:
returns:
- name: ok
type: Boolean


- name: user_stats_request_current_stats
type: function
desc: Ask the server to send down this user's data and achievements for this game.
return:
returns:
- name: ok
type: Boolean
desc: True if successful
Expand All @@ -350,15 +350,15 @@
- name: history_days
type: number

return:
returns:
- name: ok
type: Boolean


- name: user_stats_store_stats
type: function
desc: Store the current data on the server. Will get a callback when set and one callback for every new achievement If the callback has a result of k_EResultInvalidParam, one or more stats uploaded has been rejected, either because they broke constraints or were out of date. In this case the server sends back updated values. The stats should be re-iterated to keep in sync.
return:
returns:
- name: ok
type: Boolean

Expand All @@ -370,7 +370,7 @@
- name: achievements
type: boolean
desc: True if achievements should be reset as well.
return:
returns:
- name: ok
type: Boolean

Expand All @@ -382,7 +382,7 @@
- name: name
type: string

return:
returns:
- name: ok
type: Boolean

Expand All @@ -394,7 +394,7 @@
- name: name
type: string

return:
returns:
- name: ok
type: Boolean

Expand All @@ -409,15 +409,15 @@
- name: name
type: string

return:
returns:
- name: ok
type: Boolean


- name: user_stats_get_num_achievements
type: function
desc: Used for iterating achievements. In general games should not need these functions because they should have a list of existing achievements compiled into them.
return:
returns:
- name: num
type: Number
desc: Number of achievements.
Expand All @@ -429,7 +429,7 @@
- name: index
type: number

return:
returns:
- name: name
type: String

Expand All @@ -444,15 +444,15 @@
- name: key
type: string
desc: Either "name", "desc" or "hidden"
return:
returns:
- name: attribute
type: String


- name: user_stats_get_achievement_achieved_percent
type: function
desc: Returns the percentage of users who have achieved the specified achievement.
return:
returns:
- name: ok
type: Boolean

Expand All @@ -476,7 +476,7 @@
- name: end
type: number

return:
returns:
- name: handle
type: string

Expand All @@ -491,7 +491,7 @@
- name: index
type: number
desc: Which entry to get
return:
returns:
- name: ok
type: Boolean

Expand All @@ -502,23 +502,23 @@
- name: utils_get_app_id
type: function
desc: Returns the appID of the current process.
return:
returns:
- name: app_id
type: Number


- name: utils_get_seconds_since_app_active
type: function
desc: Return the number of seconds since the user.
return:
returns:
- name: seconds
type: Number


- name: utils_is_steam_running_on_steam_deck
type: function
desc: Returns true if currently running on the Steam Deck device.
return:
returns:
- name: running_on_steamdeck
type: Boolean

Expand All @@ -530,7 +530,7 @@
- name: image
type: number
desc: Image handle
return:
returns:
- name: ok
type: Boolean
desc: True if size of image was read successfully
Expand All @@ -551,7 +551,7 @@
- name: size
type: number
desc: Size of image
return:
returns:
- name: ok
type: Boolean
desc: True if size of image was read successfully
Expand Down

0 comments on commit 2ec789a

Please sign in to comment.