Add DI support to the *TypeList classes

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent 2c43930db2
commit 62abcbad8c
  1. 1
      cache-550/build.gradle.kts
  2. 5
      cache-550/src/main/kotlin/org/openrs2/cache/config/enum/EnumTypeList.kt
  3. 5
      cache-550/src/main/kotlin/org/openrs2/cache/config/param/ParamTypeList.kt
  4. 5
      cache-550/src/main/kotlin/org/openrs2/cache/config/struct/StructTypeList.kt
  5. 5
      cache-550/src/main/kotlin/org/openrs2/cache/config/varbit/VarbitTypeList.kt
  6. 5
      cache-550/src/main/kotlin/org/openrs2/cache/config/varp/VarpTypeList.kt

@ -5,6 +5,7 @@ plugins {
dependencies {
api(projects.cache)
api(libs.guice)
implementation(projects.buffer)
implementation(projects.util)

@ -3,8 +3,11 @@ package org.openrs2.cache.config.enum
import org.openrs2.cache.Cache
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.config.ArchiveConfigTypeList
import javax.inject.Inject
import javax.inject.Singleton
public class EnumTypeList(cache: Cache) : ArchiveConfigTypeList<EnumType>(
@Singleton
public class EnumTypeList @Inject constructor(cache: Cache) : ArchiveConfigTypeList<EnumType>(
cache,
archive = Js5Archive.CONFIG_ENUM,
fileBits = 8

@ -4,8 +4,11 @@ import org.openrs2.cache.Cache
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.Js5ConfigGroup
import org.openrs2.cache.config.GroupConfigTypeList
import javax.inject.Inject
import javax.inject.Singleton
public class ParamTypeList(cache: Cache) : GroupConfigTypeList<ParamType>(
@Singleton
public class ParamTypeList @Inject constructor(cache: Cache) : GroupConfigTypeList<ParamType>(
cache,
archive = Js5Archive.CONFIG,
group = Js5ConfigGroup.PARAMTYPE

@ -4,8 +4,11 @@ import org.openrs2.cache.Cache
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.Js5ConfigGroup
import org.openrs2.cache.config.GroupConfigTypeList
import javax.inject.Inject
import javax.inject.Singleton
public class StructTypeList(cache: Cache) : GroupConfigTypeList<StructType>(
@Singleton
public class StructTypeList @Inject constructor(cache: Cache) : GroupConfigTypeList<StructType>(
cache,
archive = Js5Archive.CONFIG,
group = Js5ConfigGroup.STRUCTTYPE

@ -3,8 +3,11 @@ package org.openrs2.cache.config.varbit
import org.openrs2.cache.Cache
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.config.ArchiveConfigTypeList
import javax.inject.Inject
import javax.inject.Singleton
public class VarbitTypeList(cache: Cache) : ArchiveConfigTypeList<VarbitType>(
@Singleton
public class VarbitTypeList @Inject constructor(cache: Cache) : ArchiveConfigTypeList<VarbitType>(
cache,
archive = Js5Archive.CONFIG_VAR_BIT,
fileBits = 10

@ -4,8 +4,11 @@ import org.openrs2.cache.Cache
import org.openrs2.cache.Js5Archive
import org.openrs2.cache.Js5ConfigGroup
import org.openrs2.cache.config.GroupConfigTypeList
import javax.inject.Inject
import javax.inject.Singleton
public class VarpTypeList(cache: Cache) : GroupConfigTypeList<VarpType>(
@Singleton
public class VarpTypeList @Inject constructor(cache: Cache) : GroupConfigTypeList<VarpType>(
cache,
archive = Js5Archive.CONFIG,
group = Js5ConfigGroup.VAR_PLAYER

Loading…
Cancel
Save