Add back "Name already taken" message

This commit is contained in:
jacob1 2021-08-28 00:02:19 -04:00
parent 44590d82e9
commit 4f36ab10c1
No account linked to committer's email address

View File

@ -158,7 +158,11 @@ void GOLWindow::Validate()
auto color1 = (((highColour.Red << 8) | highColour.Green) << 8) | highColour.Blue;
auto color2 = (((lowColour.Red << 8) | lowColour.Green) << 8) | lowColour.Blue;
AddCustomGol(ruleString, nameString, color1, color2);
if (!AddCustomGol(ruleString, nameString, color1, color2))
{
new ErrorMessage("Could not add GOL type", "Name already taken");
return;
}
tool->gameModel->SelectNextIdentifier = "DEFAULT_PT_LIFECUST_" + nameString.ToAscii();
tool->gameModel->SelectNextTool = toolSelection;