Files
Mindustry/core/assets/scripts/base.js

20 lines
764 B
JavaScript
Raw Normal View History

2019-12-07 14:10:39 -05:00
const log = function(context, obj){
Vars.mods.getScripts().log(context, obj ? String(obj) : "null")
2019-12-03 17:16:23 -05:00
}
2019-12-06 22:24:32 -05:00
const extendContent = function(classType, name, params){
2019-12-07 15:41:52 -05:00
return new JavaAdapter(classType, params, name)
}
2019-12-06 22:24:32 -05:00
const extend = function(classType, params){
return new JavaAdapter(classType, params)
2019-12-08 18:34:23 -05:00
}
const run = method => new java.lang.Runnable(){run: method}
2019-12-08 22:50:54 -05: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-08 18:34:23 -05:00
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
2019-12-26 23:00:26 -05:00
Call = Packages.io.anuke.mindustry.gen.Call
const Calls = Call //backwards compat