mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-06 18:17:00 +01:00
TSJ and TSV parsing (#1962)
* Deserialization support for tsv files * Benchmarking * Apparently moving the setter out of the lambda fixed the setAccessible issue * Thread it * Use AllArgsConstructor instead of field reflection * Clean up AllArgsConstructor TSV deserialization * Refactor TsvUtils * Remove AllArgsConstructors from Excels * Set field accessible * [WIP] TSJ improvements * [WIP] More TSV stuff * [WIP] More TSV stuff * Working TSV parser (slow) * Load Excels in TSJ > JSON > TSV priority
This commit is contained in:
@@ -21,7 +21,7 @@ public class ActivityWatcherData extends GameResource {
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
triggerConfig.paramList = triggerConfig.paramList.stream().filter(x -> !x.isBlank()).toList();
|
||||
triggerConfig.paramList = triggerConfig.paramList.stream().filter(x -> (x != null) && !x.isBlank()).toList();
|
||||
triggerConfig.watcherTriggerType = WatcherTriggerType.getTypeByName(triggerConfig.triggerType);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,11 @@ public class BattlePassMissionData extends GameResource {
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
if (this.getTriggerConfig() != null && getTriggerConfig().getParamList()[0].length() > 0) {
|
||||
this.mainParams = Arrays.stream(getTriggerConfig().getParamList()[0].split("[:;,]")).map(Integer::parseInt).collect(Collectors.toSet());
|
||||
if (this.getTriggerConfig() != null) {
|
||||
var params = getTriggerConfig().getParamList()[0];
|
||||
if ((params != null) && !params.isEmpty()) {
|
||||
this.mainParams = Arrays.stream(params.split("[:;,]")).map(Integer::parseInt).collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user