From 8e5bb6f1f4033677f349b688e252b92aa025abb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Thu, 2 Jan 2014 21:17:51 +0100 Subject: [PATCH] showing information on disk in disk drive if analyzer is used on it, closes #49 --- li/cil/oc/common/tileentity/DiskDrive.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/li/cil/oc/common/tileentity/DiskDrive.scala b/li/cil/oc/common/tileentity/DiskDrive.scala index bc1c30ccc..47348f33f 100644 --- a/li/cil/oc/common/tileentity/DiskDrive.scala +++ b/li/cil/oc/common/tileentity/DiskDrive.scala @@ -13,7 +13,11 @@ class DiskDrive extends Environment with ComponentInventory with Rotatable with // ----------------------------------------------------------------------- // - def onAnalyze(stats: NBTTagCompound, player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = null + def onAnalyze(stats: NBTTagCompound, player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float) = + components(0) match { + case Some(environment) => environment.node + case _ => null + } override def canUpdate = false