mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-25 22:17:59 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
32f9da0724
@ -31,6 +31,8 @@ import io.anuke.ucore.util.CommandHandler.ResponseType;
|
|||||||
import io.anuke.ucore.util.Strings;
|
import io.anuke.ucore.util.Strings;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
@ -56,6 +58,26 @@ public class ServerControl extends Module{
|
|||||||
"port", port
|
"port", port
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Log.setLogger(new LogHandler(){
|
||||||
|
DateTimeFormatter dateTime = DateTimeFormatter.ofPattern("MM-dd-yyyy | HH:mm:ss");
|
||||||
|
|
||||||
|
public void info(String text, Object... args){
|
||||||
|
print("&lg&fb" + "[ INFO ] " + format(text, args));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void err(String text, Object... args){
|
||||||
|
print("&lr&fb" + "[ ERR! ] " + format(text, args));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void warn(String text, Object... args){
|
||||||
|
print("&ly&fb" + "[ WARN ] " + format(text, args));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print(String text, Object... args){
|
||||||
|
System.out.println("[" + dateTime.format(LocalDateTime.now()) + "] " + format(text + "&fr", args));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Timers.setDeltaProvider(() -> Gdx.graphics.getDeltaTime() * 60f);
|
Timers.setDeltaProvider(() -> Gdx.graphics.getDeltaTime() * 60f);
|
||||||
Effects.setScreenShakeProvider((a, b) -> {});
|
Effects.setScreenShakeProvider((a, b) -> {});
|
||||||
Effects.setEffectProvider((a, b, c, d, e, f) -> {});
|
Effects.setEffectProvider((a, b, c, d, e, f) -> {});
|
||||||
@ -86,8 +108,8 @@ public class ServerControl extends Module{
|
|||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
if(Version.build == -1){
|
if(Version.build == -1){
|
||||||
err("WARNING: &lyYour server is running a custom build, which means that client checking is disabled.\n" +
|
warn("&lyYour server is running a custom build, which means that client checking is disabled.");
|
||||||
"&lrWARNING: &lyIt is highly advised to specify which version you're using by building with gradle args &lc-Pbuildversion=&lm<build>&ly so that clients know which version you are using.");
|
warn("&lyIt is highly advised to specify which version you're using by building with gradle args &lc-Pbuildversion=&lm<build>&ly.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Events.on(SectorCompleteEvent.class, event -> {
|
Events.on(SectorCompleteEvent.class, event -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user