parent
351115d9d9
commit
d39ca7de10
|
@ -13,7 +13,7 @@ Beyond of it's flexibility with scripts, otclient comes with tons of other featu
|
||||||
the creation of new client side stuff in otserv that was not possible before. These include,
|
the creation of new client side stuff in otserv that was not possible before. These include,
|
||||||
sound system, graphics effects with shaders, particle engines, modules/addons system, animated textures,
|
sound system, graphics effects with shaders, particle engines, modules/addons system, animated textures,
|
||||||
styleable user interface, transparency, multi language, in game lua terminal, an OpenGL 1.1/2.0 ES engine that make possible to
|
styleable user interface, transparency, multi language, in game lua terminal, an OpenGL 1.1/2.0 ES engine that make possible to
|
||||||
run on mobile platforms like Androi/iPhon/iPad and much more. Otclient is also flexible enough to
|
run on mobile platforms like Android/iPhone/iPad and much more. Otclient is also flexible enough to
|
||||||
create tibia tools like map editors just using scripts, because it wasn't designed to be just a
|
create tibia tools like map editors just using scripts, because it wasn't designed to be just a
|
||||||
client, instead otclient was designed to be a combination of a framework and tibia APIs.
|
client, instead otclient was designed to be a combination of a framework and tibia APIs.
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,25 @@ function cycleEvent(callback, front)
|
||||||
return event
|
return event
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function periodicalEvent(eventFunc, conditionFunc, delay, autoRepeatDelay)
|
||||||
|
delay = delay or 30
|
||||||
|
autoRepeatDelay = autoRepeatDelay or delay
|
||||||
|
|
||||||
|
local func
|
||||||
|
func = function()
|
||||||
|
if conditionFunc and not conditionFunc() then
|
||||||
|
func = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
eventFunc()
|
||||||
|
scheduleEvent(func, delay)
|
||||||
|
end
|
||||||
|
|
||||||
|
scheduleEvent(function()
|
||||||
|
func()
|
||||||
|
end, autoRepeatDelay)
|
||||||
|
end
|
||||||
|
|
||||||
function removeEvent(event)
|
function removeEvent(event)
|
||||||
if event then
|
if event then
|
||||||
event:cancel()
|
event:cancel()
|
||||||
|
|
|
@ -62,7 +62,7 @@ void ResourceManager::discoverWorkDir(const std::string& appName, const std::str
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found)
|
if(!found)
|
||||||
g_logger.fatal("Unable to find application work directory.");
|
g_logger.fatal(stdext::format("Unable to find %s, the application cannot be initialized.", existentFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ResourceManager::setupWriteDir(const std::string& appWriteDirName)
|
bool ResourceManager::setupWriteDir(const std::string& appWriteDirName)
|
||||||
|
|
Loading…
Reference in New Issue