mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 05:58:07 +03:00
Merged from master
This commit is contained in:
commit
061e3b252b
@ -52,6 +52,8 @@ namespace Facepunch.Steamworks
|
|||||||
//
|
//
|
||||||
Voice = new Voice( this );
|
Voice = new Voice( this );
|
||||||
|
|
||||||
|
Workshop.friends = Friends;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cache common, unchanging info
|
// Cache common, unchanging info
|
||||||
|
@ -30,8 +30,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>
|
<DocumentationFile>bin\Release\Facepunch.Steamworks.XML</DocumentationFile>
|
||||||
</DocumentationFile>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug64|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug64|AnyCPU'">
|
||||||
|
@ -151,14 +151,27 @@ namespace Facepunch.Steamworks
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int YourVote = 0;
|
||||||
|
|
||||||
|
|
||||||
public void VoteUp()
|
public void VoteUp()
|
||||||
{
|
{
|
||||||
|
if ( YourVote == 1 ) return;
|
||||||
|
if ( YourVote == -1 ) VotesDown--;
|
||||||
|
|
||||||
|
VotesUp++;
|
||||||
workshop.ugc.SetUserItemVote( Id, true );
|
workshop.ugc.SetUserItemVote( Id, true );
|
||||||
|
YourVote = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VoteDown()
|
public void VoteDown()
|
||||||
{
|
{
|
||||||
|
if ( YourVote == -1 ) return;
|
||||||
|
if ( YourVote == 1 ) VotesUp--;
|
||||||
|
|
||||||
|
VotesDown++;
|
||||||
workshop.ugc.SetUserItemVote( Id, false );
|
workshop.ugc.SetUserItemVote( Id, false );
|
||||||
|
YourVote = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Editor Edit()
|
public Editor Edit()
|
||||||
@ -186,6 +199,29 @@ namespace Facepunch.Steamworks
|
|||||||
public int WebsiteViews { get; internal set; }
|
public int WebsiteViews { get; internal set; }
|
||||||
public int ReportScore { get; internal set; }
|
public int ReportScore { get; internal set; }
|
||||||
public string PreviewImageUrl { get; internal set; }
|
public string PreviewImageUrl { get; internal set; }
|
||||||
|
|
||||||
|
string _ownerName = null;
|
||||||
|
|
||||||
|
public string OwnerName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if ( _ownerName == null && workshop.friends != null )
|
||||||
|
{
|
||||||
|
_ownerName = workshop.friends.GetName( OwnerId );
|
||||||
|
if ( _ownerName == "[unknown]" )
|
||||||
|
{
|
||||||
|
_ownerName = null;
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _ownerName == null )
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
return _ownerName;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ namespace Facepunch.Steamworks
|
|||||||
public int PerPage { get; set; } = SteamResponseSize;
|
public int PerPage { get; set; } = SteamResponseSize;
|
||||||
|
|
||||||
internal Workshop workshop;
|
internal Workshop workshop;
|
||||||
|
internal Friends friends;
|
||||||
|
|
||||||
private int _resultPage = 0;
|
private int _resultPage = 0;
|
||||||
private int _resultsRemain = 0;
|
private int _resultsRemain = 0;
|
||||||
|
@ -9,6 +9,7 @@ namespace Facepunch.Steamworks
|
|||||||
internal const ulong InvalidHandle = 0xffffffffffffffff;
|
internal const ulong InvalidHandle = 0xffffffffffffffff;
|
||||||
|
|
||||||
internal SteamNative.SteamUGC ugc;
|
internal SteamNative.SteamUGC ugc;
|
||||||
|
internal SteamNative.Friends friends;
|
||||||
internal BaseSteamworks steamworks;
|
internal BaseSteamworks steamworks;
|
||||||
internal SteamNative.SteamRemoteStorage remoteStorage;
|
internal SteamNative.SteamRemoteStorage remoteStorage;
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ namespace Facepunch.Steamworks
|
|||||||
ugc = null;
|
ugc = null;
|
||||||
steamworks = null;
|
steamworks = null;
|
||||||
remoteStorage = null;
|
remoteStorage = null;
|
||||||
|
friends = null;
|
||||||
|
|
||||||
OnFileDownloaded = null;
|
OnFileDownloaded = null;
|
||||||
OnItemInstalled = null;
|
OnItemInstalled = null;
|
||||||
@ -52,7 +54,8 @@ namespace Facepunch.Steamworks
|
|||||||
return new Query()
|
return new Query()
|
||||||
{
|
{
|
||||||
AppId = steamworks.AppId,
|
AppId = steamworks.AppId,
|
||||||
workshop = this
|
workshop = this,
|
||||||
|
friends = friends
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTitle("Facepunch.Steamworks")]
|
[assembly: AssemblyTitle("Facepunch.Steamworks")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("Facepunch Studios Ltd")]
|
||||||
[assembly: AssemblyProduct("Facepunch.Steamworks")]
|
[assembly: AssemblyProduct("Facepunch.Steamworks")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user