Skip to content

Commit

Permalink
Generate modinfo.sbmi on new upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwindalmir committed Sep 6, 2016
1 parent 35c70a6 commit 220a333
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SEBatchModTool/Uploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,18 @@ public bool Compile()
/// <returns></returns>
public bool Publish()
{
bool newMod = false;

// Upload/Publish
if (m_modId == 0)
{
System.Console.WriteLine("Uploading new mod: {0}", m_title);
newMod = true;
}
else
{
System.Console.WriteLine("Updating mod: {0}; {1}", m_title, m_modId);
}

if (m_dryrun)
{
Expand Down Expand Up @@ -139,6 +146,18 @@ public bool Publish()
else
{
System.Console.WriteLine("Upload/Publish success: {0}", m_modId);
if (newMod)
{
if (MySteamWorkshop.GenerateModInfo(m_modPath, m_modId, MySteam.UserId))
{
System.Console.WriteLine("Create modinfo.sbmi success: {0}", m_modId);
}
else
{
System.Console.WriteLine("Create modinfo.sbmi FAILED: {0}", m_modId);
return false;
}
}
}
}
return true;
Expand Down

0 comments on commit 220a333

Please sign in to comment.