2019-12-08 02:10:39 +07:00
|
|
|
const log = function(context, obj){
|
2020-04-02 01:44:17 +07:00
|
|
|
Vars.mods.getScripts().log(context, String(obj))
|
2019-12-04 05:16:23 +07:00
|
|
|
}
|
|
|
|
|
2020-05-05 04:57:08 +07:00
|
|
|
const onEvent = function(event, handler){
|
|
|
|
Vars.mods.getScripts().onEvent(EventType[event], handler)
|
|
|
|
}
|
|
|
|
|
2020-02-12 05:50:16 +07:00
|
|
|
var scriptName = "base.js"
|
|
|
|
var modName = "none"
|
|
|
|
|
2020-03-06 03:58:10 +07:00
|
|
|
const print = text => log(modName + "/" + scriptName, text);
|
2020-02-12 05:50:16 +07:00
|
|
|
|
2019-12-07 10:24:32 +07:00
|
|
|
const extendContent = function(classType, name, params){
|
2019-12-08 03:41:52 +07:00
|
|
|
return new JavaAdapter(classType, params, name)
|
2019-12-07 09:57:47 +07:00
|
|
|
}
|
2019-12-07 10:24:32 +07:00
|
|
|
|
|
|
|
const extend = function(classType, params){
|
|
|
|
return new JavaAdapter(classType, params)
|
2019-12-09 06:34:23 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
2019-12-30 05:56:10 +07:00
|
|
|
Call = Packages.mindustry.gen.Call
|