In the embeded lua environment (World of Warcraft - WoW) is missing the require
function.
I want port one existing lua source code (an great OO-library) for the use it in the WoW. The library itself is relatively small (approx 8 small files) but of course it heavily uses the require
.
World of Warcraft loads files and libraries by defining it in an XML file, like:
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="LibOne.lua"/>
<Script file="LibTwo.lua"/>
</Ui>
but i don't know how the low level library manipulation is done in the WoW.
AFAIK in the WoW is missing even the package.
table too. :(
So the question(s): For me, the streamlined way would be write an function which will emulate the require
function using the interface available in WoW. The question is how. Could someone give me some directions?
Or as alternative, for the porting the mentioned existing source to WoW, I need replace the require Some.Other.Module
lines in the lua sources to something what WoW will understand. What is the equivalent/replacement for such require Some.Module
in the WoW?
How the WoW handles modules/libraries at low-level?
loaded
? Can you go more into detail? – Tallowy