mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 07:08:05 +03:00
ISteamUGC.RequestUGCDetails is deprecated
This commit is contained in:
parent
abb4b7f6b6
commit
0beaeb2e9d
@ -35,6 +35,7 @@ namespace Steamworks
|
|||||||
Console.WriteLine( $"Description: {itemInfo?.Description}" );
|
Console.WriteLine( $"Description: {itemInfo?.Description}" );
|
||||||
Console.WriteLine( $"Owner: {itemInfo?.Owner}" );
|
Console.WriteLine( $"Owner: {itemInfo?.Owner}" );
|
||||||
Console.WriteLine( $"Score: {itemInfo?.Score}" );
|
Console.WriteLine( $"Score: {itemInfo?.Score}" );
|
||||||
|
Console.WriteLine( $"PreviewImageUrl: {itemInfo?.PreviewImageUrl}" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -438,17 +438,6 @@ namespace Steamworks
|
|||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region FunctionMeta
|
|
||||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RequestUGCDetails", CallingConvention = Platform.CC)]
|
|
||||||
private static extern SteamAPICall_t _RequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds );
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
internal CallResult<SteamUGCRequestUGCDetailsResult_t> RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds )
|
|
||||||
{
|
|
||||||
var returnValue = _RequestUGCDetails( Self, nPublishedFileID, unMaxAgeSeconds );
|
|
||||||
return new CallResult<SteamUGCRequestUGCDetailsResult_t>( returnValue, IsServer );
|
|
||||||
}
|
|
||||||
|
|
||||||
#region FunctionMeta
|
#region FunctionMeta
|
||||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem", CallingConvention = Platform.CC)]
|
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem", CallingConvention = Platform.CC)]
|
||||||
private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
|
private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
|
||||||
|
@ -217,10 +217,15 @@ namespace Steamworks.Ugc
|
|||||||
|
|
||||||
public static async Task<Item?> GetAsync( PublishedFileId id, int maxageseconds = 60 * 30 )
|
public static async Task<Item?> GetAsync( PublishedFileId id, int maxageseconds = 60 * 30 )
|
||||||
{
|
{
|
||||||
var result = await SteamUGC.Internal.RequestUGCDetails( id, (uint) maxageseconds );
|
var file = await Steamworks.Ugc.Query.All
|
||||||
if ( !result.HasValue ) return null;
|
.WithFileId( id )
|
||||||
|
.WithLongDescription( true )
|
||||||
|
.GetPageAsync( 1 );
|
||||||
|
|
||||||
return From( result.Value.Details );
|
if ( !file.HasValue ) return null;
|
||||||
|
if ( file.Value.ResultCount == 0 ) return null;
|
||||||
|
|
||||||
|
return file.Value.Entries.First();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Item From( SteamUGCDetails_t details )
|
internal static Item From( SteamUGCDetails_t details )
|
||||||
|
@ -166,6 +166,8 @@ public static class Cleanup
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( name == "ISteamUGC.RequestUGCDetails" ) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user