From 61e5f946638d449e025900aa217c6d963e58f8b0 Mon Sep 17 00:00:00 2001 From: Sevastjan Date: Thu, 20 Jul 2023 14:01:02 +0300 Subject: [PATCH] [STYLE] Rename "xorConflict" to "group" --- .../launcher/profiles/ClientProfile.java | 14 ++++++------ .../profiles/optional/OptionalFile.java | 4 ++-- .../profiles/optional/OptionalView.java | 22 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index f1d2506b..36c533ee 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -254,10 +254,10 @@ public void updateOptionalGraph() { file.conflict[i] = getOptionalFile(file.conflictFile[i].name); } } - if(file.xorConflictFile != null) { - file.xorConflict = new OptionalFile[file.xorConflictFile.length]; - for(int i = 0; i < file.xorConflictFile.length; ++i) { - file.xorConflict[i] = getOptionalFile(file.xorConflictFile[i].name); + if(file.groupFile != null) { + file.group = new OptionalFile[file.groupFile.length]; + for(int i = 0; i < file.groupFile.length; ++i) { + file.group[i] = getOptionalFile(file.groupFile[i].name); } } } @@ -375,10 +375,10 @@ public void verify() { if (s == null) throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.dependenciesFile", f.name)); } - if(f.xorConflictFile != null) - for (OptionalDepend s : f.xorConflictFile) { + if(f.groupFile != null) + for (OptionalDepend s : f.groupFile) { if (s == null) - throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.xorConflictFile", f.name)); + throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.groupFile", f.name)); } if (f.triggersList != null) { for (OptionalTrigger trigger : f.triggersList) { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java index 449b8287..bbe85fc9 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java @@ -24,13 +24,13 @@ public class OptionalFile { @LauncherNetworkAPI public OptionalDepend[] conflictFile; @LauncherNetworkAPI - public OptionalDepend[] xorConflictFile; + public OptionalDepend[] groupFile; @LauncherNetworkAPI public transient OptionalFile[] dependencies; @LauncherNetworkAPI public transient OptionalFile[] conflict; @LauncherNetworkAPI - public transient OptionalFile[] xorConflict; + public transient OptionalFile[] group; @LauncherNetworkAPI public int subTreeLevel = 1; @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java index ec9fe859..25fdb266 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java @@ -88,8 +88,8 @@ public Set getEnabledActions() { public void fixDependencies() { Set disabled = all.stream().filter(t -> !isEnabled(t)).collect(Collectors.toSet()); for (OptionalFile file : disabled) { - if (file.xorConflict != null && Arrays.stream(file.xorConflict).noneMatch(this::isEnabled)) { - enable(file.xorConflict[0], false, null); + if (file.group != null && Arrays.stream(file.group).noneMatch(this::isEnabled)) { + enable(file.group[0], false, null); } } for (OptionalFile file : enabled) { @@ -103,9 +103,9 @@ public void fixDependencies() { disable(conflict, null); } } - if (file.xorConflict != null) { - for (OptionalFile xorConflict : file.xorConflict) { - disable(xorConflict, null); + if (file.group != null) { + for (OptionalFile member : file.group) { + disable(member, null); } } } @@ -142,9 +142,9 @@ public void enable(OptionalFile file, boolean manual, BiConsumer callbac } } } - if (file.xorConflict != null && file.xorConflict.length != 0) { - if (Arrays.stream(file.xorConflict).noneMatch(this::isEnabled)) { - enable(file.xorConflict[0], false, callback); + if (file.group != null && file.group.length != 0) { + if (Arrays.stream(file.group).noneMatch(this::isEnabled)) { + enable(file.group[0], false, callback); } } }