hdd capacity info in tooltip only in advanced tooltips

This commit is contained in:
Florian Nücke 2013-10-07 19:53:22 +02:00
parent e4ef181704
commit 67792fc992
2 changed files with 9 additions and 5 deletions

View File

@ -5,11 +5,14 @@ import li.cil.oc.common.block._
object Blocks {
var blockSimple: Delegator = null
var blockSpecial: Delegator = null
var computer: Computer = null
var screen: Screen = null
var keyboard: Keyboard = null
var powersupply: PowerSupply = null
var powerdistributor: PowerDistributor = null
var powerSupply: PowerSupply = null
var powerDistributor: PowerDistributor = null
def init() {
// IMPORTANT: the multi block must come first, since the sub blocks will
// try to register with it. Also, the order the sub blocks are created in
@ -20,7 +23,8 @@ object Blocks {
computer = new Computer(blockSimple)
screen = new Screen(blockSimple)
keyboard = new Keyboard(blockSpecial)
powersupply = new PowerSupply(blockSimple)
powerdistributor = new PowerDistributor(blockSimple)
powerSupply = new PowerSupply(blockSimple)
powerDistributor = new PowerDistributor(blockSimple)
}
}

View File

@ -18,7 +18,7 @@ class Hdd(val parent: Delegator, val megaBytes: Int) extends Delegate {
val nodeNbt = nbt.getCompoundTag("oc.node")
if (nodeNbt.hasKey("address"))
tooltip.add(nodeNbt.getString("address"))
if (nodeNbt.hasKey("fs")) {
if (advanced && nodeNbt.hasKey("fs")) {
val fsNbt = nodeNbt.getCompoundTag("fs")
if (fsNbt.hasKey("used")) {
val used = fsNbt.getLong("used")