Well, that's sort of what I was trying to do, however trying to use
Context.defineType(...) results in "Type name nrex.core.Dummy is redefined from module nrex.core.Dummy". Here's the function, that gets called on
@:build on
nrex.core.Game class. I have never used
defineType before, that's why the created type is empty.
macro public static function buildGame(): Array<Field>{
Context.onAfterTyping(function(modules: Array<ModuleType> ){
Context.defineType({
fields: [],
isExtern: false,
kind: TDClass(null, [], false),
meta: null,
name: "Dummy",
pack: ["nrex", "core", "Dummy"],
params: null,
pos: Context.currentPos()
});
});
return Context.getBuildFields();