Fixed Geolyzer docstring.

Potential fix for config parse error.
This commit is contained in:
Florian Nücke 2014-07-07 16:31:46 +02:00
parent caacec21bd
commit b4639cceb1
3 changed files with 4 additions and 4 deletions

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-bin.zip distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip

View File

@ -264,13 +264,13 @@ object Settings {
// reportedly fixed the problem. // reportedly fixed the problem.
val defaults = { val defaults = {
val in = classOf[Settings].getResourceAsStream("/reference.conf") val in = classOf[Settings].getResourceAsStream("/reference.conf")
val config = Source.fromInputStream(in).mkString.replace("\r\n", "\n") val config = Source.fromInputStream(in)("UTF-8").getLines().mkString("", "\n", "")
in.close() in.close()
ConfigFactory.parseString(config) ConfigFactory.parseString(config)
} }
val config = val config =
try { try {
val plain = Source.fromFile(file).mkString.replace("\r\n", "\n") val plain = Source.fromFile(file)("UTF-8").getLines().mkString("", "\n", "")
val config = patchConfig(ConfigFactory.parseString(plain), defaults).withFallback(defaults) val config = patchConfig(ConfigFactory.parseString(plain), defaults).withFallback(defaults)
settings = new Settings(config.getConfig("opencomputers")) settings = new Settings(config.getConfig("opencomputers"))
config config

View File

@ -13,7 +13,7 @@ class Geolyzer extends traits.Environment {
override def canUpdate = false override def canUpdate = false
@Callback(doc = """function(x:number, z:number[, ignoreReplaceable:boolean) -- Analyzes the density of the column at the specified relative coordinates.""") @Callback(doc = """function(x:number, z:number[, ignoreReplaceable:boolean]):table -- Analyzes the density of the column at the specified relative coordinates.""")
def scan(computer: Context, args: Arguments): Array[AnyRef] = { def scan(computer: Context, args: Arguments): Array[AnyRef] = {
val rx = args.checkInteger(0) val rx = args.checkInteger(0)
val rz = args.checkInteger(1) val rz = args.checkInteger(1)