mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
Don't load server rules in client.
This commit is contained in:
parent
02afb7fb73
commit
b509b8b11d
28 changed files with 90 additions and 88 deletions
|
|
@ -244,9 +244,11 @@ void observe_python_directories(boost::asio::io_service& io_service, AssetsManag
|
|||
}
|
||||
}
|
||||
|
||||
void init_python_api(std::vector<std::function<std::string()>> initFunctions, const std::string& ruleset, bool log_stdout)
|
||||
void init_python_api(std::vector<std::function<std::string()>> initFunctions, std::vector<std::string> scriptDirectories, bool log_stdout)
|
||||
{
|
||||
|
||||
python_directories = std::move(scriptDirectories);
|
||||
|
||||
std::vector<std::string> modules;
|
||||
for (auto& function : initFunctions) {
|
||||
modules.emplace_back(function());
|
||||
|
|
@ -281,12 +283,6 @@ void init_python_api(std::vector<std::function<std::string()>> initFunctions, co
|
|||
if (sys_path.isList()) {
|
||||
Py::List paths(sys_path);
|
||||
|
||||
// Add the path to the non-ruleset specific code.
|
||||
python_directories.push_back(share_directory + "/cyphesis/scripts");
|
||||
python_directories.push_back(share_directory + "/cyphesis/rulesets/basic/scripts");
|
||||
// Add the path to the ruleset specific code.
|
||||
python_directories.push_back(share_directory + "/cyphesis/rulesets/" + ruleset + "/scripts");
|
||||
|
||||
for (auto& path : python_directories) {
|
||||
paths.append(Py::String(path));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue