mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Add warning when the server is missing a floor info
This commit is contained in:
@@ -224,6 +224,11 @@ public class ResourceLoader {
|
|||||||
String name = "P" + excel.getPlaneID() + "_F" + excel.getFloorID();
|
String name = "P" + excel.getPlaneID() + "_F" + excel.getFloorID();
|
||||||
File file = new File(LunarCore.getConfig().getResourceDir() + "/Config/LevelOutput/RuntimeFloor/" + name + ".json");
|
File file = new File(LunarCore.getConfig().getResourceDir() + "/Config/LevelOutput/RuntimeFloor/" + name + ".json");
|
||||||
|
|
||||||
|
if (!file.exists()) {
|
||||||
|
LunarCore.getLogger().warn("Missing floor info: " + name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try (FileReader reader = new FileReader(file)) {
|
try (FileReader reader = new FileReader(file)) {
|
||||||
FloorInfo floor = gson.fromJson(reader, FloorInfo.class);
|
FloorInfo floor = gson.fromJson(reader, FloorInfo.class);
|
||||||
GameData.getFloorInfos().put(name, floor);
|
GameData.getFloorInfos().put(name, floor);
|
||||||
|
|||||||
Reference in New Issue
Block a user