mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-20 01:29:54 +02:00
Update data versions and cleanup some stuff
This commit is contained in:
@@ -196,11 +196,11 @@ public class Nebula {
|
||||
var file = new File("./versions.json");
|
||||
|
||||
if (file.exists()) {
|
||||
// Load data versions from an external file first, in case the internal versions.json is out of date
|
||||
// Try and load data versions from an external file first, in case the internal versions.json is out of date
|
||||
try (FileReader reader = new FileReader(file)) {
|
||||
versions = JsonUtils.loadToMap(reader, String.class, Integer.class);
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
// Ignored - Try using internal versions.json next
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public class Nebula {
|
||||
try (var stream = Nebula.class.getResourceAsStream("/versions.json"); var reader = new InputStreamReader(stream)) {
|
||||
versions = JsonUtils.loadToMap(reader, String.class, Integer.class);
|
||||
} catch (Exception e) {
|
||||
// Ignored
|
||||
// Internal versions.json not loaded for reason
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ public class GameContext implements Runnable {
|
||||
private int epochMonths;
|
||||
|
||||
public GameContext() {
|
||||
// Create session map
|
||||
this.sessions = new Object2ObjectOpenHashMap<>();
|
||||
|
||||
// Setup game modules
|
||||
@@ -85,7 +86,6 @@ public class GameContext implements Runnable {
|
||||
this.sessions.put(session.getToken(), session);
|
||||
}
|
||||
|
||||
// TODO add timeout to config
|
||||
public synchronized void cleanupInactiveSessions() {
|
||||
var it = this.getSessions().entrySet().iterator();
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package emu.nebula.game.activity.type;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import dev.morphia.annotations.Entity;
|
||||
|
||||
import emu.nebula.data.GameData;
|
||||
import emu.nebula.data.resources.ActivityDef;
|
||||
import emu.nebula.game.activity.ActivityManager;
|
||||
import emu.nebula.game.activity.GameActivity;
|
||||
import emu.nebula.proto.ActivityDetail.ActivityMsg;
|
||||
import emu.nebula.proto.Public.ActivityPenguinCardLevel;
|
||||
import emu.nebula.proto.Public.ActivityQuest;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -79,11 +79,6 @@ public class PenguinCardActivity extends GameActivity {
|
||||
public static class LevelStats {
|
||||
private int stars;
|
||||
private int score;
|
||||
|
||||
@Deprecated
|
||||
public LevelStats() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package emu.nebula.server.handlers;
|
||||
import emu.nebula.net.NetHandler;
|
||||
import emu.nebula.net.NetMsgId;
|
||||
import emu.nebula.proto.ActivityPenguinCardLevelSettle.ActivityPenguinCardSettleReq;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
import emu.nebula.net.HandlerId;
|
||||
import emu.nebula.game.activity.type.PenguinCardActivity;
|
||||
import emu.nebula.game.activity.type.PenguinCardActivity.LevelStats;
|
||||
|
||||
Reference in New Issue
Block a user