Achievement.Name/Description

This commit is contained in:
Garry Newman 2019-04-16 20:57:17 +01:00
parent 7e02ad736d
commit ebc1336da3
2 changed files with 10 additions and 2 deletions

View File

@ -16,9 +16,11 @@ namespace Steamworks
{
foreach ( var a in SteamUserStats.Achievements )
{
Console.WriteLine( $"{a.Value}" );
Console.WriteLine( $"{a.Identifier}" );
Console.WriteLine( $" a.State: {a.State}" );
Console.WriteLine( $" a.UnlockTime: {a.UnlockTime}" );
Console.WriteLine( $" a.Name: {a.Name}" );
Console.WriteLine( $" a.Description: {a.Description}" );
Console.WriteLine( $" a.GlobalUnlockedPercentage: {a.GlobalUnlockedPercentage}" );
var icon = a.GetIcon();

View File

@ -8,7 +8,7 @@ namespace Steamworks.Data
{
public struct Achievement
{
public string Value;
internal string Value;
public Achievement( string name )
{
@ -30,6 +30,12 @@ namespace Steamworks.Data
}
}
public string Identifier => Value;
public string Name => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "name" );
public string Description => SteamUserStats.Internal.GetAchievementDisplayAttribute( Value, "desc" );
/// <summary>
/// Should hold the unlock time if State is true