Error checking now active for start-ep
You can no longer have both start-value and start-percentage.
This commit is contained in:
parent
a65898571d
commit
94667b9ab9
|
@ -250,6 +250,14 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree,
|
|||
}
|
||||
addItemToVault(&(this->epRegeneration),this->epRegeneration);
|
||||
|
||||
// Check that we don't use both start-value and start-percentage, as they are mutually
|
||||
// exclusive
|
||||
if(parametersNode->getChild("max-ep")->hasAttribute("start-value") &&
|
||||
parametersNode->getChild("max-ep")->hasAttribute("start-percentage")) {
|
||||
throw megaglest_runtime_error("Unit " + name +
|
||||
" has both start-value and start-percentage for EP", validationMode);
|
||||
}
|
||||
|
||||
//startEpValue -- the *absolute* value to use for starting EP
|
||||
if(parametersNode->getChild("max-ep")->hasAttribute("start-value")) {
|
||||
//checkItemInVault(&(this->startEp),this->startEp);
|
||||
|
|
Loading…
Reference in New Issue