mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
random scripting work-in-progress
This commit is contained in:
parent
f8430723e0
commit
a6a1e6ed1a
7 changed files with 55 additions and 24 deletions
|
@ -989,8 +989,14 @@ Server::Server(
|
|||
// Export API
|
||||
scriptapi_export(m_lua, this);
|
||||
// Load and run scripts
|
||||
script_load(m_lua, (porting::path_data + DIR_DELIM + "scripts"
|
||||
+ DIR_DELIM + "default.lua").c_str());
|
||||
std::string defaultscript = porting::path_data + DIR_DELIM
|
||||
+ "scripts" + DIR_DELIM + "default.lua";
|
||||
bool success = script_load(m_lua, defaultscript.c_str());
|
||||
if(!success){
|
||||
errorstream<<"Server: Failed to load and run "
|
||||
<<defaultscript<<std::endl;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
// Initialize Environment
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue