mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-16 10:47:40 +07:00
JS console / Scripting tweaks
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
const print = function(obj){
|
||||
java.lang.System.out.println(obj ? String(obj) : "null")
|
||||
const log = function(context, obj){
|
||||
Vars.mods.getScripts().log(context, obj ? String(obj) : "null")
|
||||
}
|
||||
|
||||
const extendContent = function(classType, name, params){
|
||||
|
@ -1,7 +1,7 @@
|
||||
//Generated class. Do not modify.
|
||||
|
||||
const print = function(obj){
|
||||
java.lang.System.out.println(obj ? String(obj) : "null")
|
||||
const log = function(context, obj){
|
||||
Vars.mods.getScripts().log(context, obj ? String(obj) : "null")
|
||||
}
|
||||
|
||||
const extendContent = function(classType, name, params){
|
||||
|
@ -1,2 +1,10 @@
|
||||
modName = "$MOD_NAME$"
|
||||
|
||||
!function(){
|
||||
|
||||
const scriptName = "$SCRIPT_NAME$"
|
||||
const print = text => log(scriptName, text);
|
||||
$CODE$
|
||||
|
||||
}();
|
||||
|
||||
|
Reference in New Issue
Block a user