private void OnChangesSubmittedInternal(SteamNative.SubmitItemUpdateResult_t obj, bool Failed) { if (Failed) { throw new System.Exception("CreateItemResult_t Failed"); } UpdateHandle = 0; SubmitItemUpdate = null; NeedToAgreeToWorkshopLegal = obj.UserNeedsToAcceptWorkshopLegalAgreement; Publishing = false; Error = obj.Result != SteamNative.Result.OK ? $"Error publishing changes: {obj.Result} ({NeedToAgreeToWorkshopLegal})" : null; OnChangesSubmitted?.Invoke((Result)obj.Result); }
private void OnItemCreated(SteamNative.CreateItemResult_t obj, bool Failed) { NeedToAgreeToWorkshopLegal = obj.UserNeedsToAcceptWorkshopLegalAgreement; CreateItem.Dispose(); CreateItem = null; if (obj.Result == SteamNative.Result.OK && !Failed) { Error = null; Id = obj.PublishedFileId; PublishChanges(); return; } Error = $"Error creating new file: {obj.Result} ({obj.PublishedFileId})"; Publishing = false; OnChangesSubmitted?.Invoke((Result)obj.Result); }