Add DayZ workshop mod updates#280
Open
JustABiologist wants to merge 4 commits into
Open
Conversation
Author
|
If this PR is merged and the 50eur bounty is approved, same as #279 — PayPal preferred, Solana wallet available as backup. Thanks! |
Osiris-Team
requested changes
May 13, 2026
Osiris-Team
requested changes
May 15, 2026
Osiris-Team
requested changes
May 15, 2026
Osiris-Team
requested changes
May 17, 2026
| if (mod.customCheckURL != null) { // Custom Check | ||
| if (mod instanceof SteamWorkshopMod) { | ||
| sizeSteamWorkshopMods++; | ||
| activeFutures.add(executorService.submit(() -> findSteamWorkshopUpdate((SteamWorkshopMod) mod))); |
Owner
There was a problem hiding this comment.
please extract findSteamWorkshopUpdate (and related functions) into another class and use it via ResourceFinder like the other existing code does.
please also do this for anything else and try to stay close to the file/class structure/organization of existing code.
| return true; | ||
| if (latestVersion.equals(currentVersion)) | ||
| return false; | ||
| if (currentVersion.equals(mod.getPublishedId())) |
Owner
There was a problem hiding this comment.
Im not sure how this (line 397) makes sense, can you explain?
| } | ||
|
|
||
| public SteamWorkshopItemDetails getWorkshopItemDetails(String workshopItemId) throws IOException { | ||
| Request request = new Request.Builder() |
Owner
There was a problem hiding this comment.
You can use src/main/java/com/osiris/jlib/json/Json.java from the jlib dependency and do Json.get(url) to simplify this whole block of code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.