Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions Knossos.NET/ViewModels/Windows/DevModCreateNewViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public DevModCreateNewViewModel(Window dialog)

private async Task<bool> Verify()
{
bool displayWarningID = false;
//Is library set?
if(Knossos.GetKnossosLibraryPath() == null )
{
Expand Down Expand Up @@ -132,8 +133,16 @@ private async Task<bool> Verify()
}
if (await Nebula.IsModIdInNebula(ModId))
{
await MessageBox.Show(MainWindow.instance, "Mod ID already exist in Nebula: " + ModId, "Validation error", MessageBox.MessageBoxButtons.OK);
return false;
var editableIds = await Nebula.GetEditableModIDs();
if (editableIds != null && editableIds.Contains(ModId))
{
displayWarningID = true;
}
else
{
await MessageBox.Show(MainWindow.instance, "Mod id already exist in Nebula: " + ModId, "Validation error", MessageBox.MessageBoxButtons.OK);
return false;
}
}
if (Knossos.GetInstalledModList(ModId).Any() || Knossos.GetInstalledBuildsList(ModId).Any())
{
Expand Down Expand Up @@ -207,6 +216,13 @@ private async Task<bool> Verify()
}
}
}

if(displayWarningID)
{
var res = await MessageBox.Show(MainWindow.instance, "This mod id already exists in Nebula, if there are uploaded versions of this mod you WILL override metadata for those versions if you try to upload something.", "ModID exists and you have write access to it", MessageBox.MessageBoxButtons.ContinueCancel);
return res == MessageBox.MessageBoxResult.Continue;
}

return true;
}

Expand Down