MCPcopy Create free account
hub / github.com/DFHack/dfhack / script

Method script

library/Commands.cpp:433–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431 }
432
433 command_result Commands::script(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
434 {
435 if (parts.size() == 1)
436 {
437 core.loadScriptFile(con, std::filesystem::weakly_canonical(std::filesystem::path{parts[0]}), false);
438 return CR_OK;
439 }
440 else
441 {
442 con << "Usage:" << std::endl
443 << " script <filename>" << std::endl;
444 return CR_WRONG_USAGE;
445 }
446 }
447
448 command_result Commands::show(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
449 {

Callers

nothing calls this directly

Calls 2

loadScriptFileMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected