1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#include "ScriptCommand.h"
#include "icommandsystem.h"
namespace script
{
ScriptCommand::ScriptCommand(const std::string& name,
const std::string& displayName,
const std::string& scriptFilename) :
_name(name),
_displayName(displayName),
_scriptFilename(scriptFilename)
{
// Register this with the command system
GlobalCommandSystem().addStatement(_name, "RunScriptCommand '" + _name + "'", false);
}
ScriptCommand::~ScriptCommand()
{
GlobalCommandSystem().removeCommand(_name);
}
} // namespace script
|