forked from openrs2/openrs2
parent
6d6287c917
commit
69a27e43d4
@ -1,15 +1,17 @@ |
||||
package dev.openrs2.deob.ast.gl |
||||
|
||||
import java.nio.file.Files |
||||
import java.nio.file.Paths |
||||
import javax.inject.Provider |
||||
|
||||
class GlRegistryProvider : Provider<GlRegistry> { |
||||
override fun get(): GlRegistry { |
||||
GlRegistryProvider::class.java.getResourceAsStream(PATH).use { input -> |
||||
Files.newInputStream(PATH).use { input -> |
||||
return GlRegistry.parse(input) |
||||
} |
||||
} |
||||
|
||||
companion object { |
||||
private const val PATH = "/dev/openrs2/deob/ast/gl.xml" |
||||
private val PATH = Paths.get("share/deob/gl.xml") |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue