From 2e9c0775351f38fb9761dd8ccdca2e07de5f2e98 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Thu, 27 Oct 2016 21:02:06 +0100 Subject: [PATCH] Test ItemDefintiion.GetStringProperty --- Facepunch.Steamworks.Test/Client/Client.cs | 2 + .../bin/Debug/Facepunch.Steamworks.xml | 556 ++++++++++++++++++ 2 files changed, 558 insertions(+) create mode 100644 Facepunch.Steamworks.Test/bin/Debug/Facepunch.Steamworks.xml diff --git a/Facepunch.Steamworks.Test/Client/Client.cs b/Facepunch.Steamworks.Test/Client/Client.cs index cac157e..c7838c6 100644 --- a/Facepunch.Steamworks.Test/Client/Client.cs +++ b/Facepunch.Steamworks.Test/Client/Client.cs @@ -211,6 +211,8 @@ public void InventoryDefinitions() foreach ( var i in client.Inventory.Definitions ) { Console.WriteLine( "{0}: {1}", i.Id, i.Name ); + Console.WriteLine( " itemshortname: {0}", i.GetStringProperty( "itemshortname" ) ); + Console.WriteLine( " workshopdownload: {0}", i.GetStringProperty( "workshopdownload" ) ); } } } diff --git a/Facepunch.Steamworks.Test/bin/Debug/Facepunch.Steamworks.xml b/Facepunch.Steamworks.Test/bin/Debug/Facepunch.Steamworks.xml new file mode 100644 index 0000000..e479951 --- /dev/null +++ b/Facepunch.Steamworks.Test/bin/Debug/Facepunch.Steamworks.xml @@ -0,0 +1,556 @@ + + + + Facepunch.Steamworks + + + + + Current running program's AppId + + + + + Called with a message from Steam + + + + + Global callback type + + + + + Call results are results to specific actions + + + + + An item in your inventory. + + + + + Careful, this might not be available. Especially on a game server. + + + + + Called when the local client's items are first retrieved, and when they change. + Obviously not called on the server. + + + + + A list of items owned by this user. You should call Refresh() before trying to access this, + and then wait until it's non null or listen to OnUpdate to find out immediately when it's populated. + + + + + You can send this data to a server, or another player who can then deserialize it + and get a verified list of items. + + + + + Serialized data exprires after an hour. This is the time the value in SerializedItems will expire. + + + + + Call this at least every two minutes, every frame doesn't hurt. + You should call it when you consider it active play time. + IE - your player is alive, and playing. + Don't stress on it too much tho cuz it's super hijackable anyway. + + + + + Call this to retrieve the items. + Note that if this has already been called it won't + trigger a call to OnUpdate unless the items have changed + + + + + Some definitions aren't sent to the client, and all aren't available on the server. + Manually getting a Definition here lets you call functions on those definitions. + + + + + Called every frame + + + + + If we have a local player request process it. + + + + + A list of items defined for this app. + This should be immediately populated and available. + + + + + Utility, given a "1;VLV250" string, convert it to a 2.5 + + + + + An item definition. This describes an item in your Steam inventory, but is + not unique to that item. For example, this might be a tshirt, but you might be able to own + multiple tshirts. + + + + + Trigger an item drop. Call this when it's a good time to award + an item drop to a player. This won't automatically result in giving + an item to a player. Just call it every minute or so, or on launch. + ItemDefinition is usually a generator + + + + + Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare). + The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or + there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again. + + + + + As above, but if the underlying p2p connection isn't yet established the packet will just be thrown away. Using this on the first + packet sent to a remote host almost guarantees the packet will be dropped. + This is only really useful for kinds of data that should never buffer up, i.e. voice payload packets + + + + + + As above, but applies the Nagle algorithm to the send - sends will accumulate + until the current MTU size (typically ~1200 bytes, but can change) or ~200ms has passed (Nagle algorithm). + Useful if you want to send a set of smaller messages but have the coalesced into a single packet + Since the reliable stream is all ordered, you can do several small message sends with k_EP2PSendReliableWithBuffering and then + do a normal k_EP2PSendReliable to force all the buffered data to be sent. + + + + + Current user's Username + + + + + Current user's SteamId + + + + + Current Beta name, if ser + + + + + Should be called at least once every frame + + + + + History filters don't seem to work, so we don't bother. + You should apply them post process'dly + + + + + Favourite filters don't seem to work, so we don't bother. + You should apply them post process'dly + + + + + A list of servers that responded. If you're only interested in servers that responded since you + last updated, then simply clear this list. + + + + + A list of servers that were in the master list but didn't respond. + + + + + True when we have finished + + + + + Disposing will end the query + + + + + Callback when rules are receieved. + The bool is true if server responded properly. + + + + + List of server rules. Use HasRules to see if this is safe to access. + + + + + Returns true if this server has rules + + + + + Populates Rules for this server + + + + + Cancels a ticket. + You should cancel your ticket when you close the game or leave a server. + + + + + Creates an auth ticket. + Which you can send to a server to authenticate that you are who you say you are. + + + + + Returns the current BuildId of the game. + This is pretty useless, as it isn't guarenteed to return + the build id you're playing, or the latest build id. + + + + + Steam Id + + + + + Return true if blocked + + + + + Return true if is a friend. Returns false if blocked, request etc. + + + + + Their current display name + + + + + Returns true if this friend is online + + + + + Returns true if this friend is online and playing this game + + + + + Returns true if this friend is online and playing this game + + + + + The AppId this guy is playing + + + + + Returns all friends, even blocked, ignored, friend requests etc + + + + + Should be 32x32 - but make sure to check! + + + + + Should be 64x64 - but make sure to check! + + + + + Should be 184x184 - but make sure to check! + + + + + Return true if this image couldn't be loaded for some reason + + + + + Returns the optimal sample rate for voice - according to Steam + + + + + If set to true we are listening to the mic. + You should usually toggle this with the press of a key for push to talk. + + + + + The last time voice was detected, recorded + + + + + If set we will capture the audio at this rate. If unset (set to 0) will capture at OptimalSampleRate + + + + + Some platforms allow/need CallingConvention.ThisCall. If you're crashing with argument null + errors on certain platforms, try flipping this to true. + + I owe this logic to Riley Labrecque's hard work on Steamworks.net - I don't have the knowledge + or patience to find this shit on my own, so massive thanks to him. And also massive thanks to him + for releasing his shit open source under the MIT license so we can all learn and iterate. + + + + + + Set this to true on Linux and OSX + + + + + The Native dll to look for. This is the steam_api.dll renamed. + We need to rename the dll anyway because we can't dynamically choose the library + ie, we can't load steam_api64.dll on windows 64 platforms. So instead we choose to + keep the library name the same. + + This is exposed only for the benefit of implementation - and cannot be changed at runtime. + + + + + Returns a class representing this ItemId. We don't query + item name, description etc. We don't verify that item exists. + We don't verify that this item belongs to your app. + + + + + Both MicrotransactionItems and subscriptionItems + + + + + Workshop item that is meant to be voted on for the purpose of selling in-game + + + + + normal Workshop item that can be subscribed to + + + + + Return a URL to view this item online + + + + + The AppId you're querying. This defaults to this appid. + + + + + The AppId of the app used to upload the item. This defaults to 0 + which means all/any. + + + + + Page starts at 1 !! + + + + + Only return items with these tags + + + + + If true, return items that have all RequireTags + If false, return items that have any tags in RequireTags + + + + + Don't return any items with this tag + + + + + If you're querying for a particular file or files, add them to this. + + + + + Don't call this in production! + + + + + Current user's Username + + + + + Current user's SteamId + + + + + Initialize a server - query port will use the same as GamePort (MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE) + + + + + Should be called at least once every frame + + + + + Gets or sets the current MaxPlayers. + This doesn't enforce any kind of limit, it just updates the master server. + + + + + Gets or sets the current BotCount. + This doesn't enforce any kind of limit, it just updates the master server. + + + + + Gets or sets the current Map Name. + + + + + Gets or sets the current ModDir + + + + + Gets or sets the current Product + + + + + Gets or sets the current Product + + + + + Gets or sets the current ServerName + + + + + Gets or sets the current Passworded + + + + + Gets or sets the current GameTags + + + + + Log onto Steam anonymously + + + + + Sets a Key Value + + + + + Steamid, Ownerid, Status + + + + + Steam authetication statuses + + + + + Steam has verified the user is online, the ticket is valid and ticket has not been reused. + + + + + Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange. + + + + + Forget this guy. They're no longer in the game. + + + + + If true, Steam wants to send a packet. You should respond by sending + this packet in an unconnected way to the returned Address and Port + + + + + + + We have received a server query on our game port. Pass it to Steam to handle. + + + + + Retrieve the stats for this user + + + + + Set the named statistic for this user + + + + + Set the named statistic for this user + + + + + Set the named stat for this user + + + + + Set the named stat for this user + + + +