2972e59e00
* Fixed dependency * Updates to NeoDictionary * Changes to NeoDictionary * Started working on a Git implementation to integrate into Game Engines in the future * Added commit functionality to the git library * New changes * Added select for NeoDictionary.cs * Fixed issue with previous new method * Added a Benchmarking Tool to be used mostly in game engines * Added IndexOf to NeoDictionary.cs * Added new method for BenchmarkUtility.cs * added an instacedobject class * Added a new shuffle method for lists * fixed return type * Added new Changelog generator * Added new Game logic library to assist with game projects * Added Web Project * Added Nuget package configs * Add workflow for publishing game library NuGet package * Add README for OmegaLeo's Helper Library * Updated Website to reflect all libraries * Fixed missing library in Changelog * Added Contributing and Code of Conduct * Fixed web project * new documentation changes * fix packages * Fixed DocumentationHelper package dependencies * Added Serilog * Added logging * Fixed documentation * Added logging for cache * fixed documentation * Updated README.md * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update OmegaLeo.HelperLib.Web/Controllers/HomeController.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix error * changes for Github Packages * Cleanup * Started working on a SteamWorks integration * Added logging * Started working on a Steam library --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
74 lines
2.4 KiB
C#
74 lines
2.4 KiB
C#
using OmegaLeo.HelperLib.Shared.Attributes;
|
|
|
|
namespace OmegaLeo.HelperLib.Steamworks
|
|
{
|
|
[Documentation(nameof(SteamUgcItemUpdateSession), "Fluent helper for editing and submitting a workshop item update.", null, null)]
|
|
public class SteamUgcItemUpdateSession
|
|
{
|
|
private readonly SteamUgcManager _ugcManager;
|
|
private readonly uint _consumerAppId;
|
|
private readonly ulong _publishedFileId;
|
|
private readonly SteamUgcItemUpdateOptions _options = new SteamUgcItemUpdateOptions();
|
|
|
|
internal SteamUgcItemUpdateSession(SteamUgcManager ugcManager, uint consumerAppId, ulong publishedFileId)
|
|
{
|
|
_ugcManager = ugcManager;
|
|
_consumerAppId = consumerAppId;
|
|
_publishedFileId = publishedFileId;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithTitle(string title)
|
|
{
|
|
_options.Title = title;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithDescription(string description)
|
|
{
|
|
_options.Description = description;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithMetadata(string metadata)
|
|
{
|
|
_options.Metadata = metadata;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithVisibility(uint visibility)
|
|
{
|
|
_options.Visibility = visibility;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithTags(params string[] tags)
|
|
{
|
|
_options.Tags = tags;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithContentFolder(string contentFolder)
|
|
{
|
|
_options.ContentFolder = contentFolder;
|
|
return this;
|
|
}
|
|
|
|
public SteamUgcItemUpdateSession WithPreviewFile(string previewFile)
|
|
{
|
|
_options.PreviewFile = previewFile;
|
|
return this;
|
|
}
|
|
|
|
[Documentation(nameof(Submit), "Submits the fluent update session and returns a Steam API call handle.", new[]
|
|
{
|
|
"changeNote: Changelog note for this update.",
|
|
"failedStep: Name of the failed step if submission returns 0."
|
|
}, null)]
|
|
public ulong Submit(string changeNote, out string failedStep)
|
|
{
|
|
return _ugcManager.UpdateItem(_consumerAppId, _publishedFileId, _options, changeNote, out failedStep);
|
|
}
|
|
}
|
|
}
|
|
|