diff --git a/core/src/mindustry/content/SerpuloTechTree.java b/core/src/mindustry/content/SerpuloTechTree.java index 6b7ab42668..e6efb47eca 100644 --- a/core/src/mindustry/content/SerpuloTechTree.java +++ b/core/src/mindustry/content/SerpuloTechTree.java @@ -2,6 +2,7 @@ package mindustry.content; import arc.struct.*; import mindustry.game.Objectives.*; +import mindustry.type.*; import static mindustry.content.Blocks.*; import static mindustry.content.SectorPresets.craters; @@ -359,7 +360,8 @@ public class SerpuloTechTree{ }); }); - node(crawler, () -> { + //override research requirements to have graphite, not coal + node(crawler, ItemStack.with(Items.silicon, 400, Items.graphite, 400), () -> { node(atrax, () -> { node(spiroct, () -> { node(arkyid, () -> { diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index ab6b1942f2..1a68d3ce6f 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1912,7 +1912,7 @@ public class UnitTypes{ trailWidth = 3f; trailLength = 8; - splashDamage = 33f; + splashDamage = 36f; splashDamageRadius = 32f; }}; }}); diff --git a/core/src/mindustry/mod/Scripts.java b/core/src/mindustry/mod/Scripts.java index 6334d2491f..3ba21c03b3 100644 --- a/core/src/mindustry/mod/Scripts.java +++ b/core/src/mindustry/mod/Scripts.java @@ -12,6 +12,7 @@ import rhino.module.provider.*; import java.io.*; import java.net.*; +import java.util.*; import java.util.regex.*; public class Scripts implements Disposable{ @@ -46,7 +47,18 @@ public class Scripts implements Disposable{ Object o = context.evaluateString(scope, text, "console.js", 1); if(o instanceof NativeJavaObject n) o = n.unwrap(); if(o == null) o = "null"; + else if(o instanceof Undefined) o = "undefined"; + + else if(o instanceof Object[] arr) o = Arrays.toString(arr); + else if(o instanceof int[] arr) o = Arrays.toString(arr); + else if(o instanceof float[] arr) o = Arrays.toString(arr); + else if(o instanceof byte[] arr) o = Arrays.toString(arr); + else if(o instanceof double[] arr) o = Arrays.toString(arr); + else if(o instanceof long[] arr) o = Arrays.toString(arr); + else if(o instanceof char[] arr) o = Arrays.toString(arr); + else if(o instanceof boolean[] arr) o = Arrays.toString(arr); + var out = o.toString(); return out == null ? "null" : out; }catch(Throwable t){ diff --git a/core/src/mindustry/type/ItemStack.java b/core/src/mindustry/type/ItemStack.java index 1da2c72231..a0e0f4c587 100644 --- a/core/src/mindustry/type/ItemStack.java +++ b/core/src/mindustry/type/ItemStack.java @@ -80,9 +80,6 @@ public class ItemStack implements Comparable{ @Override public String toString(){ - return "ItemStack{" + - "item=" + item + - ", amount=" + amount + - '}'; + return item + ": " + amount; } }