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-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 run = method => new java.lang.Runnable(){run: method}
|
2019-12-09 10:50:54 +07:00
|
|
|
const boolf = method => new Boolf(){get: method}
|
|
|
|
const boolp = method => new Boolp(){get: method}
|
|
|
|
const cons = method => new Cons(){get: method}
|
|
|
|
const prov = method => new Prov(){get: method}
|
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
|
2020-02-06 06:36:56 +07:00
|
|
|
const Calls = Call //backwards compat
|