mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 01:15:52 +01:00
Refactor GameData, remove deprecated getGsonFactory
- Fix day-of-week dungeons - AvatarSkill max level enforcement from excels - Partial fix to bonus levels (need packet on talent update)
This commit is contained in:
@@ -59,11 +59,6 @@ public final class JsonUtils {
|
||||
.registerTypeAdapter(DynamicFloat.class, new DynamicFloatAdapter())
|
||||
.create();
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static Gson getGsonFactory() {
|
||||
return gson;
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode an object to a JSON string
|
||||
*/
|
||||
@@ -79,7 +74,7 @@ public final class JsonUtils {
|
||||
return gson.fromJson(fileReader, classType);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public static <T> T loadToClass(String filename, Class<T> classType) throws IOException {
|
||||
try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(Utils.toFilePath(filename)), StandardCharsets.UTF_8)) {
|
||||
return loadToClass(fileReader, classType);
|
||||
@@ -96,7 +91,7 @@ public final class JsonUtils {
|
||||
return gson.fromJson(fileReader, TypeToken.getParameterized(List.class, classType).getType());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public static <T> List<T> loadToList(String filename, Class<T> classType) throws IOException {
|
||||
try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(Utils.toFilePath(filename)), StandardCharsets.UTF_8)) {
|
||||
return loadToList(fileReader, classType);
|
||||
@@ -113,7 +108,7 @@ public final class JsonUtils {
|
||||
return gson.fromJson(fileReader, TypeToken.getParameterized(Map.class, keyType, valueType).getType());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public static <T1,T2> Map<T1,T2> loadToMap(String filename, Class<T1> keyType, Class<T2> valueType) throws IOException {
|
||||
try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(Utils.toFilePath(filename)), StandardCharsets.UTF_8)) {
|
||||
return loadToMap(fileReader, keyType, valueType);
|
||||
|
||||
Reference in New Issue
Block a user