mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-27 08:00:04 +07:00
Merge branch 'master' into crater
# Conflicts: # core/src/mindustry/mod/ClassAccess.java
This commit is contained in:
commit
cad13b61bb
@ -17,7 +17,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
||||
Bleeding-edge live builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases). Old builds might still be on [jenkins](https://jenkins.hellomouse.net/job/mindustry/).
|
||||
|
||||
If you'd rather compile on your own, follow these instructions.
|
||||
First, make sure you have [Java 8](https://www.java.com/en/download/) and [JDK 8](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
||||
First, make sure you have [JDK 8](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
||||
|
||||
#### Windows
|
||||
|
||||
|
@ -589,6 +589,10 @@ public class NetServer implements ApplicationListener{
|
||||
if(Config.showConnectMessages.bool()) Call.sendMessage("[accent]" + player.name + "[accent] has connected.");
|
||||
Log.info("&lm[{1}] &y{0} has connected. ", player.name, player.uuid);
|
||||
|
||||
if(!Config.motd.string().equalsIgnoreCase("off")){
|
||||
player.sendMessage(Config.motd.string());
|
||||
}
|
||||
|
||||
Events.fire(new PlayerJoin(player));
|
||||
}
|
||||
|
||||
|
@ -439,10 +439,12 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public boolean touchDown(int screenX, int screenY, int pointer, KeyCode button){
|
||||
if(state.is(State.menu) || player.isDead()) return false;
|
||||
if(state.is(State.menu)) return false;
|
||||
|
||||
down = true;
|
||||
|
||||
if(player.isDead()) return false;
|
||||
|
||||
//get tile on cursor
|
||||
Tile cursor = tileAt(screenX, screenY);
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,8 @@ public class Scripts implements Disposable{
|
||||
context.setClassShutter(type -> (ClassAccess.allowedClassNames.contains(type) || type.startsWith("$Proxy") ||
|
||||
type.startsWith("adapter") || type.contains("PrintStream") ||
|
||||
type.startsWith("mindustry")) && !type.equals("mindustry.mod.ClassAccess"));
|
||||
|
||||
context.getWrapFactory().setJavaPrimitiveWrap(false);
|
||||
|
||||
scope = new ImporterTopLevel(context);
|
||||
wrapper = Core.files.internal("scripts/wrapper.js").readString();
|
||||
|
||||
|
@ -330,7 +330,8 @@ public class Administration{
|
||||
socketInputPort("The port for socket input.", 6859, () -> Events.fire(Trigger.socketConfigChanged)),
|
||||
socketInputAddress("The bind address for socket input.", "localhost", () -> Events.fire(Trigger.socketConfigChanged)),
|
||||
allowCustomClients("Whether custom clients are allowed to connect.", !headless, "allow-custom"),
|
||||
whitelist("Whether the whitelist is used.", false);
|
||||
whitelist("Whether the whitelist is used.", false),
|
||||
motd("The message displayed to people on connection.", "off");
|
||||
|
||||
public static final Config[] all = values();
|
||||
|
||||
|
@ -173,7 +173,7 @@ public class BuildBlock extends Block{
|
||||
|
||||
if(entity.previous == null || entity.cblock == null) return;
|
||||
|
||||
if(Core.atlas.isFound(entity.previous.icon(mindustry.ui.Cicon.full))){
|
||||
if(Core.atlas.isFound(entity.previous.icon(Cicon.full))){
|
||||
Draw.rect(entity.previous.icon(Cicon.full), tile.drawx(), tile.drawy(), entity.previous.rotate ? tile.rotation() * 90 : 0);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=7bfc46fe8c7810fbef1b6f6bbb19c8b999856813
|
||||
archash=b3d3fc19560148f16b58ac7e04903f9db4f56912
|
||||
|
@ -26,12 +26,12 @@ public class ScriptStubGenerator{
|
||||
Array<String> nameBlacklist = Array.with("ClientLauncher", "NetClient", "NetServer", "ClassAccess");
|
||||
Array<Class<?>> whitelist = Array.with(Draw.class, Fill.class, Lines.class, Core.class, TextureAtlas.class, TextureRegion.class, Time.class, System.class, PrintStream.class,
|
||||
AtlasRegion.class, String.class, Mathf.class, Angles.class, Color.class, Runnable.class, Object.class, Icon.class, Tex.class,
|
||||
Sounds.class, Musics.class, Call.class, Texture.class, TextureData.class, Pixmap.class, I18NBundle.class, Interval.class, DataInput.class, DataOutput.class, DataInputStream.class, DataOutputStream.class);
|
||||
Sounds.class, Musics.class, Call.class, Texture.class, TextureData.class, Pixmap.class, I18NBundle.class, Interval.class, DataInput.class, DataOutput.class,
|
||||
DataInputStream.class, DataOutputStream.class, Integer.class, Float.class, Double.class, Long.class, Boolean.class, Short.class, Byte.class, Character.class);
|
||||
Array<String> nopackage = Array.with("java.lang", "java");
|
||||
|
||||
String fileTemplate = "package mindustry.mod;\n" +
|
||||
"\n" +
|
||||
"import arc.struct.*;\n" +
|
||||
"\nimport arc.struct.*;\n" +
|
||||
"//obviously autogenerated, do not touch\n" +
|
||||
"public class ClassAccess{\n" +
|
||||
"\tpublic static final ObjectSet<String> allowedClassNames = ObjectSet.with($ALLOWED_CLASS_NAMES$);\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user