Untitled
Guest 83 27th Apr, 2024
-- CONFIG
APP_NAME = "PStory" -- important, change it, it's name for config dir and files in appdata
APP_VERSION = 0102 -- client version for updater and login to identify outdated client
PATCH = "1.0.2"
--DEFAULT_LAYOUT = "dark" -- on android it's forced to "mobile", check code bellow
-- If you don't use updater or other service, set it to updater = ""
Services = {
website = "http://pokeunion.com.br/", -- currently not used
updater = "http://pokeunion.com.br/updater/updater.php",
-- stats = "http://pokeunion.com.br/api/stats.php",
-- crash = "http://pokeunion.com.br/api/crash.php",
-- feedback = "http://pokeunion.com.br/api/feedback.php",
-- status = "http://pokeunion.com.br/api/status.php"
}
-- Servers accept http login url, websocket login url or ip:port:version
InstallDlls = {
"libEGL.dll",
"libGLESv2.dll",
"d3dcompiler_46.dll",
"d3dcompiler_47.dll",
"msvcp140.dll",
"msvcp140_1.dll",
"msvcp140_2.dll",
"msvcp140_codecvt_ids.dll",
"vcamp140.dll",
"vccorlib140.dll",
"vcomp140.dll",
"vcruntime140.dll"
}
--Server = "ws://server.com:3000/"
--Server = "ws://127.0.0.1:88/"
ALLOW_CUSTOM_SERVERS = false -- if true it shows option ANOTHER on server list
g_app.setName("PStory")
-- g_app.setInstallDlls(InstallDlls)
-- CONFIG END
-- print first terminal message
g_logger.info(os.date("== application started at %b %d %Y %X"))
g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' rev ' .. g_app.getBuildRevision() .. ' (' .. g_app.getBuildCommit() .. ') made by ' .. g_app.getAuthor() .. ' built on ' .. g_app.getBuildDate() .. ' for arch ' .. g_app.getBuildArch())
if not g_resources.directoryExists("/data") then
g_logger.fatal("Data dir doesn't exist.")
end
if not g_resources.directoryExists("/modules") then
g_logger.fatal("Modules dir doesn't exist.")
end
-- settings
g_configs.loadSettings("/config.otml")
-- set layout
-- local settings = g_configs.getSettings()
-- local layout = DEFAULT_LAYOUT
-- if settings:exists('layout') then
-- layout = settings:getValue('layout')
-- end
-- g_resources.setLayout(layout)
-- load mods
g_modules.discoverModules()
g_modules.ensureModuleLoaded("corelib")
local function loadModules()
-- libraries modules 0-99
g_modules.autoLoadModules(99)
g_modules.ensureModuleLoaded("gamelib")
-- client modules 100-499
g_modules.autoLoadModules(499)
g_modules.ensureModuleLoaded("client")
-- game modules 500-999
g_modules.autoLoadModules(999)
g_modules.ensureModuleLoaded("game_interface")
-- mods 1000-9999
g_modules.autoLoadModules(9999)
end
-- report crash
if type(Services.crash) == 'string' and Services.crash:len() > 4 and g_modules.getModule("crash_reporter") then
g_modules.ensureModuleLoaded("crash_reporter")
end
-- run updater, must use data.zip
if type(Services.updater) == 'string' and Services.updater:len() > 4
and g_resources.isLoadedFromArchive() and g_modules.getModule("updater") then
g_modules.ensureModuleLoaded("updater")
return Updater.init(loadModules)
end
loadModules()
-- Preload textures
-- g_textures.preloadTexture("data/image/game/target")
To share this paste please copy this url and send to your friends
RAW Paste Data