@@ -11,8 +11,8 @@ const readBytes = path => Vars.mods.getScripts().readBytes(path)
|
|||||||
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
||||||
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
||||||
|
|
||||||
var scriptName = "base.js"
|
let scriptName = "base.js"
|
||||||
var modName = "none"
|
let modName = "none"
|
||||||
|
|
||||||
const print = text => log(modName + "/" + scriptName, text);
|
const print = text => log(modName + "/" + scriptName, text);
|
||||||
|
|
||||||
@@ -82,6 +82,7 @@ importPackage(Packages.mindustry.maps.generators)
|
|||||||
importPackage(Packages.mindustry.maps.planet)
|
importPackage(Packages.mindustry.maps.planet)
|
||||||
importPackage(Packages.mindustry.net)
|
importPackage(Packages.mindustry.net)
|
||||||
importPackage(Packages.mindustry.type)
|
importPackage(Packages.mindustry.type)
|
||||||
|
importPackage(Packages.mindustry.type.weather)
|
||||||
importPackage(Packages.mindustry.ui)
|
importPackage(Packages.mindustry.ui)
|
||||||
importPackage(Packages.mindustry.ui.dialogs)
|
importPackage(Packages.mindustry.ui.dialogs)
|
||||||
importPackage(Packages.mindustry.ui.fragments)
|
importPackage(Packages.mindustry.ui.fragments)
|
||||||
@@ -137,6 +138,7 @@ const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
|
|||||||
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
|
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
|
||||||
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
|
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
|
||||||
const LaunchItemEvent = Packages.mindustry.game.EventType.LaunchItemEvent
|
const LaunchItemEvent = Packages.mindustry.game.EventType.LaunchItemEvent
|
||||||
|
const SectorInvasionEvent = Packages.mindustry.game.EventType.SectorInvasionEvent
|
||||||
const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent
|
const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent
|
||||||
const WorldLoadEvent = Packages.mindustry.game.EventType.WorldLoadEvent
|
const WorldLoadEvent = Packages.mindustry.game.EventType.WorldLoadEvent
|
||||||
const ClientLoadEvent = Packages.mindustry.game.EventType.ClientLoadEvent
|
const ClientLoadEvent = Packages.mindustry.game.EventType.ClientLoadEvent
|
||||||
|
|||||||
@@ -877,6 +877,13 @@ block-loader
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-loader-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1267, 529
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
block-unloader
|
block-unloader
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1231, 235
|
xy: 1231, 235
|
||||||
@@ -884,6 +891,13 @@ block-unloader
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-unloader-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1231, 235
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
mass-driver-base
|
mass-driver-base
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1009, 5
|
xy: 1009, 5
|
||||||
@@ -1262,6 +1276,13 @@ block-forge
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-forge-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1267, 725
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
disassembler
|
disassembler
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1739, 1389
|
xy: 1739, 1389
|
||||||
@@ -1759,6 +1780,13 @@ block-core-shard-full
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
core-shard-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1267, 921
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
block-cyclone-full
|
block-cyclone-full
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1267, 823
|
xy: 1267, 823
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
@@ -158,6 +158,13 @@ block-loader
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-loader-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1899, 2937
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
block-unloader
|
block-unloader
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1644, 2741
|
xy: 1644, 2741
|
||||||
@@ -165,6 +172,13 @@ block-unloader
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-unloader-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 1644, 2741
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
bridge-arrow
|
bridge-arrow
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2361, 1644
|
xy: 2361, 1644
|
||||||
@@ -1992,6 +2006,13 @@ block-forge
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
block-forge-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 3281, 2695
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
coal-centrifuge
|
coal-centrifuge
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 3874, 2651
|
xy: 3874, 2651
|
||||||
@@ -3812,6 +3833,13 @@ block-core-shard-full
|
|||||||
orig: 96, 96
|
orig: 96, 96
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
core-shard-icon-logic
|
||||||
|
rotate: false
|
||||||
|
xy: 3379, 2903
|
||||||
|
size: 96, 96
|
||||||
|
orig: 96, 96
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
block-craters-full
|
block-craters-full
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 2311, 1024
|
xy: 2311, 1024
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
@@ -1328,7 +1328,7 @@ public class Blocks implements ContentList{
|
|||||||
//region storage
|
//region storage
|
||||||
|
|
||||||
coreShard = new CoreBlock("core-shard"){{
|
coreShard = new CoreBlock("core-shard"){{
|
||||||
requirements(Category.effect, BuildVisibility.hidden, with(Items.copper, 2000, Items.lead, 1000));
|
requirements(Category.effect, BuildVisibility.debugOnly, with(Items.copper, 2000, Items.lead, 1000));
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
|
|
||||||
unitType = UnitTypes.alpha;
|
unitType = UnitTypes.alpha;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class Scripts implements Disposable{
|
|||||||
private final Seq<String> blacklist = Seq.with(".net.", "java.net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
private final Seq<String> blacklist = Seq.with(".net.", "java.net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
||||||
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
||||||
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.");
|
".awt", "socket", "classloader", "oracle", "invoke", "java.util.function", "java.util.stream", "org.");
|
||||||
private final Seq<String> whitelist = Seq.with("mindustry.net", "netserver", "netclient", "com.sun.proxy.$proxy", "mindustry.gen.", "mindustry.logic.", "mindustry.async.", "saveio");
|
private final Seq<String> whitelist = Seq.with("mindustry.net", "netserver", "netclient", "com.sun.proxy.$proxy", "mindustry.gen.", "mindustry.logic.", "mindustry.async.", "saveio", "systemcursor");
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final Scriptable scope;
|
private final Scriptable scope;
|
||||||
private boolean errored;
|
private boolean errored;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import mindustry.world.*;
|
|||||||
import mindustry.world.blocks.*;
|
import mindustry.world.blocks.*;
|
||||||
import mindustry.world.blocks.environment.*;
|
import mindustry.world.blocks.environment.*;
|
||||||
import mindustry.world.blocks.legacy.*;
|
import mindustry.world.blocks.legacy.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -309,7 +310,7 @@ public class Generators{
|
|||||||
Log.info("saving VOID icon @ / @", icon, "../ui/block-" + block.name + "-" + icon.name());
|
Log.info("saving VOID icon @ / @", icon, "../ui/block-" + block.name + "-" + icon.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(icon == logicIcon && block.synthetic() && !block.isHidden()){
|
if(icon == logicIcon && block.synthetic() && block.buildVisibility != BuildVisibility.hidden){
|
||||||
image.save(block.name + "-icon-logic");
|
image.save(block.name + "-icon-logic");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package mindustry.tools;
|
package mindustry.tools;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
|
import arc.Graphics.Cursor.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
@@ -43,7 +44,7 @@ public class ScriptMainGenerator{
|
|||||||
|
|
||||||
classes.removeAll(type -> type.isSynthetic() || type.isAnonymousClass() || type.getCanonicalName() == null || Modifier.isPrivate(type.getModifiers())
|
classes.removeAll(type -> type.isSynthetic() || type.isAnonymousClass() || type.getCanonicalName() == null || Modifier.isPrivate(type.getModifiers())
|
||||||
|| blacklist.contains(s -> type.getName().startsWith(base + "." + s + ".")) || nameBlacklist.contains(type.getSimpleName()));
|
|| blacklist.contains(s -> type.getName().startsWith(base + "." + s + ".")) || nameBlacklist.contains(type.getSimpleName()));
|
||||||
classes.add(NetConnection.class, SaveIO.class);
|
classes.add(NetConnection.class, SaveIO.class, SystemCursor.class);
|
||||||
|
|
||||||
classes.distinct();
|
classes.distinct();
|
||||||
classes.sortComparing(Class::getName);
|
classes.sortComparing(Class::getName);
|
||||||
|
|||||||
Reference in New Issue
Block a user