|
|
@ -742,14 +742,22 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
|
|
|
|
|
|
|
|
|
|
|
|
for (uint i = 0; i < zonesAdded.size(); i++)
|
|
|
|
for (uint i = 0; i < zonesAdded.size(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CSString luaScript;
|
|
|
|
|
|
|
|
string luaScriptName = CPath::lookup(zonesAdded[i]+".lua", false);
|
|
|
|
string luaScriptName = CPath::lookup(zonesAdded[i]+".lua", false);
|
|
|
|
|
|
|
|
|
|
|
|
if (!luaScriptName.empty())
|
|
|
|
if (!luaScriptName.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
luaScript.readFromFile(luaScriptName);
|
|
|
|
CIFile in;
|
|
|
|
|
|
|
|
if (in.open(luaScriptName))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string luaScript;
|
|
|
|
|
|
|
|
if (in.readAll(luaScript))
|
|
|
|
|
|
|
|
{
|
|
|
|
CLuaManager::getInstance().executeLuaScript(luaScript, true);
|
|
|
|
CLuaManager::getInstance().executeLuaScript(luaScript, true);
|
|
|
|
nlinfo("loading %s", luaScriptName.c_str());
|
|
|
|
nlinfo("loading %s", luaScriptName.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nlinfo("file not found %s", luaScriptName.c_str());
|
|
|
|
nlinfo("file not found %s", luaScriptName.c_str());
|
|
|
|