(6e187d247) Fixed contained items' status effects being added twice to the list of an ItemContainer's active status effects when swapping items. For example, when swapping a fuel rod with another one, the status effect that increases AvailableFuel would be applied twice, causing the reactor to act as if there were 2 rods in it. Closes #1643 + merge fix
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Facepunch.Steamworks
|
||||
public bool Publishing { get; internal set; }
|
||||
public ItemType? Type { get; set; }
|
||||
public string Error { get; internal set; } = null;
|
||||
public SteamNative.Result? ErrorCode { get; internal set; } = null;
|
||||
public string ChangeNote { get; set; } = "";
|
||||
public uint WorkshopUploadAppId { get; set; }
|
||||
public string MetaData { get; set; } = null;
|
||||
@@ -99,6 +100,7 @@ namespace Facepunch.Steamworks
|
||||
|
||||
Publishing = true;
|
||||
Error = null;
|
||||
ErrorCode = null;
|
||||
|
||||
if ( Id == 0 )
|
||||
{
|
||||
@@ -129,12 +131,14 @@ namespace Facepunch.Steamworks
|
||||
if ( obj.Result == SteamNative.Result.OK && !Failed )
|
||||
{
|
||||
Error = null;
|
||||
ErrorCode = null;
|
||||
Id = obj.PublishedFileId;
|
||||
PublishChanges();
|
||||
return;
|
||||
}
|
||||
|
||||
Error = $"Error creating new file: {obj.Result} ({obj.PublishedFileId})";
|
||||
ErrorCode = obj.Result;
|
||||
Publishing = false;
|
||||
|
||||
OnChangesSubmitted?.Invoke( (Result) obj.Result );
|
||||
@@ -221,6 +225,7 @@ namespace Facepunch.Steamworks
|
||||
NeedToAgreeToWorkshopLegal = obj.UserNeedsToAcceptWorkshopLegalAgreement;
|
||||
Publishing = false;
|
||||
|
||||
ErrorCode = obj.Result;
|
||||
Error = obj.Result != SteamNative.Result.OK
|
||||
? $"Error publishing changes: {obj.Result} ({NeedToAgreeToWorkshopLegal})"
|
||||
: null;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace SteamNative
|
||||
//
|
||||
// EResult
|
||||
//
|
||||
internal enum Result : int
|
||||
public enum Result : int
|
||||
{
|
||||
OK = 1,
|
||||
Fail = 2,
|
||||
|
||||
Reference in New Issue
Block a user