(9d0bc3391) Fixed console error when attempting to publish a sub with no preview image in the workshop
This commit is contained in:
@@ -740,6 +740,8 @@ namespace Barotrauma
|
|||||||
itemEditor.Tags.Add("Submarine");
|
itemEditor.Tags.Add("Submarine");
|
||||||
itemEditor.Description = sub.Description;
|
itemEditor.Description = sub.Description;
|
||||||
|
|
||||||
|
if (sub.PreviewImage != null)
|
||||||
|
{
|
||||||
string previewImagePath = Path.GetFullPath(Path.Combine(SteamManager.WorkshopItemStagingFolder, SteamManager.PreviewImageName));
|
string previewImagePath = Path.GetFullPath(Path.Combine(SteamManager.WorkshopItemStagingFolder, SteamManager.PreviewImageName));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -760,6 +762,7 @@ namespace Barotrauma
|
|||||||
itemEditor.PreviewImage = null;
|
itemEditor.PreviewImage = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void CreateWorkshopItem(ContentPackage contentPackage)
|
private void CreateWorkshopItem(ContentPackage contentPackage)
|
||||||
{
|
{
|
||||||
SteamManager.CreateWorkshopItemStaging(new List<ContentFile>(), out itemEditor, out itemContentPackage);
|
SteamManager.CreateWorkshopItemStaging(new List<ContentFile>(), out itemEditor, out itemContentPackage);
|
||||||
|
|||||||
Reference in New Issue
Block a user