1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add unit tests for SAO load / unload behaviour

This commit is contained in:
sfan5 2024-03-03 19:51:49 +01:00
parent 8339594206
commit e3b9828f24
8 changed files with 332 additions and 7 deletions

View file

@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "server.h"
#include "log.h"
#include "settings.h"
#include "filesys.h"
#include "cpp_api/s_internal.h"
#include "lua_api/l_areastore.h"
#include "lua_api/l_auth.h"
@ -89,6 +90,12 @@ ServerScripting::ServerScripting(Server* server):
infostream << "SCRIPTAPI: Initialized game modules" << std::endl;
}
void ServerScripting::loadBuiltin()
{
loadMod(Server::getBuiltinLuaPath() + DIR_DELIM "init.lua", BUILTIN_MOD_NAME);
checkSetByBuiltin();
}
void ServerScripting::saveGlobals()
{
SCRIPTAPI_PRECHECKHEADER