Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSJ and TSV parsing #1962

Merged
merged 14 commits into from
Nov 23, 2022
Prev Previous commit
Next Next commit
[WIP] More TSV stuff
  • Loading branch information
Birdulon committed Nov 21, 2022
commit 8ada2ed8ac4723624fed1470ecafa2fa4f4c43cb
4 changes: 2 additions & 2 deletions src/main/java/emu/grasscutter/data/ResourceLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void loadResources(boolean doReload) {
getResourceDefClassesPrioritySets().forEach(classes -> {
// Grasscutter.getLogger().error("Loading resources: " + classes);
classes.stream()
.parallel().unordered()
// .parallel().unordered()
.forEach(c -> {
val type = c.getAnnotation(ResourceType.class);
if (type == null) return;
Expand Down Expand Up @@ -165,7 +165,7 @@ protected static void loadFromResourceTsv(Class<?> c, ResourceType type, Int2Obj
Stream.of(type.name())
.map(FileUtils::getExcelPath)
.forEach(path ->
TsvUtils.loadTsjToListSetField(c, path).forEach(o -> {
TsvUtils.loadTsvToListSetField(c, path).forEach(o -> {
GameResource res = (GameResource) o;
res.onLoad();
map.put(res.getId(), res);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/emu/grasscutter/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static Path getResourcePath(String path) {
}

public static Path getExcelPath(String fileName) {
return RESOURCES_PATH.resolve("ExcelBinOutput/" + fileName.replace(".json", ".tsj"));
return RESOURCES_PATH.resolve("ExcelBinOutput/" + fileName.replace(".json", ".tsv"));
}

public static Path getScriptPath(String path) {
Expand Down
Loading