Merge branch 'master' into crater

# Conflicts:
#	core/src/mindustry/mod/ClassAccess.java
This commit is contained in:
Patrick 'Quezler' Mounier
2020-01-03 08:01:22 +01:00
9 changed files with 18 additions and 10 deletions

View File

@@ -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));
}

View File

@@ -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

View File

@@ -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();

View File

@@ -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();

View File

@@ -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);
}
}