- Joined
- Mar 27, 2012
- Messages
- 3,232
This feature would have to be evaluated before textmacros to allow true dynamic textmacros.
Source
Result after extendors and libraries have been evaluated.
Extendors can also be declared with an optional priority parameter
Extendors with a lower priority number are copied first into the script. For example, with priorities (4,1,-5,0) the order of extendors would be:
-5
0
1
4
If priority is not defined, it is assumed to be 0.
Installation instructions
Extract all files from inside the archive into your jass newgen pack folder. Note that wehack.lua will be replaced, so you might want to back it up before installing.
Open the importextendor.lua file and change newgenpath to what it is on your machine.
Source
JASS:
library Main
globals
//# runextendor SomenameGlobals
endglobals
//# runextendor SomenameMethods
endlibrary
library Lib1 requires Main
//# extendor SomenameGlobals
//unit NewUnitA
//# endextendor
//# extendor SomenameMethod
//function CreateUnitA takes nothing returns unit
//set NewUnitA = stuff
//endfunction
//# endextendor
endlibrary
library Lib2 requires Main
//# extendor SomenameGlobals
//unit NewUnitB
//# endextendor
endlibrary
library Lib3 requires Main
//# extendor SomenameGlobals
//unit NewUnitC
//# endextendor
endlibrary
Result after extendors and libraries have been evaluated.
JASS:
globals
unit NewUnitA
unit NewUnitB
unit NewUnitC
endglobals
function CreateUnitA takes nothing returns unit
set NewUnitA = stuff
endfunction
Extendors can also be declared with an optional priority parameter
JASS:
//# extendor SomeName 9
-5
0
1
4
If priority is not defined, it is assumed to be 0.
Installation instructions
Extract all files from inside the archive into your jass newgen pack folder. Note that wehack.lua will be replaced, so you might want to back it up before installing.
Open the importextendor.lua file and change newgenpath to what it is on your machine.
Attachments
Last edited: