khanat-opennel-code/code/ryzom/common/data_common/r2/r2_init.lua
2015-03-01 18:41:16 +02:00

35 lines
881 B
Lua

-- main init function
r2.init = function ()
local function protected()
debugInfo("r2.init begin")
profileFunction(r2.registerHighLevel, "r2.registerHighLevel")
profileFunction(r2.registerBasicBricks, "r2.registerBasicBricks")
profileFunction(r2.loadFeatures, "r2.loadFeatures")
profileFunction(r2.loadPalette, "r2.loadPalette")
profileFunction(r2.setupClasses, "r2.setupClasses")
-- tmp
if r2.InClient == true then
--r2:testPropertySheet()
profileMethod(r2, "buildAllPropertySheetsAndForms", "r2:buildAllPropertySheetsAndForms")
end
-- IMPORTANT : should be called after all parameters of classes (displayers ...) have been initialized
r2.TextMgr = r2.newComponent("TextManager")
debugInfo("r2.init end")
end
local ok, errMsg = pcall(protected)
if not ok then
debugInfo("Error while initialization:'".. errMsg.."'")
end
end