forked from openrs2/openrs2
parent
6d6287c917
commit
69a27e43d4
@ -1,15 +1,17 @@ |
|||||||
package dev.openrs2.deob.ast.gl |
package dev.openrs2.deob.ast.gl |
||||||
|
|
||||||
|
import java.nio.file.Files |
||||||
|
import java.nio.file.Paths |
||||||
import javax.inject.Provider |
import javax.inject.Provider |
||||||
|
|
||||||
class GlRegistryProvider : Provider<GlRegistry> { |
class GlRegistryProvider : Provider<GlRegistry> { |
||||||
override fun get(): GlRegistry { |
override fun get(): GlRegistry { |
||||||
GlRegistryProvider::class.java.getResourceAsStream(PATH).use { input -> |
Files.newInputStream(PATH).use { input -> |
||||||
return GlRegistry.parse(input) |
return GlRegistry.parse(input) |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
companion object { |
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