diff --git a/README.md b/README.md index 5ce9bb1d0..513340f2c 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,7 @@ Properties breakdown: - `name` - The name given to the client. Any references to `OldSchool RuneScape` will be replaced by this. This is a required property to ensure caches don't overwrite and cause crashing at runtime when loading different games simultaneously. - `jav_config_url` - The URL to the jav_config that will be used to load initial world and world list. This is a required property. - `modulus` - A hexadecimal (base-16) RSA modulus used to encrypt the login packet sent to the client. This is a required property. -- `revision` - A revision number used to pick the client and correct decoders. The default is whatever is currently latest stable in Old School RuneScape. The exact version and subversion must be defined for Native clients (see: https://archive.lostcity.rs/oldschool.runescape.com/native/osrs-win/). This is an optional property. +- `revision` – A revision number used to pick the client and correct decoders. The default is the latest stable Old School RuneScape version. For Native clients, if no subrevision is provided (e.g. `234`), `.1` is automatically appended (becoming `234.1`). See: [https://archive.lostcity.rs/oldschool.runescape.com/native/osrs-win/](https://archive.lostcity.rs/oldschool.runescape.com/native/osrs-win/). This is an optional property. - `varp_count` - (OPTIONAL) Changes the array length used for varps in the client, the default value is 5000. This is an optional property. As of revision 232, it is no longer patched as the value is now based on cache. - `runelite_bootstrap_commithash` - (OPTIONAL) A hash pointing to a version of RuneLite you wish to use. This is an optional property, not defining it will use the latest for your revision. - `runelite_gamepack_url` - (OPTIONAL) A URL pointing to a valid gamepack file for the given revision. This is only necessary for revisions 228 and older. Not defining it will use the latest for your revision. diff --git a/proxy/src/main/kotlin/net/rsprox/proxy/downloader/LostCityNativeClientDownloader.kt b/proxy/src/main/kotlin/net/rsprox/proxy/downloader/LostCityNativeClientDownloader.kt index cc4d77424..1ee04bb94 100644 --- a/proxy/src/main/kotlin/net/rsprox/proxy/downloader/LostCityNativeClientDownloader.kt +++ b/proxy/src/main/kotlin/net/rsprox/proxy/downloader/LostCityNativeClientDownloader.kt @@ -16,13 +16,14 @@ public object LostCityNativeClientDownloader { type: NativeClientType, version: String, ): Path { + val normalizedVersion = if ('.' !in version) "$version.1" else version val prefix = "https://archive.lostcity.rs/oldschool.runescape.com/native/" val typePath = when (type) { NativeClientType.WIN -> "osrs-win/" NativeClientType.MAC -> "osrs-mac/" } - val versionPath = "$version/" + val versionPath = "$normalizedVersion/" val filePath = when (type) { NativeClientType.WIN -> "osclient.exe" @@ -30,8 +31,8 @@ public object LostCityNativeClientDownloader { } val filePathWithVersion = when (type) { - NativeClientType.WIN -> "osclient-$version.exe" - NativeClientType.MAC -> "osclient.app/Contents/MacOS/osclient-$version" + NativeClientType.WIN -> "osclient-$normalizedVersion.exe" + NativeClientType.MAC -> "osclient.app/Contents/MacOS/osclient-$normalizedVersion" } val file = folder.resolve(filePathWithVersion) // Return the old file if it already exists, assume it is unchanged @@ -44,7 +45,7 @@ public object LostCityNativeClientDownloader { url.readBytes() } catch (t: Throwable) { logger.error(t) { - "Unable to download client $type/$version" + "Unable to download client $type/$normalizedVersion" } throw t }