Merge branch 'fixes' into main/gingo-test
[ryzomcore.git] / ryzom / common / data_common / r2 / r2_init.lua
blobfc04587eddc6e1d7c0bd5071b818b6920429495b
1 -- main init function
3 r2.init = function ()
4 local function protected()
6 debugInfo("r2.init begin")
7 profileFunction(r2.registerHighLevel, "r2.registerHighLevel")
8 profileFunction(r2.registerBasicBricks, "r2.registerBasicBricks")
9 profileFunction(r2.loadFeatures, "r2.loadFeatures")
10 profileFunction(r2.loadPalette, "r2.loadPalette")
12 profileFunction(r2.setupClasses, "r2.setupClasses")
14 -- tmp
15 if r2.InClient == true then
16 --r2:testPropertySheet()
17 profileMethod(r2, "buildAllPropertySheetsAndForms", "r2:buildAllPropertySheetsAndForms")
18 end
19 -- IMPORTANT : should be called after all parameters of classes (displayers ...) have been initialized
20 r2.TextMgr = r2.newComponent("TextManager")
23 debugInfo("r2.init end")
24 end
27 local ok, errMsg = pcall(protected)
29 if not ok then
30 debugInfo("Error while initialization:'".. errMsg.."'")
31 end
34 end