From 7887a4dff16dd2f310a74c66476483d313e236ba Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 2 Sep 2020 20:26:34 +0100 Subject: [PATCH] Rename Resource::crc to checksum This is consistent with us using checksum/digest in the Js5Index naming. Signed-off-by: Graham --- bundler/src/main/java/dev/openrs2/bundler/Resource.kt | 6 +++--- .../dev/openrs2/bundler/transform/ResourceTransformer.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bundler/src/main/java/dev/openrs2/bundler/Resource.kt b/bundler/src/main/java/dev/openrs2/bundler/Resource.kt index 530904ca..a4a76d72 100644 --- a/bundler/src/main/java/dev/openrs2/bundler/Resource.kt +++ b/bundler/src/main/java/dev/openrs2/bundler/Resource.kt @@ -14,13 +14,13 @@ import java.util.zip.Deflater public class Resource( public val source: String, public val destination: String, - public val crc: Int, + public val checksum: Int, public val digest: ByteArray, public val uncompressedSize: Int, public val content: ByteArray ) { - public val sourceWithCrc: String - get() = source.replace(".", "_$crc.") + public val sourceWithChecksum: String + get() = source.replace(".", "_$checksum.") public val compressedSize: Int get() = content.size diff --git a/bundler/src/main/java/dev/openrs2/bundler/transform/ResourceTransformer.kt b/bundler/src/main/java/dev/openrs2/bundler/transform/ResourceTransformer.kt index 1cdc2e57..cc62e0ae 100644 --- a/bundler/src/main/java/dev/openrs2/bundler/transform/ResourceTransformer.kt +++ b/bundler/src/main/java/dev/openrs2/bundler/transform/ResourceTransformer.kt @@ -41,7 +41,7 @@ public class ResourceTransformer( // update the source (the CRC may have changed) val source = match[3] as LdcInsnNode - source.cst = resource.sourceWithCrc + source.cst = resource.sourceWithChecksum // update file sizes method.instructions.set(match[22], resource.uncompressedSize.toAbstractInsnNode()) @@ -135,7 +135,7 @@ public class ResourceTransformer( list.add(TypeInsnNode(Opcodes.NEW, type)) list.add(InsnNode(Opcodes.DUP)) list.add(LdcInsnNode(resource.destination)) - list.add(LdcInsnNode(resource.sourceWithCrc)) + list.add(LdcInsnNode(resource.sourceWithChecksum)) list.add(messages.size.toAbstractInsnNode()) list.add(TypeInsnNode(Opcodes.ANEWARRAY, "java/lang/String"))