Skip to content

Commit

Permalink
eeeee
Browse files Browse the repository at this point in the history
  • Loading branch information
grelylrz committed Jan 19, 2025
1 parent 5ddfb89 commit a02462c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/hexed/HexedMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import static arc.util.Log.*;
import static mindustry.Vars.*;

import hexed.HexedGenerator;

public class HexedMod extends Plugin{
//TODO: move these to a config file or Config

Expand Down Expand Up @@ -318,9 +320,18 @@ void endGame(){

Log.info("&ly--SERVER RESTARTING--");
Time.runTask(60f * 10f, () -> {
//netServer.kickAll(KickReason.serverRestarting);
//Time.runTask(5f, () -> System.exit(2));
data.clear();
netServer.kickAll(KickReason.serverRestarting);
net.closeServer();
data = new HexData();
logic.reset();
Log.info("Generating map...");
HexedGenerator generator = new HexedGenerator();
world.loadGenerator(Hex.size, Hex.size, generator);
data.initHexes(generator.getHex());
info("Map generated.");
state.rules = rules.copy();
logic.play();
netServer.openServer();
});
}

Expand Down

0 comments on commit a02462c

Please sign in to comment.