From 30ae80c1a1946cb4e771d7159934324a0899cf5b Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 8 Nov 2018 19:50:24 +0700 Subject: [PATCH] updateShared --- .../resources/ru/gravit/launchserver/defaults/profile1.10.2.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.11.2.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.12.2.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.13.1.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.13.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.4.7.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.5.2.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.6.4.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.7.10.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.7.2.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.8.9.cfg | 1 + .../resources/ru/gravit/launchserver/defaults/profile1.9.4.cfg | 1 + .../main/java/ru/gravit/launcher/profiles/ClientProfile.java | 2 ++ 13 files changed, 14 insertions(+) diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.10.2.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.10.2.cfg index 6966441f..01fec983 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.10.2.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.10.2.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.11.2.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.11.2.cfg index 5471d263..2d88969b 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.11.2.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.11.2.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.12.2.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.12.2.cfg index 6d0eac31..9a0963ff 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.12.2.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.12.2.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.1.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.1.cfg index f0d71c1b..d1991590 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.1.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.1.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft\\.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.cfg index 028c757f..c3bb432c 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.13.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft\\.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.4.7.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.4.7.cfg index a5d252ec..ceec8f45 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.4.7.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.4.7.cfg @@ -20,6 +20,7 @@ updateVerify: [ "libraries", "natives", "mods", "minecraft.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.5.2.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.5.2.cfg index f60e099e..994741ee 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.5.2.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.5.2.cfg @@ -20,6 +20,7 @@ updateVerify: [ "libraries", "natives", "mods", "minecraft.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.6.4.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.6.4.cfg index c9575409..5a378ea9 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.6.4.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.6.4.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.10.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.10.cfg index 0d8828b0..dfd0d6e0 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.10.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.10.cfg @@ -25,6 +25,7 @@ updateExclusions: [ # "mods/ic2", # "mods/railcraft" ]; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.2.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.2.cfg index be79167d..1b0fc543 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.2.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.7.2.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.8.9.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.8.9.cfg index 6f6dfdfb..bc9de728 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.8.9.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.8.9.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.9.4.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.9.4.cfg index d9cc68a1..a14b067d 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.9.4.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/profile1.9.4.cfg @@ -21,6 +21,7 @@ updateVerify: [ "minecraft.jar", "forge.jar", "liteloader.jar" ]; updateExclusions: []; +updateShared: []; updateOptional: []; enabledOptional: []; diff --git a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java index 77113254..413d55b8 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java @@ -109,6 +109,7 @@ public int hashCode() { // Updater and client watch service private final List update = new ArrayList<>(); private final List updateExclusions = new ArrayList<>(); + private final List updateShared = new ArrayList<>(); private final List updateVerify = new ArrayList<>(); private final Set updateOptional = new HashSet<>(); private final BooleanConfigEntry updateFastCheck; @@ -139,6 +140,7 @@ public ClientProfile(BlockConfigEntry block) { // Updater and client watch service block.getEntry("update", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(update::add); block.getEntry("updateVerify", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(updateVerify::add); + block.getEntry("updateShared", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(updateVerify::add); block.getEntry("updateOptional", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(e -> updateOptional.add(new MarkedString(e))); block.getEntry("updateExclusions", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(updateExclusions::add); block.getEntry("enabledOptional", ListConfigEntry.class).stream(StringConfigEntry.class).forEach(e -> updateOptional.stream().anyMatch(e1 -> e.equals(e1.string) && (e1.mark = true)));