blob: c6e9fbc72eacc120c437ea93daa433cf26559d7e [file] [log] [blame] [raw]
package li.cil.oc.server.drivers
import li.cil.oc.Config
import li.cil.oc.api.{IItemDriver, ComponentType}
import li.cil.oc.server.components.Disk
import net.minecraft.item.ItemStack
object HDDDriver extends IItemDriver {
def mount(hddId: Int, path: String) {
}
override def api = null
override def worksWith(item: ItemStack) = item.itemID == Config.itemHDDId
override def componentType(item: ItemStack) = ComponentType.HDD
override def node(item: ItemStack) = null
def close(component: Any) {
component.asInstanceOf[HDDComponent].close()
}
}
class HDDComponent(val item: ItemStack) {
val disk = new Disk()
def close() = disk.close()
}