From 2b2369a6db633c1342c2de5156f01198bae576ea Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Mon, 22 Feb 2021 03:13:53 +0100 Subject: [PATCH 1/8] dependencies: Match RL dependencies --- .github/workflows/gradle.yml | 22 ------- build.gradle.kts | 45 +------------- deobfuscator/deobfuscator.gradle.kts | 16 ++--- http-api/http-api.gradle.kts | 19 +++--- injector/injector.gradle.kts | 17 +++--- runelite-api/runelite-api.gradle.kts | 12 ++-- runelite-client/runelite-client.gradle.kts | 58 +++++++++---------- runelite-mixins/runelite-mixins.gradle.kts | 5 +- ...unelite-script-assembler-plugin.gradle.kts | 6 +- runescape-client/runescape-client.gradle.kts | 6 +- wiki-scraper/wiki-scraper.gradle.kts | 14 ++--- 11 files changed, 76 insertions(+), 144 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index e9cb4f3619..8d16f9b50c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -26,25 +26,3 @@ jobs: body: This is an auto-generated PR with an updated gradle version labels: automated-pull-request, gradle signoff: false - - update-dependencies: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2.3.4 - - name: Make gradlew executable - run: chmod +x ./gradlew - - name: Update Gradle Dependencies - run: ./gradlew useLatestVersions --console=plain - - name: Create Gradle dependencies update Pull Request - uses: peter-evans/create-pull-request@v3.4.1 - with: - token: ${{ secrets.OpenOSRS }} - author: OpenOSRS - committer: OpenOSRS - branch: GRADLE-DEPS-UPDATE - commit-message: 'gradle: Update gradle dependencies' - title: 'gradle: Update gradle dependencies' - body: This is an auto-generated PR with an updated gradle dependencies - labels: automated-pull-request, gradle - signoff: false diff --git a/build.gradle.kts b/build.gradle.kts index 74c9e1bbd8..016a6f6dcf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -23,7 +23,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask import org.ajoberstar.grgit.Grgit buildscript { @@ -35,14 +34,10 @@ buildscript { } dependencies { classpath("org.ajoberstar.grgit:grgit-core:4.1.0") - classpath("com.github.ben-manes:gradle-versions-plugin:0.36.0") } } plugins { - id("com.adarshr.test-logger") version "2.1.1" apply false - id("com.github.ben-manes.versions") version "0.36.0" - id("se.patrikerdes.use-latest-versions") version "0.2.15" id("org.ajoberstar.grgit") version "4.1.0" application @@ -55,12 +50,6 @@ val localGitCommit = try { "n/a" } -fun isNonStable(version: String): Boolean { - return listOf("ALPHA", "BETA", "RC").any { - version.toUpperCase().contains(it) - } -} - allprojects { group = "com.openosrs" version = ProjectVersions.openosrsVersion @@ -112,7 +101,6 @@ subprojects { } filter { includeModule("net.runelite", "fernflower") - includeModule("com.openosrs.rxrelay3", "rxrelay") } } @@ -121,9 +109,6 @@ subprojects { apply() //apply() - apply(plugin = "com.adarshr.test-logger") - apply(plugin = "com.github.ben-manes.versions") - apply(plugin = "se.patrikerdes.use-latest-versions") project.extra["gitCommit"] = localGitCommit project.extra["rootPath"] = rootDir.toString().replace("\\", "/") @@ -185,27 +170,13 @@ subprojects { exclude("**/LayoutSolver.java") exclude("**/RoomType.java") } - - named("dependencyUpdates") { - checkForGradleUpdate = false - - resolutionStrategy { - componentSelection { - all { - if (candidate.displayName.contains("fernflower") || isNonStable(candidate.version)) { - reject("Non stable") - } - } - } - } - } } configurations["compileOnly"].extendsFrom(configurations["annotationProcessor"]) } application { - mainClassName = "net.runelite.client.RuneLite" + mainClass.set("net.runelite.client.RuneLite") } tasks { @@ -215,18 +186,4 @@ tasks { classpath = project(":runelite-client").sourceSets.main.get().runtimeClasspath enableAssertions = true } - - named("dependencyUpdates") { - checkForGradleUpdate = false - - resolutionStrategy { - componentSelection { - all { - if (candidate.displayName.contains("fernflower") || isNonStable(candidate.version)) { - reject("Non stable") - } - } - } - } - } } diff --git a/deobfuscator/deobfuscator.gradle.kts b/deobfuscator/deobfuscator.gradle.kts index 62da0b0dca..25b6ae3e94 100644 --- a/deobfuscator/deobfuscator.gradle.kts +++ b/deobfuscator/deobfuscator.gradle.kts @@ -35,23 +35,23 @@ dependencies { deobjars(group = "net.runelite.rs", name = "vanilla", version = ProjectVersions.rsversion.toString()) deobjars(project(":runescape-client")) - annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") + implementation(project(":runelite-api")) + implementation(project(":runescape-api")) implementation(group = "org.jetbrains", name = "annotations", version = "20.1.0") implementation(group = "org.ow2.asm", name = "asm", version = "9.0") implementation(group = "org.ow2.asm", name = "asm-util", version = "9.0") implementation(group = "net.runelite", name = "fernflower", version = "07082019") implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") - implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") - implementation(project(":runelite-api")) - implementation(project(":runescape-api")) + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") + implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") - runtimeOnly(group = "org.slf4j", name = "slf4j-simple", version = "1.7.30") + runtimeOnly(group = "org.slf4j", name = "slf4j-simple", version = "1.7.12") testImplementation(deobjars) - testImplementation(group = "junit", name = "junit", version = "4.13.1") - testImplementation(group = "org.mockito", name = "mockito-core", version = "3.6.0") + testImplementation(group = "junit", name = "junit", version = "4.12") + testImplementation(group = "org.mockito", name = "mockito-core", version = "3.1.0") } tasks { diff --git a/http-api/http-api.gradle.kts b/http-api/http-api.gradle.kts index 642dd7bf0b..0ccafa95e5 100644 --- a/http-api/http-api.gradle.kts +++ b/http-api/http-api.gradle.kts @@ -28,21 +28,20 @@ import org.apache.tools.ant.filters.ReplaceTokens description = "Web API" dependencies { - annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") - compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.16") + compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") - implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") - implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "4.9.0") - implementation(group = "io.reactivex.rxjava3", name = "rxjava", version = "3.0.7") - implementation(group = "org.apache.commons", name = "commons-csv", version = "1.8") - implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") implementation(project(":runelite-api")) + implementation(group = "com.google.code.gson", name = "gson", version = "2.8.5") + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") + implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "3.7.0") + implementation(group = "org.apache.commons", name = "commons-csv", version = "1.4") + implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") testImplementation(group = "com.squareup.okhttp3", name = "mockwebserver", version = "4.9.0") - testImplementation(group = "junit", name = "junit", version = "4.13.1") - testImplementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.30") + testImplementation(group = "junit", name = "junit", version = "4.12") + testImplementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.12") } tasks { diff --git a/injector/injector.gradle.kts b/injector/injector.gradle.kts index 00c2bb7d3f..d99d51cf46 100644 --- a/injector/injector.gradle.kts +++ b/injector/injector.gradle.kts @@ -13,18 +13,21 @@ plugins { dependencies { vanillaDep(group = "net.runelite.rs", name = "vanilla", version = rsversion.toString()) - implementation(gradleApi()) - annotationProcessor("org.projectlombok:lombok:1.18.12") - compileOnly("org.projectlombok:lombok:1.18.12") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") + + compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") + + implementation(gradleApi()) - implementation("org.ow2.asm:asm:8.0.1") - implementation("org.ow2.asm:asm-util:8.0.1") - implementation("org.jetbrains:annotations:19.0.0") - implementation("com.google.guava:guava:29.0-jre") implementation(project(":deobfuscator")) implementation(project(":runescape-api")) implementation(project(":runescape-client")) implementation(project(":runelite-mixins")) + + implementation(group = "org.ow2.asm", name = "asm", version = "8.0.1") + implementation(group = "org.ow2.asm", name = "asm-util", version = "8.0.1") + implementation(group = "org.jetbrains", name = "annotations", version = "19.0.0") + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") } tasks.register("inject") { diff --git a/runelite-api/runelite-api.gradle.kts b/runelite-api/runelite-api.gradle.kts index 9cb15fe98d..3f24b5b9d5 100644 --- a/runelite-api/runelite-api.gradle.kts +++ b/runelite-api/runelite-api.gradle.kts @@ -26,14 +26,14 @@ description = "RuneLite API" dependencies { - annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") - compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.16") + compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") implementation(group = "com.google.code.findbugs", name = "jsr305", version = "3.0.2") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") - implementation(group = "org.apache.commons", name = "commons-text", version = "1.9") - implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") + implementation(group = "org.apache.commons", name = "commons-text", version = "1.2") + implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") - testImplementation(group = "junit", name = "junit", version = "4.13.1") + testImplementation(group = "junit", name = "junit", version = "4.12") } \ No newline at end of file diff --git a/runelite-client/runelite-client.gradle.kts b/runelite-client/runelite-client.gradle.kts index cfc8667c28..adc413c31c 100644 --- a/runelite-client/runelite-client.gradle.kts +++ b/runelite-client/runelite-client.gradle.kts @@ -43,50 +43,46 @@ apply() description = "RuneLite Client" dependencies { - annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") annotationProcessor(group = "org.pf4j", name = "pf4j", version = "3.5.0") api(project(":runelite-api")) compileOnly(group = "javax.annotation", name = "javax.annotation-api", version = "1.3.2") - compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.16") + compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") compileOnly(group = "net.runelite", name = "orange-extensions", version = "1.0") + implementation(project(":http-api")) implementation(group = "ch.qos.logback", name = "logback-classic", version = "1.2.3") - implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") - implementation(group = "com.google.inject", name = "guice", version = "4.2.3", classifier = "no_aop") + implementation(group = "com.google.code.gson", name = "gson", version = "2.8.5") + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") + implementation(group = "com.google.inject", name = "guice", version = "4.1.0", classifier = "no_aop") implementation(group = "com.h2database", name = "h2", version = "1.4.200") implementation(group = "com.jakewharton.rxrelay3", name = "rxrelay", version = "3.0.0") - implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "4.9.0") - implementation(group = "io.reactivex.rxjava3", name = "rxjava", version = "3.0.7") - implementation(group = "net.java.dev.jna", name = "jna", version = "5.6.0") + implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "3.7.0") + implementation(group = "io.reactivex.rxjava3", name = "rxjava", version = "3.0.10") + implementation(group = "net.java.dev.jna", name = "jna", version = "4.5.1") implementation(group = "org.jgroups", name = "jgroups", version = "5.0.4.Final") - implementation(group = "net.java.dev.jna", name = "jna-platform", version = "5.6.0") - implementation(group = "net.runelite", name = "discord", version = "1.2") - implementation(group = "org.pushing-pixels", name = "radiance-substance", version = "2.5.1") - implementation(group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.4") - implementation(group = "org.apache.commons", name = "commons-text", version = "1.9") + implementation(group = "net.java.dev.jna", name = "jna-platform", version = "4.5.1") + implementation(group = "net.runelite", name = "discord", version = "1.4") + implementation(group = "net.runelite.pushingpixels", name = "substance", version = "8.0.02") + implementation(group = "net.sf.jopt-simple", name = "jopt-simple", version = "5.0.1") + implementation(group = "org.apache.commons", name = "commons-text", version = "1.2") implementation(group = "commons-io", name = "commons-io", version = "2.8.0") implementation(group = "org.jetbrains", name = "annotations", version = "20.1.0") - implementation(group = "org.jooq", name = "jooq", version = "3.14.3") - implementation(group = "org.jooq", name = "jooq-codegen", version = "3.14.3") - implementation(group = "org.jooq", name = "jooq-meta", version = "3.14.3") - implementation(group = "io.sentry", name = "sentry-logback", version = "3.1.3") implementation(group = "com.github.zafarkhaja", name = "java-semver", version = "0.9.0") - implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") - implementation(group = "org.pf4j", name = "pf4j", version = "3.5.0") { + implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") + implementation(group = "org.pf4j", name = "pf4j", version = "3.6.0") { exclude(group = "org.slf4j") } implementation(group = "org.pf4j", name = "pf4j-update", version = "2.3.0") implementation(group = "com.google.archivepatcher", name = "archive-patch-applier", version= "1.0.4") - implementation(project(":http-api")) implementation(group = "net.runelite.gluegen", name = "gluegen-rt", version = "2.4.0-rc-20200429") implementation(group = "net.runelite.jogl", name = "jogl-all", version = "2.4.0-rc-20200429") implementation(group = "net.runelite.jocl", name = "jocl", version = "1.0") - runtimeOnly(group = "org.pushing-pixels", name = "radiance-trident", version = "2.5.1") runtimeOnly(project(":runescape-api")) + runtimeOnly(group = "net.runelite.pushingpixels", name = "trident", version = "1.5.00") runtimeOnly(group = "net.runelite.gluegen", name = "gluegen-rt", version = "2.4.0-rc-20200429", classifier = "natives-linux-amd64") runtimeOnly(group = "net.runelite.gluegen", name = "gluegen-rt", version = "2.4.0-rc-20200429", classifier = "natives-windows-amd64") runtimeOnly(group = "net.runelite.gluegen", name = "gluegen-rt", version = "2.4.0-rc-20200429", classifier = "natives-windows-i586") @@ -98,18 +94,18 @@ dependencies { runtimeOnly(group = "net.runelite.jocl", name = "jocl", version = "1.0", classifier = "macos-x64") runtimeOnly(group = "net.runelite.jocl", name = "jocl", version = "1.0", classifier = "macos-arm64") - testAnnotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + testAnnotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") - testCompileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.16") + testCompileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") - testImplementation(group = "com.google.inject.extensions", name = "guice-grapher", version = "4.2.3") - testImplementation(group = "com.google.inject.extensions", name = "guice-testlib", version = "4.2.3") - testImplementation(group = "org.hamcrest", name = "hamcrest-library", version = "2.2") - testImplementation(group = "junit", name = "junit", version = "4.13.1") - testImplementation(group = "org.mockito", name = "mockito-core", version = "3.6.0") - testImplementation(group = "org.mockito", name = "mockito-inline", version = "3.6.0") - testImplementation(group = "com.squareup.okhttp3", name = "mockwebserver", version = "4.9.0") - testImplementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") + testImplementation(group = "com.google.inject.extensions", name = "guice-grapher", version = "4.1.0") + testImplementation(group = "com.google.inject.extensions", name = "guice-testlib", version = "4.1.0") + testImplementation(group = "org.hamcrest", name = "hamcrest-library", version = "1.3") + testImplementation(group = "junit", name = "junit", version = "4.12") + testImplementation(group = "org.mockito", name = "mockito-core", version = "3.1.0") + testImplementation(group = "org.mockito", name = "mockito-inline", version = "3.1.0") + testImplementation(group = "com.squareup.okhttp3", name = "mockwebserver", version = "3.7.0") + testImplementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") } fun formatDate(date: Date?) = with(date ?: Date()) { diff --git a/runelite-mixins/runelite-mixins.gradle.kts b/runelite-mixins/runelite-mixins.gradle.kts index 1fe26ca866..c6227a67b6 100644 --- a/runelite-mixins/runelite-mixins.gradle.kts +++ b/runelite-mixins/runelite-mixins.gradle.kts @@ -14,7 +14,6 @@ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND @@ -26,9 +25,9 @@ description = "RuneLite Mixins" dependencies { - compileOnly(group = "com.google.guava", name = "guava", version = "30.0-jre") + compileOnly(group = "com.google.guava", name = "guava", version = "23.2-jre") compileOnly(group = "javax.inject", name = "javax.inject", version = "1") - compileOnly(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") + compileOnly(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") compileOnly(group = "commons-io", name = "commons-io", version = "2.8.0") compileOnly(project(":injection-annotations")) compileOnly(project(":runescape-api")) diff --git a/runelite-script-assembler-plugin/runelite-script-assembler-plugin.gradle.kts b/runelite-script-assembler-plugin/runelite-script-assembler-plugin.gradle.kts index 6f92983453..1f129469dc 100644 --- a/runelite-script-assembler-plugin/runelite-script-assembler-plugin.gradle.kts +++ b/runelite-script-assembler-plugin/runelite-script-assembler-plugin.gradle.kts @@ -32,11 +32,11 @@ dependencies { compileOnly(group = "org.apache.maven.plugin-tools", name = "maven-plugin-annotations", version = "3.6.0") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") - implementation(group = "org.apache.maven", name = "maven-plugin-api", version = "3.6.3") - implementation(group = "org.slf4j", name = "slf4j-nop", version = "1.7.30") implementation(project(":cache")) implementation(project(":runelite-api")) + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") + implementation(group = "org.apache.maven", name = "maven-plugin-api", version = "3.6.3") + implementation(group = "org.slf4j", name = "slf4j-nop", version = "1.7.12") } tasks { diff --git a/runescape-client/runescape-client.gradle.kts b/runescape-client/runescape-client.gradle.kts index b47321710a..f3615cd1bf 100644 --- a/runescape-client/runescape-client.gradle.kts +++ b/runescape-client/runescape-client.gradle.kts @@ -29,9 +29,9 @@ description = "RuneScape Client" dependencies { implementation(project(":injection-annotations")) - testImplementation(group = "junit", name = "junit", version = "4.13.1") - testImplementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") - testImplementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.30") + testImplementation(group = "junit", name = "junit", version = "4.12") + testImplementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") + testImplementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.12") } tasks { diff --git a/wiki-scraper/wiki-scraper.gradle.kts b/wiki-scraper/wiki-scraper.gradle.kts index 176544d479..79bdfc0f6b 100644 --- a/wiki-scraper/wiki-scraper.gradle.kts +++ b/wiki-scraper/wiki-scraper.gradle.kts @@ -29,16 +29,16 @@ dependencies { api(project(":cache")) api(project(":runelite-api")) - annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.16") + annotationProcessor(group = "org.projectlombok", name = "lombok", version = "1.18.4") - compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.16") + compileOnly(group = "org.projectlombok", name = "lombok", version = "1.18.4") - implementation(group = "com.google.code.gson", name = "gson", version = "2.8.6") - implementation(group = "com.google.guava", name = "guava", version = "30.0-jre") + implementation(group = "com.google.code.gson", name = "gson", version = "2.8.5") + implementation(group = "com.google.guava", name = "guava", version = "23.2-jre") implementation(group = "com.github.petitparser", name = "java-petitparser", version = "2.3.1") - implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "4.9.0") - implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.30") - implementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.30") + implementation(group = "com.squareup.okhttp3", name = "okhttp", version = "3.7.0") + implementation(group = "org.slf4j", name = "slf4j-api", version = "1.7.12") + implementation(group = "org.slf4j", name = "slf4j-simple", version = "1.7.12") implementation(group = "org.junit.jupiter", name = "junit-jupiter-api", version = "5.7.0") } From a3becd39e2f22abd5f6f3faebe74309eaac0a049 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Mon, 22 Feb 2021 18:38:22 +0100 Subject: [PATCH 2/8] client: Allow loading externals from source --- .../java/com/openosrs/client/OpenOSRS.java | 23 +++++++- .../OPRSExternalPf4jPluginManager.java | 41 +++++++++++--- .../plugins/OPRSExternalPluginManager.java | 54 ++++++++++++------- 3 files changed, 92 insertions(+), 26 deletions(-) diff --git a/runelite-client/src/main/java/com/openosrs/client/OpenOSRS.java b/runelite-client/src/main/java/com/openosrs/client/OpenOSRS.java index 4d64898bce..53e83b4869 100644 --- a/runelite-client/src/main/java/com/openosrs/client/OpenOSRS.java +++ b/runelite-client/src/main/java/com/openosrs/client/OpenOSRS.java @@ -1,22 +1,28 @@ package com.openosrs.client; +import com.google.common.base.Strings; import java.io.File; import java.io.IOException; import java.util.Properties; import java.util.UUID; +import lombok.AccessLevel; +import lombok.Getter; public class OpenOSRS { public static final File OPENOSRS_DIR = new File(System.getProperty("user.home"), ".openosrs"); public static final File EXTERNALPLUGIN_DIR = new File(OPENOSRS_DIR, "plugins"); + public static final String PLUGIN_DEVELOPMENT_PATH = "plugin.development.path"; public static final String SYSTEM_VERSION; public static final String SYSTEM_API_VERSION; + @Getter(AccessLevel.PACKAGE) + private static final Properties properties = new Properties(); + public static String uuid = UUID.randomUUID().toString(); static { - Properties properties = new Properties(); try { properties.load(OpenOSRS.class.getResourceAsStream("/openosrs.properties")); @@ -25,10 +31,25 @@ public class OpenOSRS { e.printStackTrace(); } + SYSTEM_VERSION = properties.getProperty("oprs.version", "0.0.0"); SYSTEM_API_VERSION = properties.getProperty("oprs.api.version"); } + public static String[] getPluginDevelopmentPath() + { + // First check if property supplied as environment variable PLUGIN_DEVELOPMENT_PATHS + String developmentPluginPaths = System.getenv(PLUGIN_DEVELOPMENT_PATH.replace('.', '_').toUpperCase()); + + if (Strings.isNullOrEmpty(developmentPluginPaths)) + { + // Otherwise check the property file + developmentPluginPaths = properties.getProperty(PLUGIN_DEVELOPMENT_PATH); + } + + return Strings.isNullOrEmpty(developmentPluginPaths) ? new String[0] : developmentPluginPaths.split(";"); + } + public static void preload() { } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPf4jPluginManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPf4jPluginManager.java index 30abbfa8eb..cbbe334f48 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPf4jPluginManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPf4jPluginManager.java @@ -5,6 +5,7 @@ import java.io.Closeable; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; @@ -19,6 +20,7 @@ import org.pf4j.CompoundPluginLoader; import org.pf4j.CompoundPluginRepository; import org.pf4j.DefaultPluginManager; import org.pf4j.DependencyResolver; +import org.pf4j.DevelopmentPluginRepository; import org.pf4j.JarPluginLoader; import org.pf4j.JarPluginRepository; import org.pf4j.ManifestPluginDescriptorFinder; @@ -35,12 +37,9 @@ import org.pf4j.RuntimeMode; @Slf4j class OPRSExternalPf4jPluginManager extends DefaultPluginManager { - private final OPRSExternalPluginManager externalPluginManager; - - public OPRSExternalPf4jPluginManager(OPRSExternalPluginManager externalPluginManager) + public OPRSExternalPf4jPluginManager() { super(OpenOSRS.EXTERNALPLUGIN_DIR.toPath()); - this.externalPluginManager = externalPluginManager; } @Override @@ -68,8 +67,30 @@ class OPRSExternalPf4jPluginManager extends DefaultPluginManager { CompoundPluginRepository compoundPluginRepository = new CompoundPluginRepository(); - JarPluginRepository jarPluginRepository = new JarPluginRepository(getPluginsRoot()); - compoundPluginRepository.add(jarPluginRepository); + if (isNotDevelopment()) + { + JarPluginRepository jarPluginRepository = new JarPluginRepository(getPluginsRoot()); + compoundPluginRepository.add(jarPluginRepository); + } + + if (isDevelopment()) + { + for (String developmentPluginPath : OpenOSRS.getPluginDevelopmentPath()) + { + DevelopmentPluginRepository developmentPluginRepository = new DevelopmentPluginRepository(Paths.get(developmentPluginPath)) + { + @Override + public boolean deletePluginPath(Path pluginPath) + { + // Do nothing, because we'd be deleting our sources! + return filter.accept(pluginPath.toFile()); + } + }; + + developmentPluginRepository.setFilter(new OPRSExternalPluginFileFilter()); + compoundPluginRepository.add(developmentPluginRepository); + } + } return compoundPluginRepository; } @@ -121,6 +142,12 @@ class OPRSExternalPf4jPluginManager extends DefaultPluginManager { if (!(e instanceof PluginAlreadyLoadedException)) { + if (!OPRSExternalPluginManager.isDevelopmentMode()) + { + String plugin = pluginPath.toString().substring(pluginsRoots.get(0).toString().length() + 1); + duplicatePlugins.add(plugin); + } + log.error("Could not load plugin {}", pluginPath, e); } } @@ -220,7 +247,7 @@ class OPRSExternalPf4jPluginManager extends DefaultPluginManager @Override public RuntimeMode getRuntimeMode() { - return RuntimeMode.DEPLOYMENT; + return OPRSExternalPluginManager.isDevelopmentMode() ? RuntimeMode.DEVELOPMENT : RuntimeMode.DEPLOYMENT; } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPluginManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPluginManager.java index dd6c86d1ee..81c63f272d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPluginManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/OPRSExternalPluginManager.java @@ -33,6 +33,7 @@ import com.google.inject.CreationException; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; +import com.openosrs.client.OpenOSRS; import static com.openosrs.client.OpenOSRS.EXTERNALPLUGIN_DIR; import static com.openosrs.client.OpenOSRS.SYSTEM_API_VERSION; import com.openosrs.client.config.OpenOSRSConfig; @@ -108,6 +109,8 @@ public class OPRSExternalPluginManager private final ConfigManager configManager; private final Map pluginsMap = new HashMap<>(); @Getter(AccessLevel.PUBLIC) + private static final boolean developmentMode = OpenOSRS.getPluginDevelopmentPath().length > 0; + @Getter(AccessLevel.PUBLIC) private final Map> pluginsInfoMap = new HashMap<>(); private final Groups groups; @Getter(AccessLevel.PUBLIC) @@ -143,7 +146,7 @@ public class OPRSExternalPluginManager private void initPluginManager() { - externalPluginManager = new OPRSExternalPf4jPluginManager(this); + externalPluginManager = new OPRSExternalPf4jPluginManager(); externalPluginManager.setSystemVersion(SYSTEM_API_VERSION); } @@ -826,29 +829,39 @@ public class OPRSExternalPluginManager try { - PluginInfo.PluginRelease latest = updateManager.getLastPluginRelease(pluginId); - - // Null version returns the last release version of this plugin for given system version - if (latest == null) + if (!developmentMode) { - try + PluginInfo.PluginRelease latest = updateManager.getLastPluginRelease(pluginId); + + // Null version returns the last release version of this plugin for given system version + if (latest == null) { - SwingUtil.syncExec(() -> - JOptionPane.showMessageDialog(ClientUI.getFrame(), - pluginId + " is outdated and cannot be installed", - "Installation error", - JOptionPane.ERROR_MESSAGE)); - } - catch (InvocationTargetException | InterruptedException ignored) - { - return false; + try + { + SwingUtil.syncExec(() -> + JOptionPane.showMessageDialog(ClientUI.getFrame(), + pluginId + " is outdated and cannot be installed", + "Installation error", + JOptionPane.ERROR_MESSAGE)); + } + catch (InvocationTargetException | InterruptedException ignored) + { + return false; + } + + return true; } - return true; + updateManager.installPlugin(pluginId, null); + scanAndInstantiate(loadPlugin(pluginId), true, true); + } + else + { + // In development mode our plugin will already be present in a repository, so we can just load it + externalPluginManager.loadPlugins(); + externalPluginManager.startPlugin(pluginId); } - updateManager.installPlugin(pluginId, null); - scanAndInstantiate(loadPlugin(pluginId), true, true); ExternalPluginsChanged event = new ExternalPluginsChanged(null); eventBus.post(event); groups.broadcastSring("STARTEXTERNAL;" + pluginId); @@ -908,6 +921,11 @@ public class OPRSExternalPluginManager log.info("Not updating external plugins since there is more than 1 client open"); return; } + else if (developmentMode) + { + log.info("Not updating because we're running in developer mode"); + return; + } OpenOSRSSplashScreen.stage(.59, "Updating external plugins"); From 185826b835e7ccef8c896bb3e701affd36251284 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Mon, 22 Feb 2021 19:00:32 +0100 Subject: [PATCH 3/8] config: Reload button for external plugins in development mode --- .../client/plugins/config/PluginListItem.java | 67 +++++++++++++++++- .../plugins/config/PluginListPanel.java | 6 +- .../client/plugins/config/refresh.png | Bin 0 -> 211 bytes 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java index 767fddbc1a..6c3099fa36 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java @@ -37,17 +37,23 @@ import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JMenuItem; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JToggleButton; import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; import javax.swing.border.EmptyBorder; import lombok.Getter; +import net.runelite.client.RuneLiteProperties; import net.runelite.client.externalplugins.ExternalPluginManifest; +import net.runelite.client.plugins.OPRSExternalPluginManager; +import net.runelite.client.ui.ClientUI; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.PluginPanel; import net.runelite.client.util.ImageUtil; @@ -57,6 +63,8 @@ class PluginListItem extends JPanel implements SearchablePlugin { private static final ImageIcon CONFIG_ICON; private static final ImageIcon CONFIG_ICON_HOVER; + private static final ImageIcon REFRESH_ICON; + private static final ImageIcon REFRESH_ICON_HOVER; private static final ImageIcon ON_STAR; private static final ImageIcon OFF_STAR; @@ -74,10 +82,13 @@ class PluginListItem extends JPanel implements SearchablePlugin static { BufferedImage configIcon = ImageUtil.loadImageResource(ConfigPanel.class, "config_edit_icon.png"); + BufferedImage refreshIcon = ImageUtil.getResourceStreamFromClass(ConfigPanel.class, "refresh.png"); BufferedImage onStar = ImageUtil.loadImageResource(ConfigPanel.class, "star_on.png"); CONFIG_ICON = new ImageIcon(configIcon); + REFRESH_ICON = new ImageIcon(refreshIcon); ON_STAR = new ImageIcon(onStar); CONFIG_ICON_HOVER = new ImageIcon(ImageUtil.luminanceOffset(configIcon, -100)); + REFRESH_ICON_HOVER = new ImageIcon(ImageUtil.luminanceOffset(refreshIcon, -100)); BufferedImage offStar = ImageUtil.luminanceScale( ImageUtil.grayscaleImage(onStar), @@ -86,7 +97,7 @@ class PluginListItem extends JPanel implements SearchablePlugin OFF_STAR = new ImageIcon(offStar); } - PluginListItem(PluginListPanel pluginListPanel, PluginConfigurationDescriptor pluginConfig) + PluginListItem(PluginListPanel pluginListPanel, PluginConfigurationDescriptor pluginConfig, OPRSExternalPluginManager oprsExternalPluginManager) { this.pluginListPanel = pluginListPanel; this.pluginConfig = pluginConfig; @@ -133,6 +144,60 @@ class PluginListItem extends JPanel implements SearchablePlugin buttonPanel.setLayout(new GridLayout(1, 2)); add(buttonPanel, BorderLayout.LINE_END); + Map> pluginsInfoMap = oprsExternalPluginManager.getPluginsInfoMap(); + + if ((OPRSExternalPluginManager.isDevelopmentMode() || RuneLiteProperties.getLauncherVersion() == null) && pluginConfig.getPlugin() != null && pluginsInfoMap.containsKey(pluginConfig.getPlugin().getClass().getSimpleName())) + { + JButton hotSwapButton = new JButton(REFRESH_ICON); + hotSwapButton.setRolloverIcon(REFRESH_ICON_HOVER); + SwingUtil.removeButtonDecorations(hotSwapButton); + hotSwapButton.setPreferredSize(new Dimension(25, 0)); + hotSwapButton.setVisible(false); + buttonPanel.add(hotSwapButton); + + hotSwapButton.addActionListener(e -> + { + Map pluginInfo = pluginsInfoMap.get(pluginConfig.getPlugin().getClass().getSimpleName()); + String pluginId = pluginInfo.get("id"); + + hotSwapButton.setIcon(REFRESH_ICON); + + new SwingWorker<>() + { + @Override + protected Boolean doInBackground() + { + return oprsExternalPluginManager.uninstall(pluginId); + } + + @Override + protected void done() + { + // In development mode our plugins will be loaded directly from sources, so we don't need to prompt + if (!OPRSExternalPluginManager.isDevelopmentMode()) + { + JOptionPane.showMessageDialog(ClientUI.getFrame(), + pluginId + " is unloaded, put the new jar file in the externalmanager folder and click `ok`", + "Hotswap " + pluginId, + JOptionPane.INFORMATION_MESSAGE); + } + + new SwingWorker<>() + { + @Override + protected Boolean doInBackground() + { + return oprsExternalPluginManager.reloadStart(pluginId); + } + }.execute(); + } + }.execute(); + }); + + hotSwapButton.setVisible(true); + hotSwapButton.setToolTipText("Hotswap plugin"); + } + JMenuItem configMenuItem = null; if (pluginConfig.hasConfigurables()) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java index 286b534877..b4ce131eb7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListPanel.java @@ -57,6 +57,7 @@ import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.ExternalPluginsChanged; import net.runelite.client.events.PluginChanged; import net.runelite.client.externalplugins.ExternalPluginManager; +import net.runelite.client.plugins.OPRSExternalPluginManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginInstantiationException; @@ -93,6 +94,7 @@ class PluginListPanel extends PluginPanel @Getter private final ExternalPluginManager externalPluginManager; + private final OPRSExternalPluginManager oprsExternalPluginManager; @Getter private final MultiplexingPluginPanel muxer; @@ -107,6 +109,7 @@ class PluginListPanel extends PluginPanel ConfigManager configManager, PluginManager pluginManager, ExternalPluginManager externalPluginManager, + OPRSExternalPluginManager oprsExternalPluginManager, EventBus eventBus, Provider configPanelProvider, Provider pluginHubPanelProvider) @@ -116,6 +119,7 @@ class PluginListPanel extends PluginPanel this.configManager = configManager; this.pluginManager = pluginManager; this.externalPluginManager = externalPluginManager; + this.oprsExternalPluginManager = oprsExternalPluginManager; this.configPanelProvider = configPanelProvider; muxer = new MultiplexingPluginPanel(this) @@ -215,7 +219,7 @@ class PluginListPanel extends PluginPanel ) .map(desc -> { - PluginListItem listItem = new PluginListItem(this, desc); + PluginListItem listItem = new PluginListItem(this, desc, oprsExternalPluginManager); listItem.setPinned(pinnedPlugins.contains(desc.getName())); return listItem; }) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png b/runelite-client/src/main/resources/net/runelite/client/plugins/config/refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..cd26305f7a8c54a4c05a0b587352fde61e12f474 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|mW_h|ehEy;fxv1*o!YJZ!vESWj z4cqeMxi*{GO&+e>y}<9tUB$n$58kz#8b5g~oAe)TSmDAoHa$9#W_(ESs zRlv@*TZBuhwyxIlaNp~F Date: Mon, 22 Feb 2021 19:07:21 +0100 Subject: [PATCH 4/8] config: Add metadata to external plugins configs --- .../client/plugins/config/ConfigPanel.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java index b176bf154b..c818ac9085 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java @@ -27,10 +27,15 @@ package net.runelite.client.plugins.config; import com.google.common.base.Strings; import com.google.common.collect.ComparisonChain; import com.google.common.primitives.Ints; +import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridLayout; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; @@ -54,6 +59,7 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JScrollPane; +import javax.swing.JSeparator; import javax.swing.JSpinner; import javax.swing.JTextArea; import javax.swing.ScrollPaneConstants; @@ -86,6 +92,7 @@ import net.runelite.client.events.ExternalPluginsChanged; import net.runelite.client.events.PluginChanged; import net.runelite.client.externalplugins.ExternalPluginManager; import net.runelite.client.externalplugins.ExternalPluginManifest; +import net.runelite.client.plugins.OPRSExternalPluginManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginManager; import net.runelite.client.ui.ColorScheme; @@ -98,6 +105,7 @@ import net.runelite.client.ui.components.colorpicker.ColorPickerManager; import net.runelite.client.ui.components.colorpicker.RuneliteColorPicker; import net.runelite.client.util.ColorUtil; import net.runelite.client.util.ImageUtil; +import net.runelite.client.util.LinkBrowser; import net.runelite.client.util.SwingUtil; import net.runelite.client.util.Text; @@ -130,6 +138,9 @@ class ConfigPanel extends PluginPanel @Inject private ExternalPluginManager externalPluginManager; + @Inject + private OPRSExternalPluginManager oprsExternalPluginManager; + @Inject private ColorPickerManager colorPickerManager; @@ -255,6 +266,53 @@ class ConfigPanel extends PluginPanel ConfigDescriptor cd = pluginConfig.getConfigDescriptor(); + Map> pluginsInfoMap = oprsExternalPluginManager.getPluginsInfoMap(); + + if (pluginConfig.getPlugin() != null && pluginsInfoMap.containsKey(pluginConfig.getPlugin().getClass().getSimpleName())) + { + + JPanel infoPanel = new JPanel(); + infoPanel.setBackground(ColorScheme.DARKER_GRAY_COLOR); + infoPanel.setBorder(new EmptyBorder(10, 10, 10, 10)); + infoPanel.setLayout(new GridLayout(0, 1)); + + final Font smallFont = FontManager.getRunescapeSmallFont(); + + Map pluginInfo = pluginsInfoMap.get(pluginConfig.getPlugin().getClass().getSimpleName()); + + JLabel idLabel = new JLabel(htmlLabel("id", pluginInfo.get("id"))); + idLabel.setFont(smallFont); + infoPanel.add(idLabel); + + JLabel versionLabel = new JLabel(htmlLabel("version", pluginInfo.get("version"))); + versionLabel.setFont(smallFont); + infoPanel.add(versionLabel); + + JLabel providerLabel = new JLabel(htmlLabel("provider", pluginInfo.get("provider"))); + providerLabel.setFont(smallFont); + infoPanel.add(providerLabel); + + JButton button = new JButton("Support"); + button.addActionListener(e -> LinkBrowser.browse(pluginInfo.get("support"))); + + JSeparator separator = new JSeparator() + { + @Override + protected void paintComponent(Graphics g) + { + int width = this.getSize().width; + Graphics2D g2 = (Graphics2D) g; + g2.setStroke(new BasicStroke(2)); + g2.setColor(ColorScheme.BRAND_BLUE); + g2.drawLine(0, 0, width, 0); + } + }; + + mainPanel.add(infoPanel); + mainPanel.add(button); + mainPanel.add(separator); + } + final Map sectionWidgets = new HashMap<>(); final Map topLevelPanels = new TreeMap<>((a, b) -> ComparisonChain.start() @@ -704,4 +762,9 @@ class ConfigPanel extends PluginPanel }); return menuItem; } + + private static String htmlLabel(String key, String value) + { + return "" + key + ": " + value + ""; + } } From 210eecc6b6498a03d34a1b24dcdcf7559365ae6a Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Mon, 22 Feb 2021 21:13:31 +0100 Subject: [PATCH 5/8] config: Support for titles --- .../client/config/ConfigDescriptor.java | 4 +- .../runelite/client/config/ConfigItem.java | 2 + .../runelite/client/config/ConfigManager.java | 26 +++++++- .../runelite/client/config/ConfigTitle.java | 51 +++++++++++++++ .../client/config/ConfigTitleDescriptor.java | 52 ++++++++++++++++ .../client/plugins/config/ConfigPanel.java | 62 ++++++++++++++++++- 6 files changed, 192 insertions(+), 5 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/config/ConfigTitle.java create mode 100644 runelite-client/src/main/java/net/runelite/client/config/ConfigTitleDescriptor.java diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java index b234e756d6..19554fad18 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigDescriptor.java @@ -32,12 +32,14 @@ public class ConfigDescriptor { private final ConfigGroup group; private final Collection sections; + private final Collection titles; private final Collection items; - public ConfigDescriptor(ConfigGroup group, Collection sections, Collection items) + public ConfigDescriptor(ConfigGroup group, Collection sections, Collection titles, Collection items) { this.group = group; this.sections = sections; + this.titles = titles; this.items = items; } } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java index a9a511cc08..80ff98d85c 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigItem.java @@ -48,4 +48,6 @@ public @interface ConfigItem boolean secret() default false; String section() default ""; + + String title() default ""; } diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java index 42a6d4e965..4bba6fb2c5 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java @@ -647,6 +647,30 @@ public class ConfigManager .result()) .collect(Collectors.toList()); + final List titles = Arrays.stream(inter.getDeclaredFields()) + .filter(m -> m.isAnnotationPresent(ConfigTitle.class) && m.getType() == String.class) + .map(m -> + { + try + { + return new ConfigTitleDescriptor( + String.valueOf(m.get(inter)), + m.getDeclaredAnnotation(ConfigTitle.class) + ); + } + catch (IllegalAccessException e) + { + log.warn("Unable to load title {}::{}", inter.getSimpleName(), m.getName()); + return null; + } + }) + .filter(Objects::nonNull) + .sorted((a, b) -> ComparisonChain.start() + .compare(a.getTitle().position(), b.getTitle().position()) + .compare(a.getTitle().name(), b.getTitle().name()) + .result()) + .collect(Collectors.toList()); + final List items = Arrays.stream(inter.getMethods()) .filter(m -> m.getParameterCount() == 0 && m.isAnnotationPresent(ConfigItem.class)) .map(m -> new ConfigItemDescriptor( @@ -662,7 +686,7 @@ public class ConfigManager .result()) .collect(Collectors.toList()); - return new ConfigDescriptor(group, sections, items); + return new ConfigDescriptor(group, sections, titles, items); } /** diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigTitle.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigTitle.java new file mode 100644 index 0000000000..649beae4a0 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigTitle.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2019, Hydrox6 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.config; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ConfigTitle +{ + String name(); + + String description(); + + int position(); + + String title() default ""; + + /* + OpenOSRS Lazy Helpers tm + */ + String keyName() default ""; + String section() default ""; + boolean hidden() default false; + String unhide() default ""; +} diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigTitleDescriptor.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigTitleDescriptor.java new file mode 100644 index 0000000000..17413d574d --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigTitleDescriptor.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020, Hydrox6 + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.config; + +import lombok.Value; + +@Value +public class ConfigTitleDescriptor implements ConfigObject +{ + private final String key; + private final ConfigTitle title; + + @Override + public String key() + { + return key; + } + + @Override + public String name() + { + return title.name(); + } + + @Override + public int position() + { + return title.position(); + } +} \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java index b176bf154b..a521711678 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/config/ConfigPanel.java @@ -76,6 +76,8 @@ import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ConfigObject; import net.runelite.client.config.ConfigSection; import net.runelite.client.config.ConfigSectionDescriptor; +import net.runelite.client.config.ConfigTitle; +import net.runelite.client.config.ConfigTitleDescriptor; import net.runelite.client.config.Keybind; import net.runelite.client.config.ModifierlessKeybind; import net.runelite.client.config.Range; @@ -256,6 +258,7 @@ class ConfigPanel extends PluginPanel ConfigDescriptor cd = pluginConfig.getConfigDescriptor(); final Map sectionWidgets = new HashMap<>(); + final Map titleWidgets = new HashMap<>(); final Map topLevelPanels = new TreeMap<>((a, b) -> ComparisonChain.start() .compare(a.position(), b.position()) @@ -323,6 +326,53 @@ class ConfigPanel extends PluginPanel topLevelPanels.put(csd, section); } + for (ConfigTitleDescriptor ctd : cd.getTitles()) + { + ConfigTitle ct = ctd.getTitle(); + final JPanel title = new JPanel(); + title.setLayout(new BoxLayout(title, BoxLayout.Y_AXIS)); + title.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + + final JPanel sectionHeader = new JPanel(); + sectionHeader.setLayout(new BorderLayout()); + sectionHeader.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + + title.add(sectionHeader, BorderLayout.NORTH); + + String name = ct.name(); + final JLabel sectionName = new JLabel(name); + sectionName.setForeground(ColorScheme.BRAND_ORANGE); + sectionName.setFont(FontManager.getRunescapeBoldFont()); + sectionName.setToolTipText("" + name + ":
" + ct.description() + ""); + sectionName.setBorder(new EmptyBorder(0, 0, 3, 1)); + sectionHeader.add(sectionName, BorderLayout.CENTER); + + final JPanel sectionContents = new JPanel(); + sectionContents.setLayout(new DynamicGridLayout(0, 1, 0, 5)); + sectionContents.setMinimumSize(new Dimension(PANEL_WIDTH, 0)); + sectionContents.setBorder(new EmptyBorder(0, 5, 0, 0)); + title.add(sectionContents, BorderLayout.SOUTH); + + titleWidgets.put(ctd.getKey(), sectionContents); + + // Allow for sub-sections + JPanel section = sectionWidgets.get(ct.section()); + JPanel titleSection = titleWidgets.get(ct.title()); + + if (section != null) + { + section.add(title); + } + else if (titleSection != null) + { + titleSection.add(title); + } + else + { + topLevelPanels.put(ctd, title); + } + } + for (ConfigItemDescriptor cid : cd.getItems()) { if (cid.getItem().hidden()) @@ -567,13 +617,19 @@ class ConfigPanel extends PluginPanel } JPanel section = sectionWidgets.get(cid.getItem().section()); - if (section == null) + JPanel title = titleWidgets.get(cid.getItem().title()); + + if (section != null) { - topLevelPanels.put(cid, item); + section.add(item); + } + else if (title != null) + { + title.add(item); } else { - section.add(item); + topLevelPanels.put(cid, item); } } From 6c45d1d3bbbedbfe9b7cbd0afe110dc7ba10cfa3 Mon Sep 17 00:00:00 2001 From: Andrey Kaipov Date: Sat, 3 Oct 2020 17:56:10 -0400 Subject: [PATCH 6/8] config: Support inheritance --- .../runelite/client/config/ConfigManager.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java index 42a6d4e965..c6cc52a9e3 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigManager.java @@ -56,6 +56,8 @@ import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; +import java.util.Collection; +import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -65,6 +67,7 @@ import java.util.Map; import java.util.Objects; import java.util.Properties; import java.util.Set; +import java.util.Stack; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; @@ -680,7 +683,7 @@ public class ConfigManager return; } - for (Method method : clazz.getDeclaredMethods()) + for (Method method : getAllDeclaredInterfaceMethods(clazz)) { ConfigItem item = method.getAnnotation(ConfigItem.class); @@ -868,6 +871,25 @@ public class ConfigManager return object == null ? null : object.toString(); } + /** + * Does DFS on a class's interfaces to find all of its implemented methods. + */ + private Collection getAllDeclaredInterfaceMethods(Class clazz) + { + Collection methods = new HashSet<>(); + Stack> interfazes = new Stack<>(); + interfazes.push(clazz); + + while (!interfazes.isEmpty()) + { + Class interfaze = interfazes.pop(); + Collections.addAll(methods, interfaze.getDeclaredMethods()); + Collections.addAll(interfazes, interfaze.getInterfaces()); + } + + return methods; + } + @Subscribe(priority = 100) private void onClientShutdown(ClientShutdown e) { From fdd8cec7210a94630e702600725b23829255e600 Mon Sep 17 00:00:00 2001 From: Kyle <48519776+xKylee@users.noreply.github.com> Date: Mon, 22 Feb 2021 21:17:53 +0000 Subject: [PATCH 7/8] api: add missing API components api: add missing API components --- .../java/net/runelite/api/AnimationID.java | 294 +++++++++++++++++- .../net/runelite/api/widgets/WidgetID.java | 6 +- .../net/runelite/api/widgets/WidgetInfo.java | 5 +- 3 files changed, 293 insertions(+), 12 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/AnimationID.java b/runelite-api/src/main/java/net/runelite/api/AnimationID.java index 7c4d40e61c..d554b0fa8e 100644 --- a/runelite-api/src/main/java/net/runelite/api/AnimationID.java +++ b/runelite-api/src/main/java/net/runelite/api/AnimationID.java @@ -111,7 +111,17 @@ public final class AnimationID public static final int FISHING_DRAGON_HARPOON_OR = 88; public static final int FISHING_INFERNAL_HARPOON = 7402; public static final int FISHING_CRYSTAL_HARPOON = 8336; + public static final int CRYSTALLINE_RAT_DEATH = 8334; + public static final int CRYSTALLINE_BAT_DEATH = 4917; + public static final int CRYSTALLINE_WOLF_DEATH = 8335; + public static final int CRYSTALLINE_SPIDER_DEATH = 8338; + public static final int CRYSTALLINE_UNICORN_DEATH = 6377; + public static final int CRYSTALLINE_DRAGON_DEATH = 92; + public static final int CRYSTALLINE_BEAR_DEATH = 4929; + public static final int CRYSTALLINE_DARK_BEAST_DEATH = 2733; + public static final int CORRUPTED_SCORPION_DEATH = 6256; public static final int FISHING_TRAILBLAZER_HARPOON = 8784; // Same animation as Infernal harpoon (or) + public static final int FISHING_TRAILBLAZER_HARPOON_2 = 8785; public static final int FISHING_OILY_ROD = 622; public static final int FISHING_KARAMBWAN = 1193; public static final int FISHING_CRUSHING_INFERNAL_EELS = 7553; @@ -171,6 +181,7 @@ public final class AnimationID public static final int HERBLORE_POTIONMAKING = 363; //used for both herb and secondary public static final int MAGIC_CHARGING_ORBS = 726; public static final int MAGIC_MAKE_TABLET = 4068; + public static final int TABLET_TELEPORT = 4069; public static final int MAGIC_ENCHANTING_JEWELRY = 931; public static final int MAGIC_ENCHANTING_AMULET_1 = 719; // sapphire, opal, diamond public static final int MAGIC_ENCHANTING_AMULET_2 = 720; // emerald, jade, dragonstone @@ -208,18 +219,77 @@ public final class AnimationID public static final int SAND_COLLECTION = 895; public static final int PISCARILIUS_CRANE_REPAIR = 7199; public static final int HOME_MAKE_TABLET = 4067; + public static final int THIEVING_STALL = 832; + public static final int PICKPOCKET_SUCCESS = 881; + public static final int PULL_LEVER = 2140; + public static final int STANDARD_PURPLE_TELEPORT = 714; + public static final int ECTOPHIAL_TELEPORT = 878; + public static final int FAIRY_RING_TELEPORT = 3265; + public static final int SCROLL_TELEPORT = 3864; + public static final int XERICS_TALISMAN_TELEPORT = 3865; + public static final int WILDERNESS_OBELISK_TELEPORT = 3945; + public static final int SEED_POD_TELEPORT = 4544; + + //block animations for players and perhaps npcs as well? + public static final int BLOCK_DEFENDER = 4177; + public static final int BLOCK_NO_SHIELD = 420; + public static final int BLOCK_SHIELD = 1156; + public static final int BLOCK_SWORD = 388; + public static final int BLOCK_UNARMED = 424; // Same Animation as failed pickpocked public static final int DRAGONFIRE_SHIELD_SPECIAL = 6696; - // Ectofuntus animations - public static final int ECTOFUNTUS_FILL_SLIME_BUCKET = 4471; - public static final int ECTOFUNTUS_GRIND_BONES = 1648; - public static final int ECTOFUNTUS_INSERT_BONES = 1649; - public static final int ECTOFUNTUS_EMPTY_BIN = 1650; + //Player Emotes + public static final int YES = 855; + public static final int NO = 856; + public static final int BOW = 858; + public static final int ANGRY = 859; + public static final int THINK = 857; + public static final int WAVE = 863; + public static final int SHRUG = 2113; + public static final int CHEER = 862; + public static final int BECKON = 864; + public static final int LAUGH = 861; + public static final int JUMP_FOR_JOY = 2109; + public static final int YAWN = 2111; + public static final int DANCE = 866; + public static final int JIG = 2106; + public static final int SPIN = 2107; + public static final int HEAD_BANG = 2108; + public static final int CRY = 860; + public static final int BLOW_KISS = 1374; + public static final int PANIC = 2105; + public static final int RASPBERRY = 2110; + public static final int CLAP = 865; + public static final int SALUTE = 2112; + public static final int GOBLIN_BOW = 2127; + public static final int GOBLIN_SALUTE = 2128; - // NPC animations - public static final int TZTOK_JAD_MAGIC_ATTACK = 2656; - public static final int TZTOK_JAD_RANGE_ATTACK = 2652; - public static final int HELLHOUND_DEFENCE = 6566; + // Combat counter + public static final int BARRAGE_ANIMATION = 1979; + public static final int BLITZ_ANIMATION = 1978; + public static final int CHIN_ANIMATION = 7618; + + //Supplies Tracker + public static final int ONEHAND_SLASH_SWORD_ANIMATION = 390; + public static final int ONEHAND_STAB_SWORD_ANIMATION = 386; + public static final int SCYTHE_OF_VITUR_ANIMATION = 8056; + public static final int LOW_LEVEL_STANDARD_SPELLS = 711; + public static final int WAVE_SPELL_ANIMATION = 727; + public static final int SURGE_SPELL_ANIMATION = 7855; + public static final int HIGH_ALCH_ANIMATION = 713; + public static final int LUNAR_HUMIDIFY = 6294; + public static final int PRAY_AT_ALTAR = 645; + public static final int ENSOULED_HEADS_ANIMATION = 7198; + + // Weapon attack animations + public static final int ONEHAND_SLASH_AXE_ANIMATION = 395; + public static final int ONEHAND_CRUSH_PICKAXE_ANIMATION = 400; + public static final int ONEHAND_CRUSH_AXE_ANIMATION = 401; + public static final int UNARMED_PUNCH_ANIMATION = 422; + public static final int UNARMED_KICK_ANIMATION = 423; + public static final int BOW_ATTACK_ANIMATION = 426; + public static final int ONEHAND_STAB_HALBERD_ANIMATION = 428; + public static final int ONEHAND_SLASH_HALBERD_ANIMATION = 440; // Farming public static final int FARMING_HARVEST_FRUIT_TREE = 2280; @@ -255,7 +325,211 @@ public final class AnimationID public static final int ROCKSLUG_DEATH = 1568; public static final int ZYGOMITE_DEATH = 3327; public static final int IMP_DEATH = 172; + public static final int NIGHTMARE_DEATH = 8612; // POH Animations public static final int INCENSE_BURNER = 3687; -} + public static final int LOW_LEVEL_MAGIC_ATTACK = 1162; + public static final int HIGH_LEVEL_MAGIC_ATTACK = 1167; + public static final int BLOWPIPE_ATTACK = 5061; + + // Ectofuntus animations + public static final int ECTOFUNTUS_FILL_SLIME_BUCKET = 4471; + public static final int ECTOFUNTUS_GRIND_BONES = 1648; + public static final int ECTOFUNTUS_INSERT_BONES = 1649; + public static final int ECTOFUNTUS_EMPTY_BIN = 1650; + + // NPC animations + public static final int HELLHOUND_DEFENCE = 6566; + public static final int BLACKJACK_KO = 838; + + // Fight Caves + public static final int TZTOK_JAD_RANGE_ATTACK = 2652; + public static final int TZTOK_JAD_MELEE_ATTACK = 2655; + public static final int TZTOK_JAD_MAGIC_ATTACK = 2656; + public static final int TOK_XIL_RANGE_ATTACK = 2633; + public static final int TOK_XIL_MELEE_ATTACK = 2628; + public static final int KET_ZEK_MELEE_ATTACK = 2644; + public static final int KET_ZEK_MAGE_ATTACK = 2647; + public static final int MEJ_KOT_MELEE_ATTACK = 2637; + public static final int MEJ_KOT_HEAL_ATTACK = 2639; + + // Vorkath + public static final int VORKATH_WAKE_UP = 7950; + public static final int VORKATH_DEATH = 7949; + public static final int VORKATH_SLASH_ATTACK = 7951; + public static final int VORKATH_ATTACK = 7952; + public static final int VORKATH_FIRE_BOMB_OR_SPAWN_ATTACK = 7960; + public static final int VORKATH_ACID_ATTACK = 7957; + + // Tekton + public static final int TEKTON_ANVIL = 7475; + public static final int TEKTON_AUTO1 = 7482; + public static final int TEKTON_AUTO2 = 7483; + public static final int TEKTON_AUTO3 = 7484; + public static final int TEKTON_FAST_AUTO1 = 7478; + public static final int TEKTON_FAST_AUTO2 = 7488; + public static final int TEKTON_ENRAGE_AUTO1 = 7492; + public static final int TEKTON_ENRAGE_AUTO2 = 7493; + public static final int TEKTON_ENRAGE_AUTO3 = 7494; + + // Hydra + public static final int HYDRA_WALKING = 8232; + public static final int HYDRA_IDLE = 8233; + public static final int HYDRA_POISON_1 = 8234; + public static final int HYDRA_RANGED_1 = 8235; + public static final int HYDRA_MAGIC_1 = 8236; + public static final int HYDRA_1_1 = 8237; + public static final int HYDRA_1_2 = 8238; + public static final int HYDRA_LIGHTNING = 8241; + public static final int HYDRA_RANGED_2 = 8242; + public static final int HYDRA_MAGIC_2 = 8243; + public static final int HYDRA_2_1 = 8244; + public static final int HYDRA_2_2 = 8245; + public static final int HYDRA_FIRE = 8248; + public static final int HYDRA_RANGED_3 = 8249; + public static final int HYDRA_MAGIC_3 = 8250; + public static final int HYDRA_3_1 = 8251; + public static final int HYDRA_3_2 = 8252; + public static final int HYDRA_MAGIC_4 = 8254; + public static final int HYDRA_POISON_4 = 8254; + public static final int HYDRA_RANGED_4 = 8255; + public static final int HYDRA_RANGED_OR_POISON_ATTACK = 8256; + public static final int HYDRA_4_1 = 8257; + public static final int HYDRA_4_2 = 8258; + + // Inferno animations + public static final int JAL_NIB = 7574; + public static final int JAL_MEJRAH = 7578; + public static final int JAL_MEJRAH_STAND = 7577; + public static final int JAL_AK_RANGE_ATTACK = 7581; + public static final int JAL_AK_MELEE_ATTACK = 7582; + public static final int JAL_AK_MAGIC_ATTACK = 7583; + public static final int JAL_IMKOT = 7597; + public static final int JAL_XIL_MELEE_ATTACK = 7604; + public static final int JAL_XIL_RANGE_ATTACK = 7605; + public static final int JAL_ZEK_MAGE_ATTACK = 7610; + public static final int JAL_ZEK_MELEE_ATTACK = 7612; + public static final int JALTOK_JAD_MELEE_ATTACK = 7590; + public static final int JALTOK_JAD_MAGE_ATTACK = 7592; + public static final int JALTOK_JAD_RANGE_ATTACK = 7593; + public static final int TZKAL_ZUK = 7566; + public static final int JAL_MEJJAK = 2858; + + // General Graardor + public static final int MINION_AUTO1 = 6154; + public static final int MINION_AUTO2 = 6156; + public static final int MINION_AUTO3 = 7071; + public static final int MINION_AUTO4 = 7073; + public static final int GENERAL_AUTO1 = 7018; + public static final int GENERAL_AUTO2 = 7020; + public static final int GENERAL_AUTO3 = 7021; + + // Kr'il Tsutsaroth + public static final int ZAMMY_GENERIC_AUTO = 64; + public static final int KRIL_AUTO = 6948; + public static final int KRIL_SPEC = 6950; + public static final int ZAKL_AUTO = 7077; + public static final int BALFRUG_AUTO = 4630; + + // Commander Zilyana + public static final int ZILYANA_MELEE_AUTO = 6964; + public static final int ZILYANA_AUTO = 6967; + public static final int ZILYANA_SPEC = 6970; + public static final int STARLIGHT_AUTO = 6376; + public static final int BREE_AUTO = 7026; + public static final int GROWLER_AUTO = 7037; + + // Kree'arra + public static final int KREE_RANGED = 6978; + public static final int SKREE_AUTO = 6955; + public static final int GEERIN_AUTO = 6956; + public static final int GEERIN_FLINCH = 6958; + public static final int KILISA_AUTO = 6957; + + // Vetion + public static final int VETION_EARTHQUAKE = 5507; + + // Zulrah + public static final int ZULRAH_DEATH = 5804; + public static final int ZULRAH_PHASE = 5072; + + //Dagannoth Kings + public static final int DAG_REX = 2853; + public static final int DAG_PRIME = 2854; + public static final int DAG_SUPREME = 2855; + + // Lizardman shaman + public static final int LIZARDMAN_SHAMAN_SPAWN = 7157; + public static final int LIZARDMAN_SHAMAN_SPAWN_EXPLOSION = 7159; + + // Cerberus + public static final int CERBERUS_MAGIC_ATTACK = 4489; + public static final int CERBERUS_RANGED_ATTACK = 4490; + public static final int CERBERUS_MELEE_ATTACK = 4491; + public static final int CERBERUS_LAVA_ATTACK = 4493; + public static final int CERBERUS_SUMMON_GHOSTS = 4494; + + // Gauntlet Hunleff + public static final int HUNLEFF_TRAMPLE = 8420; + public static final int HUNLEFF_ATTACK = 8419; + public static final int HUNLEFF_TORNADO = 8418; + public static final int HUNLLEF_SWITCH_TO_MAGIC = 8754; + public static final int HUNLLEF_SWITCH_TO_RANGED = 8755; + + //Zalcano + public static final int ZALCANO_KNOCKED_DOWN = 8437; + public static final int ZALCANO_WAKEUP = 8439; + public static final int ZALCANO_ROCK_GLOWING = 8448; + + // Theatre of Blood - Sugadinti Maiden + public static final int SUGADINTI_MAIDEN_BLOOD_SPLAT_ATTACK = 8091; + public static final int SUGADINTI_MAIDEN_MAGIC_ATTACK = 8092; + public static final int SUGADINTI_MAIDEN_DEATH = 8094; + + // Theatre of Blood - Pestilent Bloat + public static final int BLOAT_SLEEP = 8082; + + // Theatre of Blood - Sotetseg + public static final int SOTETSEG_MELEE_ATTACK = 8138; + public static final int SOTETSEG_REGULAR_PROJECTILE_ATTACK = 8139; + + // Theatre of Blood - Verzik Vitur + public static final int VERZIK_PHASE_1_MAGIC_ATTACK = 8109; + public static final int VERZIK_PHASE_1_MAGIC_ATTACK_CHANNEL = 8110; + public static final int VERZIK_CHANGE_TO_PHASE_2 = 8111; + public static final int VERZIK_PHASE_2_MAGIC_ATTACK = 8114; + public static final int VERZIK_PHASE_2_BELLY_FLOP_ATTACK_1 = 8116; + public static final int VERZIK_PHASE_2_HEALING_CHANNEL = 8117; + public static final int VERZIK_PHASE_2_BELLY_FLOP_ATTACK_2 = 8118; + public static final int VERZIK_CHANGE_TO_PHASE_3 = 8119; + public static final int VERZIK_PHASE_3_MELEE_ATTACK = 8123; + public static final int VERZIK_PHASE_3_MAGIC_ATTACK = 8124; + public static final int VERZIK_PHASE_3_RANGED_ATTACK = 8125; + public static final int VERZIK_PHASE_3_GREEN_POOL_ATTACK = 8126; + public static final int VERZIK_PHASE_3_WEB_ATTACK = 8127; + public static final int VERZIK_DEATH_1 = 8128; + public static final int VERZIK_DEATH_2 = 8129; + + // The Nightmare of Ashihama + public static final int NIGHTMARE_SPAWN_SLEEPWALKERS = 8572; + public static final int NIGHTMARE_FLOATY = 8592; + public static final int NIGHTMARE_WALKING = 8592; + public static final int NIGHTMARE_IDLE = 8593; + public static final int NIGHTMARE_MELEE_ATTACK = 8594; + public static final int NIGHTMARE_MAGIC_ATTACK = 8595; + public static final int NIGHTMARE_RANGED_ATTACK = 8596; + public static final int NIGHTMARE_SURGE_ATTACK = 8597; + public static final int NIGHTMARE_GHOST_AOE_ATTACK = 8598; + public static final int NIGHTMARE_CURSE_PRAYERS_ATTACK = 8599; + public static final int NIGHTMARE_SPAWN_INFECTIOUS_SPORES = 8600; + public static final int NIGHTMARE_SPAWN_ROOM_SECTION_FLOWERS = 8601; + public static final int NIGHTMARE_CHANNEL_DEVASTATING_ATTACK = 8604; + public static final int NIGHTMARE_SWITCH_TO_DEVIL_PHASE = 8605; + public static final int NIGHTMARE_PARASITE_ATTACK = 8606; + public static final int NIGHTMARE_JUMP_DOWN = 8607; + public static final int NIGHTMARE_SINK_DOWN = 8608; + public static final int NIGHTMARE_JUMP_UP = 8609; + public static final int NIGHTMARE_JUMP_UP_2 = 8610; + public static final int NIGHTMARE_WAKE_UP = 8611; +} \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index fed35c6c11..53cda594b2 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -83,6 +83,7 @@ public class WidgetID public static final int BA_DEFENDER_GROUP_ID = 487; public static final int BA_HEALER_GROUP_ID = 488; public static final int BA_REWARD_GROUP_ID = 497; + public static final int BA_HORN_OF_GLORY = 484; public static final int LEVEL_UP_GROUP_ID = 233; public static final int DIALOG_SPRITE_GROUP_ID = 193; public static final int QUEST_COMPLETED_GROUP_ID = 153; @@ -91,6 +92,7 @@ public class WidgetID public static final int RAIDS_GROUP_ID = 513; public static final int TOB_PARTY_GROUP_ID = 28; public static final int MOTHERLODE_MINE_GROUP_ID = 382; + public static final int MOTHERLODE_MINE_FULL_INVENTORY_GROUP_ID = 229; public static final int EXPERIENCE_DROP_GROUP_ID = 122; public static final int PUZZLE_BOX_GROUP_ID = 306; public static final int LIGHT_BOX_GROUP_ID = 322; @@ -178,6 +180,8 @@ public class WidgetID public static final int DIALOG_NOTIFICATION_GROUP_ID = 229; public static final int DIALOG_SPRITE2_ID = 11; public static final int MULTISKILL_MENU_GROUP_ID = 270; + public static final int PERFORMERS_FOR_THE_THEATRE_GROUPS_GROUP_ID = 364; + public static final int PERFORMERS_FOR_THE_THEATRE_PLAYERS_GROUP_ID = 50; static class WorldMap { @@ -1404,4 +1408,4 @@ public class WidgetID { static final int CONTAINER = 4; } -} +} \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 34ef03e1bb..0cc543049e 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -494,6 +494,9 @@ public enum WidgetInfo PVP_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL_CONTAINER), PVP_WORLD_SAFE_ZONE(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SAFE_ZONE), + PVP_FOG_OVERLAY(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.FOG_OVERLAY), + PVP_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.PVP_WIDGET_CONTAINER), + PVP_WILDERNESS_LEVEL(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.WILDERNESS_LEVEL), PVP_BOUNTY_HUNTER_INFO(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.BOUNTY_HUNTER_INFO), PVP_KILLDEATH_COUNTER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.KILLDEATH_RATIO), @@ -1022,4 +1025,4 @@ public enum WidgetInfo return groupId << 16 | childId; } -} +} \ No newline at end of file From 4e88fd01f5223aea3b191f7df1908a1bb4bec328 Mon Sep 17 00:00:00 2001 From: ThatGamerBlue Date: Mon, 22 Feb 2021 21:26:52 +0000 Subject: [PATCH 8/8] Revert "api: add missing API components" This reverts commit fdd8cec7210a94630e702600725b23829255e600. --- .../java/net/runelite/api/AnimationID.java | 294 +----------------- .../net/runelite/api/widgets/WidgetID.java | 6 +- .../net/runelite/api/widgets/WidgetInfo.java | 5 +- 3 files changed, 12 insertions(+), 293 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/AnimationID.java b/runelite-api/src/main/java/net/runelite/api/AnimationID.java index d554b0fa8e..7c4d40e61c 100644 --- a/runelite-api/src/main/java/net/runelite/api/AnimationID.java +++ b/runelite-api/src/main/java/net/runelite/api/AnimationID.java @@ -111,17 +111,7 @@ public final class AnimationID public static final int FISHING_DRAGON_HARPOON_OR = 88; public static final int FISHING_INFERNAL_HARPOON = 7402; public static final int FISHING_CRYSTAL_HARPOON = 8336; - public static final int CRYSTALLINE_RAT_DEATH = 8334; - public static final int CRYSTALLINE_BAT_DEATH = 4917; - public static final int CRYSTALLINE_WOLF_DEATH = 8335; - public static final int CRYSTALLINE_SPIDER_DEATH = 8338; - public static final int CRYSTALLINE_UNICORN_DEATH = 6377; - public static final int CRYSTALLINE_DRAGON_DEATH = 92; - public static final int CRYSTALLINE_BEAR_DEATH = 4929; - public static final int CRYSTALLINE_DARK_BEAST_DEATH = 2733; - public static final int CORRUPTED_SCORPION_DEATH = 6256; public static final int FISHING_TRAILBLAZER_HARPOON = 8784; // Same animation as Infernal harpoon (or) - public static final int FISHING_TRAILBLAZER_HARPOON_2 = 8785; public static final int FISHING_OILY_ROD = 622; public static final int FISHING_KARAMBWAN = 1193; public static final int FISHING_CRUSHING_INFERNAL_EELS = 7553; @@ -181,7 +171,6 @@ public final class AnimationID public static final int HERBLORE_POTIONMAKING = 363; //used for both herb and secondary public static final int MAGIC_CHARGING_ORBS = 726; public static final int MAGIC_MAKE_TABLET = 4068; - public static final int TABLET_TELEPORT = 4069; public static final int MAGIC_ENCHANTING_JEWELRY = 931; public static final int MAGIC_ENCHANTING_AMULET_1 = 719; // sapphire, opal, diamond public static final int MAGIC_ENCHANTING_AMULET_2 = 720; // emerald, jade, dragonstone @@ -219,77 +208,18 @@ public final class AnimationID public static final int SAND_COLLECTION = 895; public static final int PISCARILIUS_CRANE_REPAIR = 7199; public static final int HOME_MAKE_TABLET = 4067; - public static final int THIEVING_STALL = 832; - public static final int PICKPOCKET_SUCCESS = 881; - public static final int PULL_LEVER = 2140; - public static final int STANDARD_PURPLE_TELEPORT = 714; - public static final int ECTOPHIAL_TELEPORT = 878; - public static final int FAIRY_RING_TELEPORT = 3265; - public static final int SCROLL_TELEPORT = 3864; - public static final int XERICS_TALISMAN_TELEPORT = 3865; - public static final int WILDERNESS_OBELISK_TELEPORT = 3945; - public static final int SEED_POD_TELEPORT = 4544; - - //block animations for players and perhaps npcs as well? - public static final int BLOCK_DEFENDER = 4177; - public static final int BLOCK_NO_SHIELD = 420; - public static final int BLOCK_SHIELD = 1156; - public static final int BLOCK_SWORD = 388; - public static final int BLOCK_UNARMED = 424; // Same Animation as failed pickpocked public static final int DRAGONFIRE_SHIELD_SPECIAL = 6696; - //Player Emotes - public static final int YES = 855; - public static final int NO = 856; - public static final int BOW = 858; - public static final int ANGRY = 859; - public static final int THINK = 857; - public static final int WAVE = 863; - public static final int SHRUG = 2113; - public static final int CHEER = 862; - public static final int BECKON = 864; - public static final int LAUGH = 861; - public static final int JUMP_FOR_JOY = 2109; - public static final int YAWN = 2111; - public static final int DANCE = 866; - public static final int JIG = 2106; - public static final int SPIN = 2107; - public static final int HEAD_BANG = 2108; - public static final int CRY = 860; - public static final int BLOW_KISS = 1374; - public static final int PANIC = 2105; - public static final int RASPBERRY = 2110; - public static final int CLAP = 865; - public static final int SALUTE = 2112; - public static final int GOBLIN_BOW = 2127; - public static final int GOBLIN_SALUTE = 2128; + // Ectofuntus animations + public static final int ECTOFUNTUS_FILL_SLIME_BUCKET = 4471; + public static final int ECTOFUNTUS_GRIND_BONES = 1648; + public static final int ECTOFUNTUS_INSERT_BONES = 1649; + public static final int ECTOFUNTUS_EMPTY_BIN = 1650; - // Combat counter - public static final int BARRAGE_ANIMATION = 1979; - public static final int BLITZ_ANIMATION = 1978; - public static final int CHIN_ANIMATION = 7618; - - //Supplies Tracker - public static final int ONEHAND_SLASH_SWORD_ANIMATION = 390; - public static final int ONEHAND_STAB_SWORD_ANIMATION = 386; - public static final int SCYTHE_OF_VITUR_ANIMATION = 8056; - public static final int LOW_LEVEL_STANDARD_SPELLS = 711; - public static final int WAVE_SPELL_ANIMATION = 727; - public static final int SURGE_SPELL_ANIMATION = 7855; - public static final int HIGH_ALCH_ANIMATION = 713; - public static final int LUNAR_HUMIDIFY = 6294; - public static final int PRAY_AT_ALTAR = 645; - public static final int ENSOULED_HEADS_ANIMATION = 7198; - - // Weapon attack animations - public static final int ONEHAND_SLASH_AXE_ANIMATION = 395; - public static final int ONEHAND_CRUSH_PICKAXE_ANIMATION = 400; - public static final int ONEHAND_CRUSH_AXE_ANIMATION = 401; - public static final int UNARMED_PUNCH_ANIMATION = 422; - public static final int UNARMED_KICK_ANIMATION = 423; - public static final int BOW_ATTACK_ANIMATION = 426; - public static final int ONEHAND_STAB_HALBERD_ANIMATION = 428; - public static final int ONEHAND_SLASH_HALBERD_ANIMATION = 440; + // NPC animations + public static final int TZTOK_JAD_MAGIC_ATTACK = 2656; + public static final int TZTOK_JAD_RANGE_ATTACK = 2652; + public static final int HELLHOUND_DEFENCE = 6566; // Farming public static final int FARMING_HARVEST_FRUIT_TREE = 2280; @@ -325,211 +255,7 @@ public final class AnimationID public static final int ROCKSLUG_DEATH = 1568; public static final int ZYGOMITE_DEATH = 3327; public static final int IMP_DEATH = 172; - public static final int NIGHTMARE_DEATH = 8612; // POH Animations public static final int INCENSE_BURNER = 3687; - public static final int LOW_LEVEL_MAGIC_ATTACK = 1162; - public static final int HIGH_LEVEL_MAGIC_ATTACK = 1167; - public static final int BLOWPIPE_ATTACK = 5061; - - // Ectofuntus animations - public static final int ECTOFUNTUS_FILL_SLIME_BUCKET = 4471; - public static final int ECTOFUNTUS_GRIND_BONES = 1648; - public static final int ECTOFUNTUS_INSERT_BONES = 1649; - public static final int ECTOFUNTUS_EMPTY_BIN = 1650; - - // NPC animations - public static final int HELLHOUND_DEFENCE = 6566; - public static final int BLACKJACK_KO = 838; - - // Fight Caves - public static final int TZTOK_JAD_RANGE_ATTACK = 2652; - public static final int TZTOK_JAD_MELEE_ATTACK = 2655; - public static final int TZTOK_JAD_MAGIC_ATTACK = 2656; - public static final int TOK_XIL_RANGE_ATTACK = 2633; - public static final int TOK_XIL_MELEE_ATTACK = 2628; - public static final int KET_ZEK_MELEE_ATTACK = 2644; - public static final int KET_ZEK_MAGE_ATTACK = 2647; - public static final int MEJ_KOT_MELEE_ATTACK = 2637; - public static final int MEJ_KOT_HEAL_ATTACK = 2639; - - // Vorkath - public static final int VORKATH_WAKE_UP = 7950; - public static final int VORKATH_DEATH = 7949; - public static final int VORKATH_SLASH_ATTACK = 7951; - public static final int VORKATH_ATTACK = 7952; - public static final int VORKATH_FIRE_BOMB_OR_SPAWN_ATTACK = 7960; - public static final int VORKATH_ACID_ATTACK = 7957; - - // Tekton - public static final int TEKTON_ANVIL = 7475; - public static final int TEKTON_AUTO1 = 7482; - public static final int TEKTON_AUTO2 = 7483; - public static final int TEKTON_AUTO3 = 7484; - public static final int TEKTON_FAST_AUTO1 = 7478; - public static final int TEKTON_FAST_AUTO2 = 7488; - public static final int TEKTON_ENRAGE_AUTO1 = 7492; - public static final int TEKTON_ENRAGE_AUTO2 = 7493; - public static final int TEKTON_ENRAGE_AUTO3 = 7494; - - // Hydra - public static final int HYDRA_WALKING = 8232; - public static final int HYDRA_IDLE = 8233; - public static final int HYDRA_POISON_1 = 8234; - public static final int HYDRA_RANGED_1 = 8235; - public static final int HYDRA_MAGIC_1 = 8236; - public static final int HYDRA_1_1 = 8237; - public static final int HYDRA_1_2 = 8238; - public static final int HYDRA_LIGHTNING = 8241; - public static final int HYDRA_RANGED_2 = 8242; - public static final int HYDRA_MAGIC_2 = 8243; - public static final int HYDRA_2_1 = 8244; - public static final int HYDRA_2_2 = 8245; - public static final int HYDRA_FIRE = 8248; - public static final int HYDRA_RANGED_3 = 8249; - public static final int HYDRA_MAGIC_3 = 8250; - public static final int HYDRA_3_1 = 8251; - public static final int HYDRA_3_2 = 8252; - public static final int HYDRA_MAGIC_4 = 8254; - public static final int HYDRA_POISON_4 = 8254; - public static final int HYDRA_RANGED_4 = 8255; - public static final int HYDRA_RANGED_OR_POISON_ATTACK = 8256; - public static final int HYDRA_4_1 = 8257; - public static final int HYDRA_4_2 = 8258; - - // Inferno animations - public static final int JAL_NIB = 7574; - public static final int JAL_MEJRAH = 7578; - public static final int JAL_MEJRAH_STAND = 7577; - public static final int JAL_AK_RANGE_ATTACK = 7581; - public static final int JAL_AK_MELEE_ATTACK = 7582; - public static final int JAL_AK_MAGIC_ATTACK = 7583; - public static final int JAL_IMKOT = 7597; - public static final int JAL_XIL_MELEE_ATTACK = 7604; - public static final int JAL_XIL_RANGE_ATTACK = 7605; - public static final int JAL_ZEK_MAGE_ATTACK = 7610; - public static final int JAL_ZEK_MELEE_ATTACK = 7612; - public static final int JALTOK_JAD_MELEE_ATTACK = 7590; - public static final int JALTOK_JAD_MAGE_ATTACK = 7592; - public static final int JALTOK_JAD_RANGE_ATTACK = 7593; - public static final int TZKAL_ZUK = 7566; - public static final int JAL_MEJJAK = 2858; - - // General Graardor - public static final int MINION_AUTO1 = 6154; - public static final int MINION_AUTO2 = 6156; - public static final int MINION_AUTO3 = 7071; - public static final int MINION_AUTO4 = 7073; - public static final int GENERAL_AUTO1 = 7018; - public static final int GENERAL_AUTO2 = 7020; - public static final int GENERAL_AUTO3 = 7021; - - // Kr'il Tsutsaroth - public static final int ZAMMY_GENERIC_AUTO = 64; - public static final int KRIL_AUTO = 6948; - public static final int KRIL_SPEC = 6950; - public static final int ZAKL_AUTO = 7077; - public static final int BALFRUG_AUTO = 4630; - - // Commander Zilyana - public static final int ZILYANA_MELEE_AUTO = 6964; - public static final int ZILYANA_AUTO = 6967; - public static final int ZILYANA_SPEC = 6970; - public static final int STARLIGHT_AUTO = 6376; - public static final int BREE_AUTO = 7026; - public static final int GROWLER_AUTO = 7037; - - // Kree'arra - public static final int KREE_RANGED = 6978; - public static final int SKREE_AUTO = 6955; - public static final int GEERIN_AUTO = 6956; - public static final int GEERIN_FLINCH = 6958; - public static final int KILISA_AUTO = 6957; - - // Vetion - public static final int VETION_EARTHQUAKE = 5507; - - // Zulrah - public static final int ZULRAH_DEATH = 5804; - public static final int ZULRAH_PHASE = 5072; - - //Dagannoth Kings - public static final int DAG_REX = 2853; - public static final int DAG_PRIME = 2854; - public static final int DAG_SUPREME = 2855; - - // Lizardman shaman - public static final int LIZARDMAN_SHAMAN_SPAWN = 7157; - public static final int LIZARDMAN_SHAMAN_SPAWN_EXPLOSION = 7159; - - // Cerberus - public static final int CERBERUS_MAGIC_ATTACK = 4489; - public static final int CERBERUS_RANGED_ATTACK = 4490; - public static final int CERBERUS_MELEE_ATTACK = 4491; - public static final int CERBERUS_LAVA_ATTACK = 4493; - public static final int CERBERUS_SUMMON_GHOSTS = 4494; - - // Gauntlet Hunleff - public static final int HUNLEFF_TRAMPLE = 8420; - public static final int HUNLEFF_ATTACK = 8419; - public static final int HUNLEFF_TORNADO = 8418; - public static final int HUNLLEF_SWITCH_TO_MAGIC = 8754; - public static final int HUNLLEF_SWITCH_TO_RANGED = 8755; - - //Zalcano - public static final int ZALCANO_KNOCKED_DOWN = 8437; - public static final int ZALCANO_WAKEUP = 8439; - public static final int ZALCANO_ROCK_GLOWING = 8448; - - // Theatre of Blood - Sugadinti Maiden - public static final int SUGADINTI_MAIDEN_BLOOD_SPLAT_ATTACK = 8091; - public static final int SUGADINTI_MAIDEN_MAGIC_ATTACK = 8092; - public static final int SUGADINTI_MAIDEN_DEATH = 8094; - - // Theatre of Blood - Pestilent Bloat - public static final int BLOAT_SLEEP = 8082; - - // Theatre of Blood - Sotetseg - public static final int SOTETSEG_MELEE_ATTACK = 8138; - public static final int SOTETSEG_REGULAR_PROJECTILE_ATTACK = 8139; - - // Theatre of Blood - Verzik Vitur - public static final int VERZIK_PHASE_1_MAGIC_ATTACK = 8109; - public static final int VERZIK_PHASE_1_MAGIC_ATTACK_CHANNEL = 8110; - public static final int VERZIK_CHANGE_TO_PHASE_2 = 8111; - public static final int VERZIK_PHASE_2_MAGIC_ATTACK = 8114; - public static final int VERZIK_PHASE_2_BELLY_FLOP_ATTACK_1 = 8116; - public static final int VERZIK_PHASE_2_HEALING_CHANNEL = 8117; - public static final int VERZIK_PHASE_2_BELLY_FLOP_ATTACK_2 = 8118; - public static final int VERZIK_CHANGE_TO_PHASE_3 = 8119; - public static final int VERZIK_PHASE_3_MELEE_ATTACK = 8123; - public static final int VERZIK_PHASE_3_MAGIC_ATTACK = 8124; - public static final int VERZIK_PHASE_3_RANGED_ATTACK = 8125; - public static final int VERZIK_PHASE_3_GREEN_POOL_ATTACK = 8126; - public static final int VERZIK_PHASE_3_WEB_ATTACK = 8127; - public static final int VERZIK_DEATH_1 = 8128; - public static final int VERZIK_DEATH_2 = 8129; - - // The Nightmare of Ashihama - public static final int NIGHTMARE_SPAWN_SLEEPWALKERS = 8572; - public static final int NIGHTMARE_FLOATY = 8592; - public static final int NIGHTMARE_WALKING = 8592; - public static final int NIGHTMARE_IDLE = 8593; - public static final int NIGHTMARE_MELEE_ATTACK = 8594; - public static final int NIGHTMARE_MAGIC_ATTACK = 8595; - public static final int NIGHTMARE_RANGED_ATTACK = 8596; - public static final int NIGHTMARE_SURGE_ATTACK = 8597; - public static final int NIGHTMARE_GHOST_AOE_ATTACK = 8598; - public static final int NIGHTMARE_CURSE_PRAYERS_ATTACK = 8599; - public static final int NIGHTMARE_SPAWN_INFECTIOUS_SPORES = 8600; - public static final int NIGHTMARE_SPAWN_ROOM_SECTION_FLOWERS = 8601; - public static final int NIGHTMARE_CHANNEL_DEVASTATING_ATTACK = 8604; - public static final int NIGHTMARE_SWITCH_TO_DEVIL_PHASE = 8605; - public static final int NIGHTMARE_PARASITE_ATTACK = 8606; - public static final int NIGHTMARE_JUMP_DOWN = 8607; - public static final int NIGHTMARE_SINK_DOWN = 8608; - public static final int NIGHTMARE_JUMP_UP = 8609; - public static final int NIGHTMARE_JUMP_UP_2 = 8610; - public static final int NIGHTMARE_WAKE_UP = 8611; -} \ No newline at end of file +} diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 53cda594b2..fed35c6c11 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -83,7 +83,6 @@ public class WidgetID public static final int BA_DEFENDER_GROUP_ID = 487; public static final int BA_HEALER_GROUP_ID = 488; public static final int BA_REWARD_GROUP_ID = 497; - public static final int BA_HORN_OF_GLORY = 484; public static final int LEVEL_UP_GROUP_ID = 233; public static final int DIALOG_SPRITE_GROUP_ID = 193; public static final int QUEST_COMPLETED_GROUP_ID = 153; @@ -92,7 +91,6 @@ public class WidgetID public static final int RAIDS_GROUP_ID = 513; public static final int TOB_PARTY_GROUP_ID = 28; public static final int MOTHERLODE_MINE_GROUP_ID = 382; - public static final int MOTHERLODE_MINE_FULL_INVENTORY_GROUP_ID = 229; public static final int EXPERIENCE_DROP_GROUP_ID = 122; public static final int PUZZLE_BOX_GROUP_ID = 306; public static final int LIGHT_BOX_GROUP_ID = 322; @@ -180,8 +178,6 @@ public class WidgetID public static final int DIALOG_NOTIFICATION_GROUP_ID = 229; public static final int DIALOG_SPRITE2_ID = 11; public static final int MULTISKILL_MENU_GROUP_ID = 270; - public static final int PERFORMERS_FOR_THE_THEATRE_GROUPS_GROUP_ID = 364; - public static final int PERFORMERS_FOR_THE_THEATRE_PLAYERS_GROUP_ID = 50; static class WorldMap { @@ -1408,4 +1404,4 @@ public class WidgetID { static final int CONTAINER = 4; } -} \ No newline at end of file +} diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 0cc543049e..34ef03e1bb 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -494,9 +494,6 @@ public enum WidgetInfo PVP_SKULL_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SKULL_CONTAINER), PVP_WORLD_SAFE_ZONE(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.SAFE_ZONE), - PVP_FOG_OVERLAY(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.FOG_OVERLAY), - PVP_CONTAINER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.PVP_WIDGET_CONTAINER), - PVP_WILDERNESS_LEVEL(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.WILDERNESS_LEVEL), PVP_BOUNTY_HUNTER_INFO(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.BOUNTY_HUNTER_INFO), PVP_KILLDEATH_COUNTER(WidgetID.PVP_GROUP_ID, WidgetID.Pvp.KILLDEATH_RATIO), @@ -1025,4 +1022,4 @@ public enum WidgetInfo return groupId << 16 | childId; } -} \ No newline at end of file +}