mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 19:25:20 -04:00
Merge branch 'OC1.3-MC1.6.4' of github.com:MightyPirates/OpenComputers
This commit is contained in:
commit
bf79d15a25
@ -69,7 +69,7 @@ object Recipes {
|
|||||||
if (!userRecipes.exists()) {
|
if (!userRecipes.exists()) {
|
||||||
FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/user.recipes"), userRecipes)
|
FileUtils.copyURLToFile(getClass.getResource("/assets/opencomputers/recipes/user.recipes"), userRecipes)
|
||||||
}
|
}
|
||||||
val config = ConfigParseOptions.defaults.
|
lazy val config: ConfigParseOptions = ConfigParseOptions.defaults.
|
||||||
setSyntax(ConfigSyntax.CONF).
|
setSyntax(ConfigSyntax.CONF).
|
||||||
setIncluder(new ConfigIncluder with ConfigIncluderFile {
|
setIncluder(new ConfigIncluder with ConfigIncluderFile {
|
||||||
var fallback: ConfigIncluder = _
|
var fallback: ConfigIncluder = _
|
||||||
@ -83,7 +83,7 @@ object Recipes {
|
|||||||
|
|
||||||
override def includeFile(context: ConfigIncludeContext, what: File) = {
|
override def includeFile(context: ConfigIncludeContext, what: File) = {
|
||||||
val in = if (what.isAbsolute) new FileReader(what) else new FileReader(new File(userRecipes.getParentFile, what.getPath))
|
val in = if (what.isAbsolute) new FileReader(what) else new FileReader(new File(userRecipes.getParentFile, what.getPath))
|
||||||
val result = ConfigFactory.parseReader(in)
|
val result = ConfigFactory.parseReader(in, config)
|
||||||
in.close()
|
in.close()
|
||||||
result.root()
|
result.root()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user