mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Fixed server interfaces
This commit is contained in:
parent
011c596cb1
commit
ffa48fb03c
@ -97,6 +97,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FriendsTest.cs" />
|
||||
<Compile Include="GameServerStatsTest.cs" />
|
||||
<Compile Include="InputTest.cs" />
|
||||
<Compile Include="NetworkingSockets.cs" />
|
||||
<Compile Include="NetworkingSocketsTest.TestConnectionInterface.cs" />
|
||||
|
@ -107,6 +107,7 @@
|
||||
<Compile Include="SteamNetworkingTest.cs" />
|
||||
<Compile Include="UgcTest.cs" />
|
||||
<Compile Include="UgcEditor.cs" />
|
||||
<Compile Include="GameServerStatsTest.cs" />
|
||||
<Compile Include="UserTest.cs" />
|
||||
<Compile Include="UserStatsTest.cs" />
|
||||
<Compile Include="UgcQuery.cs" />
|
||||
|
32
Facepunch.Steamworks.Test/GameServerStatsTest.cs
Normal file
32
Facepunch.Steamworks.Test/GameServerStatsTest.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
[TestClass]
|
||||
[DeploymentItem( "steam_api64.dll" )]
|
||||
[DeploymentItem( "steam_api.dll" )]
|
||||
public class GameServerStatsTest
|
||||
{
|
||||
static SteamId Garry = 76561197960279927;
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAchievement()
|
||||
{
|
||||
var result = await SteamServerStats.RequestUserStats( Garry );
|
||||
Assert.AreEqual( result, Result.OK );
|
||||
|
||||
var value = SteamServerStats.GetAchievement( Garry, "COLLECT_100_WOOD" );
|
||||
Assert.IsTrue( value );
|
||||
|
||||
value = SteamServerStats.GetAchievement( Garry, "ACHIVEMENT_THAT_DOESNT_EXIST" );
|
||||
Assert.IsFalse( value );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -93,6 +93,14 @@ namespace Steamworks
|
||||
Dispatch.ServerPipe = SteamGameServer.GetHSteamPipe();
|
||||
|
||||
AddInterface<SteamServer>();
|
||||
AddInterface<SteamUtils>();
|
||||
AddInterface<SteamNetworking>();
|
||||
AddInterface<SteamServerStats>();
|
||||
//AddInterface<ISteamHTTP>();
|
||||
AddInterface<SteamInventory>();
|
||||
AddInterface<SteamUGC>();
|
||||
AddInterface<SteamApps>();
|
||||
|
||||
AddInterface<SteamNetworkingUtils>();
|
||||
AddInterface<SteamNetworkingSockets>();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user