MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / executeCommand

Method executeCommand

plugins/script/ScriptingSystem.cpp:125–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void ScriptingSystem::executeCommand(const std::string& name)
126{
127 // Sanity check
128 if (!_initialised)
129 {
130 rError() << "Cannot execute script command " << name
131 << ", ScriptingSystem not initialised yet." << std::endl;
132 return;
133 }
134
135 // Lookup the name
136 auto found = _commands.find(name);
137
138 if (found == _commands.end())
139 {
140 rError() << "Couldn't find command " << name << std::endl;
141 return;
142 }
143
144 UndoableCommand cmd("runScriptCommand " + name);
145
146 // Execute the script file behind this command
147 executeScriptFile(found->second->getFilename(), true);
148}
149
150void ScriptingSystem::loadCommandScript(const std::string& scriptFilename)
151{

Callers 15

testFacePlaneMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
runConverterCodeFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
performComparisonFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 4

rErrorFunction · 0.85
findMethod · 0.45
endMethod · 0.45
getFilenameMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
loadMapMethod · 0.36