mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 09:25:06 +01:00
[BREAKING CHANGE] proto auto compiled by gradle (#226)
* [BREAK] proto auto compiled by gradle * [BREAK] move proto to submodule * update gitmodules * [BREAK] move proto to submodule * move proto to submodule * fix merge conflict * fix github action after merging * fix merge conflicts and del submodule * upload the proto
This commit is contained in:
@@ -140,7 +140,7 @@ public class ResourceLoader {
|
||||
}
|
||||
|
||||
List<ScenePointEntry> scenePointList = new ArrayList<>();
|
||||
for (File file : folder.listFiles()) {
|
||||
for (File file : Objects.requireNonNull(folder.listFiles())) {
|
||||
ScenePointConfig config = null;
|
||||
Integer sceneId = null;
|
||||
|
||||
@@ -190,7 +190,7 @@ public class ResourceLoader {
|
||||
} else {
|
||||
// Load from BinOutput
|
||||
Pattern pattern = Pattern.compile("(?<=ConfigAvatar_)(.*?)(?=.json)");
|
||||
|
||||
|
||||
embryoList = new LinkedList<>();
|
||||
File folder = new File(Utils.toFilePath(Grasscutter.getConfig().RESOURCE_FOLDER + "BinOutput/Avatar/"));
|
||||
File[] files = folder.listFiles();
|
||||
@@ -198,29 +198,29 @@ public class ResourceLoader {
|
||||
Grasscutter.getLogger().error("Error loading ability embryos: no files found in " + folder.getAbsolutePath());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (File file : files) {
|
||||
AvatarConfig config;
|
||||
String avatarName;
|
||||
|
||||
|
||||
Matcher matcher = pattern.matcher(file.getName());
|
||||
if (matcher.find()) {
|
||||
avatarName = matcher.group(0);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
try (FileReader fileReader = new FileReader(file)) {
|
||||
config = Grasscutter.getGsonFactory().fromJson(fileReader, AvatarConfig.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (config.abilities == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
int s = config.abilities.size();
|
||||
AbilityEmbryoEntry al = new AbilityEmbryoEntry(avatarName, config.abilities.stream().map(Object::toString).toArray(size -> new String[s]));
|
||||
embryoList.add(al);
|
||||
@@ -331,7 +331,7 @@ public class ResourceLoader {
|
||||
GenshinData.getOpenConfigEntries().put(entry.getName(), entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// BinOutput configs
|
||||
|
||||
private static class AvatarConfig {
|
||||
|
||||
10
src/main/java/emu/grasscutter/data/def/CombineData.java
Normal file
10
src/main/java/emu/grasscutter/data/def/CombineData.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package emu.grasscutter.data.def;
|
||||
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
|
||||
@ResourceType(name = "CombineExcelConfigData.json")
|
||||
public class CombineData {
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user