mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 22:25:49 +03:00
Update, Added GetAuthTicket, to be able to do the Auth Workflow on a server from an home made API
This commit is contained in:
parent
4463739be5
commit
19953587a7
@ -32,7 +32,7 @@ public static void AssemblyInit( TestContext context )
|
||||
//
|
||||
// Init Client
|
||||
//
|
||||
Steamworks.SteamClient.Init( 252490 );
|
||||
Steamworks.SteamClient.Init( 1442910 );
|
||||
|
||||
//
|
||||
// Init Server
|
||||
@ -44,7 +44,7 @@ public static void AssemblyInit( TestContext context )
|
||||
QueryPort = 28016
|
||||
};
|
||||
|
||||
Steamworks.SteamServer.Init( 252490, serverInit );
|
||||
Steamworks.SteamServer.Init( 1442910, serverInit );
|
||||
|
||||
//
|
||||
// Needs to happen before LogOnAnonymous
|
||||
|
@ -1,74 +0,0 @@
|
||||
"In Game Actions"
|
||||
{
|
||||
"actions"
|
||||
{
|
||||
"InGameControls"
|
||||
{
|
||||
"title" "#Set_Ingame"
|
||||
"StickPadGyro"
|
||||
{
|
||||
"Move"
|
||||
{
|
||||
"title" "#Action_Move"
|
||||
"input_mode" "joystick_move"
|
||||
}
|
||||
"Camera"
|
||||
{
|
||||
"title" "#Action_Camera"
|
||||
"input_mode" "absolute_mouse"
|
||||
}
|
||||
}
|
||||
"AnalogTrigger"
|
||||
{
|
||||
"Throttle" "#Action_Throttle"
|
||||
}
|
||||
"Button"
|
||||
{
|
||||
"fire" "#Action_Fire"
|
||||
"Jump" "#Action_Jump"
|
||||
"pause_menu" "#Action_Menu"
|
||||
}
|
||||
}
|
||||
"MenuControls"
|
||||
{
|
||||
"title" "#Set_Menu"
|
||||
"StickPadGyro"
|
||||
{
|
||||
}
|
||||
"AnalogTrigger"
|
||||
{
|
||||
}
|
||||
"Button"
|
||||
{
|
||||
"menu_up" "#Menu_Up"
|
||||
"menu_down" "#Menu_Down"
|
||||
"menu_left" "#Menu_Left"
|
||||
"menu_right" "#Menu_Right"
|
||||
"menu_select" "#Menu_Select"
|
||||
"menu_cancel" "#Menu_Cancel"
|
||||
"pause_menu" "#Action_ReturnToGame"
|
||||
}
|
||||
}
|
||||
}
|
||||
"localization"
|
||||
{
|
||||
"english"
|
||||
{
|
||||
"Set_Ingame" "In-Game Controls"
|
||||
"Set_Menu" "Menu Controls"
|
||||
"Action_Move" "Movement"
|
||||
"Action_Camera" "Camera"
|
||||
"Action_Throttle" "Throttle"
|
||||
"Action_Fire" "Fire Weapon"
|
||||
"Action_Jump" "Jump"
|
||||
"Action_Menu" "Pause Menu"
|
||||
"Action_ReturnToGame" "Return To Game"
|
||||
"Menu_Up" "Up"
|
||||
"Menu_Down" "Down"
|
||||
"Menu_Left" "Left"
|
||||
"Menu_Right" "Right"
|
||||
"Menu_Select" "Select"
|
||||
"Menu_Cancel" "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,74 +0,0 @@
|
||||
"In Game Actions"
|
||||
{
|
||||
"actions"
|
||||
{
|
||||
"InGameControls"
|
||||
{
|
||||
"title" "#Set_Ingame"
|
||||
"StickPadGyro"
|
||||
{
|
||||
"Move"
|
||||
{
|
||||
"title" "#Action_Move"
|
||||
"input_mode" "joystick_move"
|
||||
}
|
||||
"Camera"
|
||||
{
|
||||
"title" "#Action_Camera"
|
||||
"input_mode" "absolute_mouse"
|
||||
}
|
||||
}
|
||||
"AnalogTrigger"
|
||||
{
|
||||
"Throttle" "#Action_Throttle"
|
||||
}
|
||||
"Button"
|
||||
{
|
||||
"fire" "#Action_Fire"
|
||||
"Jump" "#Action_Jump"
|
||||
"pause_menu" "#Action_Menu"
|
||||
}
|
||||
}
|
||||
"MenuControls"
|
||||
{
|
||||
"title" "#Set_Menu"
|
||||
"StickPadGyro"
|
||||
{
|
||||
}
|
||||
"AnalogTrigger"
|
||||
{
|
||||
}
|
||||
"Button"
|
||||
{
|
||||
"menu_up" "#Menu_Up"
|
||||
"menu_down" "#Menu_Down"
|
||||
"menu_left" "#Menu_Left"
|
||||
"menu_right" "#Menu_Right"
|
||||
"menu_select" "#Menu_Select"
|
||||
"menu_cancel" "#Menu_Cancel"
|
||||
"pause_menu" "#Action_ReturnToGame"
|
||||
}
|
||||
}
|
||||
}
|
||||
"localization"
|
||||
{
|
||||
"english"
|
||||
{
|
||||
"Set_Ingame" "In-Game Controls"
|
||||
"Set_Menu" "Menu Controls"
|
||||
"Action_Move" "Movement"
|
||||
"Action_Camera" "Camera"
|
||||
"Action_Throttle" "Throttle"
|
||||
"Action_Fire" "Fire Weapon"
|
||||
"Action_Jump" "Jump"
|
||||
"Action_Menu" "Pause Menu"
|
||||
"Action_ReturnToGame" "Return To Game"
|
||||
"Menu_Up" "Up"
|
||||
"Menu_Down" "Down"
|
||||
"Menu_Left" "Left"
|
||||
"Menu_Right" "Right"
|
||||
"Menu_Select" "Select"
|
||||
"Menu_Cancel" "Cancel"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Facepunch.Steamworks.Test/linux32/libsteam_api.so
Normal file
BIN
Facepunch.Steamworks.Test/linux32/libsteam_api.so
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/linux64/libsteam_api.so
Normal file
BIN
Facepunch.Steamworks.Test/linux64/libsteam_api.so
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/osx/libsteam_api.dylib
Normal file
BIN
Facepunch.Steamworks.Test/osx/libsteam_api.dylib
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/steam_api.lib
Normal file
BIN
Facepunch.Steamworks.Test/steam_api.lib
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/win64/steam_api64.dll
Normal file
BIN
Facepunch.Steamworks.Test/win64/steam_api64.dll
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks.Test/win64/steam_api64.lib
Normal file
BIN
Facepunch.Steamworks.Test/win64/steam_api64.lib
Normal file
Binary file not shown.
@ -88,6 +88,17 @@ public SteamId SteamId
|
||||
return InternalGetSteamID( ref id );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert to a SteamId
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public static implicit operator NetIdentity( string value )
|
||||
{
|
||||
NetIdentity id = default;
|
||||
InternalSetGenericString( ref id, value );
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns NULL if we're not a NetAddress
|
||||
@ -103,6 +114,21 @@ public NetAddress Address
|
||||
return addrptr.ToType<NetAddress>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns NULL if we're not a NetAddress
|
||||
/// </summary>
|
||||
public string GenericString
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( type != IdentityType.GenericString ) return default;
|
||||
var id = this;
|
||||
|
||||
var addrptr = InternalGetGenericString( ref id );
|
||||
return addrptr;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We override tostring to provide a sensible representation
|
||||
@ -123,4 +149,4 @@ internal enum IdentityType
|
||||
SteamID = 16
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -462,5 +463,25 @@ public static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid,
|
||||
{
|
||||
return Internal.UserHasLicenseForApp( steamid, appid );
|
||||
}
|
||||
|
||||
public static unsafe AuthTicket GetAuthSessionTicket( NetIdentity identity )
|
||||
{
|
||||
var data = Helpers.TakeBuffer( 1024 );
|
||||
|
||||
fixed ( byte* b = data )
|
||||
{
|
||||
uint ticketLength = 0;
|
||||
uint ticket = Internal.GetAuthSessionTicket( (IntPtr)b, data.Length, ref ticketLength, ref identity );
|
||||
|
||||
if ( ticket == 0 )
|
||||
return null;
|
||||
|
||||
return new AuthTicket()
|
||||
{
|
||||
Data = data.Take( (int)ticketLength ).ToArray(),
|
||||
Handle = ticket
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
Facepunch.Steamworks/linux32/libsteam_api.so
Normal file
BIN
Facepunch.Steamworks/linux32/libsteam_api.so
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks/linux64/libsteam_api.so
Normal file
BIN
Facepunch.Steamworks/linux64/libsteam_api.so
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks/osx/libsteam_api.dylib
Normal file
BIN
Facepunch.Steamworks/osx/libsteam_api.dylib
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks/steam_api.lib
Normal file
BIN
Facepunch.Steamworks/steam_api.lib
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks/win64/steam_api64.dll
Normal file
BIN
Facepunch.Steamworks/win64/steam_api64.dll
Normal file
Binary file not shown.
BIN
Facepunch.Steamworks/win64/steam_api64.lib
Normal file
BIN
Facepunch.Steamworks/win64/steam_api64.lib
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user