Skip to content

Commit

Permalink
Fix visibility not displaying for new mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwindalmir committed Oct 12, 2021
1 parent 2621969 commit 631746c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WorkshopToolCommon/Uploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ public Uploader(WorkshopType type, string path, Options.UploadVerb options, stri
m_compile = options.Compile;
m_dryrun = options.DryRun;

// Set visibilty
if (options.Visibility != null)
m_visibility = options.Visibility;
else
m_visibility = m_visibility ?? PublishedFileVisibility.Private; // If not already set, set to Private

if (string.IsNullOrEmpty(m_title))
m_title = Path.GetFileName(path);
Expand Down Expand Up @@ -315,7 +318,7 @@ public bool Publish()
else
{
InjectedMethod.ChangeLog = m_changelog;
if (WorkshopHelper.PublishItemBlocking(m_modPath, m_title, m_description, m_modId, (MyPublishedFileVisibility)(m_visibility ?? PublishedFileVisibility.Private), m_tags, m_ignoredExtensions, m_ignoredPaths, m_dlcs, out items))
if (WorkshopHelper.PublishItemBlocking(m_modPath, m_title, m_description, m_modId, (MyPublishedFileVisibility)m_visibility, m_tags, m_ignoredExtensions, m_ignoredPaths, m_dlcs, out items))
{
m_modId = items.ToWorkshopIds();
}
Expand Down

0 comments on commit 631746c

Please sign in to comment.