mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
ignore empty.lua and empty scripts (#769)
* ignore empty.lua and empty scripts and return early if it's an ignored script * return it else if logic
This commit is contained in:
parent
14d4bf3cc5
commit
c552f46780
@ -848,17 +848,13 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr
|
|||||||
else if (scriptName == "scripts\\zone\\LUPs\\WBL_generic_zone.lua")
|
else if (scriptName == "scripts\\zone\\LUPs\\WBL_generic_zone.lua")
|
||||||
script = new WblGenericZone();
|
script = new WblGenericZone();
|
||||||
|
|
||||||
//Ignore these scripts:
|
// handle invalid script reporting if the path is greater than zero and it's not an ignored script
|
||||||
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_SUSPEND_LUA_AI.lua")
|
// information not really needed for sys admins but is for developers
|
||||||
script = invalidToReturn;
|
|
||||||
else if (scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_SPIDERLING.lua")
|
|
||||||
script = invalidToReturn;
|
|
||||||
else if (script == invalidToReturn) {
|
else if (script == invalidToReturn) {
|
||||||
if (scriptName.length() > 0)
|
if ((scriptName.length() > 0) && !((scriptName == "scripts\\02_server\\Enemy\\General\\L_SUSPEND_LUA_AI.lua") ||
|
||||||
Game::logger->LogDebug("CppScripts", "Attempted to load CppScript for '%s', but returned InvalidScript.", scriptName.c_str());
|
(scriptName == "scripts\\02_server\\Enemy\\General\\L_BASE_ENEMY_SPIDERLING.lua") ||
|
||||||
// information not really needed for sys admins but is for developers
|
(scriptName == "scripts\\empty.lua")
|
||||||
|
)) Game::logger->LogDebug("CppScripts", "LOT %i attempted to load CppScript for '%s', but returned InvalidScript.", parent->GetLOT(), scriptName.c_str());
|
||||||
script = invalidToReturn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Scripts[scriptName] = script;
|
m_Scripts[scriptName] = script;
|
||||||
|
Loading…
Reference in New Issue
Block a user