Skip to content

Commit

Permalink
Deduplication (#35)
Browse files Browse the repository at this point in the history
* refactor: reduce revision-specific models into a single module

* refactor: cleanup warnings

* refactor: reduce multi-module transcribers into a single module

* refactor: directly depend on transcribers instead of loading as plugin

* refactor: directly depend on transcribers instead of loading as plugin

* refactor: rename base transcriber to text transcriber

* feat: set last-modified date on transcribed .txt files based on .bin

* fix: indexer error cases

* refactor: modify state via a specialized class during transcribing
  • Loading branch information
Z-Kris authored Nov 2, 2024
1 parent 89b5c51 commit d8e5849
Show file tree
Hide file tree
Showing 1,226 changed files with 1,802 additions and 83,364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class LaunchBar(
renderer = SessionTypeCellRenderer()
selectedIndex = App.service.getSelectedClient()
}
launchModeDropdown.addActionListener { e ->
launchModeDropdown.addActionListener {
App.service.setSelectedClient(launchModeDropdown.selectedIndex)
}

Expand Down
2 changes: 2 additions & 0 deletions protocol/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ dependencies {
implementation(rootProject.libs.rsprot.buffer)
implementation(rootProject.libs.rsprot.compression)
implementation(rootProject.libs.rsprot.protocol)
implementation(rootProject.libs.rsprot.crypto)
implementation(platform(rootProject.libs.log4j.bom))
implementation(rootProject.libs.bundles.log4j)
implementation(projects.cache.cacheApi)
}

private val pluginsPath: Path = Path(System.getProperty("user.home"), ".rsprox", "plugins")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import net.rsprot.protocol.ClientProt
import net.rsprot.protocol.metadata.Consistent
import net.rsprox.protocol.ProxyMessageDecoder
import net.rsprox.protocol.game.incoming.decoder.prot.GameClientProt
import net.rsprox.protocol.game.incoming.model.misc.user.UpdatePlayerModel
import net.rsprox.protocol.game.incoming.model.misc.user.UpdatePlayerModelV1
import net.rsprox.protocol.session.Session

@Consistent
public class UpdatePlayerModelDecoder : ProxyMessageDecoder<UpdatePlayerModel> {
public class UpdatePlayerModelV1Decoder : ProxyMessageDecoder<UpdatePlayerModelV1> {
override val prot: ClientProt = GameClientProt.UPDATE_PLAYER_MODEL

override fun decode(
buffer: JagByteBuf,
session: Session,
): UpdatePlayerModel {
): UpdatePlayerModelV1 {
val bodyType = buffer.g1()
val identKit = ByteArray(7)
for (i in identKit.indices) {
Expand All @@ -25,7 +25,7 @@ public class UpdatePlayerModelDecoder : ProxyMessageDecoder<UpdatePlayerModel> {
for (i in colours.indices) {
colours[i] = buffer.g1().toByte()
}
return UpdatePlayerModel(
return UpdatePlayerModelV1(
bodyType,
identKit,
colours,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.OculusLeaveDeco
import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.SendSnapshotDecoder
import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.SetChatFilterSettingsDecoder
import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.TeleportDecoder
import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.UpdatePlayerModelDecoder
import net.rsprox.protocol.game.incoming.decoder.codec.misc.user.UpdatePlayerModelV1Decoder
import net.rsprox.protocol.game.incoming.decoder.codec.npcs.OpNpc1Decoder
import net.rsprox.protocol.game.incoming.decoder.codec.npcs.OpNpc2Decoder
import net.rsprox.protocol.game.incoming.decoder.codec.npcs.OpNpc3Decoder
Expand Down Expand Up @@ -191,7 +191,7 @@ public object ClientMessageDecoderRepository {
bind(SendSnapshotDecoder())
bind(HiscoreRequestDecoder())
bind(IfCrmViewClickDecoder())
bind(UpdatePlayerModelDecoder())
bind(UpdatePlayerModelV1Decoder())

bind(ConnectionTelemetryDecoder())
bind(SendPingReplyDecoder())
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d8e5849

Please sign in to comment.