Add DayZ workshop mod updates#280
Conversation
|
If this PR is merged and the 50eur bounty is approved, same as #279 — PayPal preferred, Solana wallet available as backup. Thanks! |
|
|
||
| String mcVersion = updaterConfig.mods_updater_version.asString(); | ||
| if (mcVersion == null) updaterConfig.server_updater_version.asString(); | ||
| if (mcVersion == null) mcVersion = Server.getMCVersion(); |
There was a problem hiding this comment.
there is no need to move this block into the loop below
| if (mod.customCheckURL != null) { // Custom Check | ||
| if (mod instanceof SteamWorkshopMod) { | ||
| sizeSteamWorkshopMods++; | ||
| activeFutures.add(executorService.submit(() -> doSteamWorkshopUpdateLogic((SteamWorkshopMod) mod))); |
There was a problem hiding this comment.
if I understood correctly, this would mean we always update the mod, no matter if it actually has an update available, which is not optimal.
please take a look at ResourceFinder and ensure there is some similar way to check the latest version via steamCMD and if it has an update.
|
|
||
| } | ||
|
|
||
| private SearchResult doSteamWorkshopUpdateLogic(@NotNull SteamWorkshopMod mod) { |
There was a problem hiding this comment.
integrate the custom code into the existing doDownloadLogic function too please.
and preferably use something similar to TaskModDownload than runs steamcmd internally for example.
Closes #215
Summary:
meta.cppfiles under the configuredmods-updater.path.publishedidand update it through SteamCMD usingworkshop_download_item.mods-updater.dayz-workshop-app-id, defaulting to DayZ's Workshop app id221100.NOTIFYreports detected Workshop items,MANUALdownloads them into SteamCMD's Workshop cache, andAUTOMATICcopies the downloaded content back into the existing mod folder.meta.cppparsing, DayZ mod discovery, and SteamCMD Workshop command formatting.Verification:
git diff --checkjava --add-modules jdk.compiler com.sun.tools.javac.Main -source 21 -target 21 -cp "$(cat /tmp/autoplug-classpath.txt)" -sourcepath src/main/java:src/test/java -d /tmp/autoplug-compile-215 src/main/java/com/osiris/autoplug/client/configs/UpdaterConfig.java src/main/java/com/osiris/autoplug/client/utils/SteamCMD.java src/main/java/com/osiris/autoplug/client/tasks/updater/mods/DayZWorkshopMod.java src/main/java/com/osiris/autoplug/client/tasks/updater/mods/TaskModsUpdater.java src/test/java/com/osiris/autoplug/client/tasks/updater/mods/DayZWorkshopModTest.java src/test/java/com/osiris/autoplug/client/utils/SteamCMDTest.javajava -jar /home/florian/.m2/repository/org/junit/platform/junit-platform-console-standalone/1.9.2/junit-platform-console-standalone-1.9.2.jar --class-path "/tmp/autoplug-compile-215:$(cat /tmp/autoplug-classpath.txt)" --select-class com.osiris.autoplug.client.tasks.updater.mods.DayZWorkshopModTest --select-method com.osiris.autoplug.client.utils.SteamCMDTest#buildsWorkshopItemCommandNote: I also tried
/tmp/apache-maven-3.9.9/bin/mvn -q -Dtest=DayZWorkshopModTest test, but this local Java image cannot compile the repository's configured--release 9target and fails withrelease version 9 not supported.