[Test] Incorrect build command is now a warning instead of an error

This commit is contained in:
mathusummut
2018-09-02 01:50:23 +02:00
parent 913ab85c35
commit 886ededb3c

View File

@@ -1161,7 +1161,9 @@ namespace Glest {
builtUnit->create();
if (builtUnitType->hasSkillClass(scBeBuilt) == false) {
throw megaglest_runtime_error("Unit [" + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].");
printf((string("Unit [") + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].").c_str());
//throw megaglest_runtime_error("Unit [" + builtUnitType->getName(false) + "] has no be_built skill, producer was [" + intToStr(unit->getId()) + " - " + unit->getType()->getName(false) + "].");
return;
}
builtUnit->setCurrSkill(scBeBuilt);