mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
add getIdValidatorResult method to GenericCreator, for use in subclass
StartScriptCreator
This commit is contained in:
parent
e672880f64
commit
903cd3322b
@ -47,6 +47,16 @@ std::string CSVWorld::GenericCreator::getId() const
|
||||
return mId->text().toUtf8().constData();
|
||||
}
|
||||
|
||||
std::string CSVWorld::GenericCreator::getIdValidatorResult() const
|
||||
{
|
||||
std::string errors;
|
||||
|
||||
if (!mId->hasAcceptableInput())
|
||||
errors = mValidator->getError();
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
void CSVWorld::GenericCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const {}
|
||||
|
||||
void CSVWorld::GenericCreator::pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command,
|
||||
|
@ -60,6 +60,8 @@ namespace CSVWorld
|
||||
|
||||
virtual std::string getId() const;
|
||||
|
||||
virtual std::string getIdValidatorResult() const;
|
||||
|
||||
/// Allow subclasses to add additional data to \a command.
|
||||
virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user