diff --git a/core/src/mindustry/mod/Scripts.java b/core/src/mindustry/mod/Scripts.java index 40143c2a3d..2fef2522fb 100644 --- a/core/src/mindustry/mod/Scripts.java +++ b/core/src/mindustry/mod/Scripts.java @@ -101,7 +101,7 @@ public class Scripts implements Disposable{ context.evaluateString(scope, "modName = \"" + currentMod.name + "\"\nscriptName = \"" + file + "\"", "initscript.js", 1, null); } context.evaluateString(scope, - wrap ? "(function(){\n" + script + "\n})();" : script, + wrap ? "(function(){'use strict';\n" + script + "\n})();" : script, file, 0, null); return true; }catch(Throwable t){ diff --git a/core/src/mindustry/world/blocks/distribution/Sorter.java b/core/src/mindustry/world/blocks/distribution/Sorter.java index 8fa77bb230..32b13be399 100644 --- a/core/src/mindustry/world/blocks/distribution/Sorter.java +++ b/core/src/mindustry/world/blocks/distribution/Sorter.java @@ -88,7 +88,7 @@ public class Sorter extends Block{ boolean isSame(Building other){ //uncomment code below to prevent sorter/gate chaining - return other != null && (other.block() instanceof Sorter/* || other.block() instanceof OverflowGate */); + return other != null && (other.block() instanceof Sorter || other.block() instanceof OverflowGate); } Building getTileTarget(Item item, Building source, boolean flip){