Improved GeneSample name display, work around alleles with empty names (#9)

This commit is contained in:
bdew committed 2014-01-23 13:37:57 +02:00
1 parent d8537ddbb1
commit a7531d331e
3 files changed
+10 -2

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ buildscript {
apply plugin: 'forge'
apply plugin: 'scala'
version = "1.0.1"
version = "1.0.2"
ext.bdlibver = "1.0.1.16"
ext.versuffix = "mc164"
+4
View File
@@ -92,6 +92,10 @@ sourceSets {
}
}
genIntellijRuns {
enabled = false
}
jar {
classifier "obf"
}
@@ -38,13 +38,17 @@ case class GeneSampleInfo(root: ISpeciesRoot, chromosome: Int, allele: IAllele)
case "METABOLISM" => i.getValue.toString
case _ => i.getName
}
case f: IAlleleFlowers => f.getProvider.getDescription
case f: IAlleleFruit => StringUtil.localize(f.getProvider.getDescription)
case p: IAllelePlantType => if (p.getPlantTypes.isEmpty) "-" else p.getPlantTypes.asScala.mkString(", ")
case b: IAlleleBoolean => if (b.getValue) Misc.toLocal("gendustry.allele.true") else Misc.toLocal("gendustry.allele.false")
case g: IAlleleGrowth => g.getProvider.getDescription
case x => StringUtil.localize(x.getName)
}
return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), alstr)
if (alstr == "")
return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), allele.getUID)
else
return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), alstr)
}
}