1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00
This commit is contained in:
Desour 2025-02-14 14:57:22 +01:00
parent 0fb8e1b398
commit 3725fb1251
6 changed files with 114 additions and 19 deletions

View file

@ -10,6 +10,18 @@
void ScriptApiSSCSM::load_mods(const std::vector<std::string> &init_paths)
{
//TODO
SSCSMEnvironment *env = getSSCSMEnv();
actionstream << "load_mods:\n";
for (const auto &p : init_paths) {
actionstream << " " << p << ":\n";
auto f = env->readVFSFile(p);
if (!f.has_value()) {
env->setFatalError("load_mods(): File doesn't exist: " + p);
return;
}
actionstream << *f << "\n";
}
}
void ScriptApiSSCSM::environment_step(float dtime)