mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
Don't try to load an icon for the drone (there is none, using model to render it anyway).
Showing components in tablet in tooltip (kept forgetting about that one).
This commit is contained in:
parent
9489cd4f40
commit
0dceb3e1b6
@ -5,7 +5,7 @@ oc.version=1.4.3
|
||||
oc.subversion=dev
|
||||
|
||||
ae2.version=rv1-stable-1
|
||||
bc.version=6.1.8
|
||||
bc.version=6.2.6
|
||||
cc.cf=2216/236
|
||||
cc.version=1.65
|
||||
ccl.version=1.1.1.104
|
||||
|
@ -2,6 +2,8 @@ package li.cil.oc.common.item
|
||||
|
||||
import java.util
|
||||
|
||||
import cpw.mods.fml.relauncher.Side
|
||||
import cpw.mods.fml.relauncher.SideOnly
|
||||
import li.cil.oc.client.KeyBindings
|
||||
import li.cil.oc.common.entity
|
||||
import li.cil.oc.util.BlockPosition
|
||||
@ -29,4 +31,8 @@ class Drone(val parent: Delegator) extends Delegate {
|
||||
stack.stackSize -= 1
|
||||
true
|
||||
}
|
||||
|
||||
// We no item (rendering using model only).
|
||||
@SideOnly(Side.CLIENT)
|
||||
override def registerIcons(iconRegister: IconRegister) {}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package li.cil.oc.common.item
|
||||
|
||||
import java.util
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.Callable
|
||||
import java.util.concurrent.TimeUnit
|
||||
@ -24,6 +25,7 @@ import li.cil.oc.api.machine.Architecture
|
||||
import li.cil.oc.api.machine.MachineHost
|
||||
import li.cil.oc.api.network.Message
|
||||
import li.cil.oc.api.network.Node
|
||||
import li.cil.oc.client.KeyBindings
|
||||
import li.cil.oc.common.GuiType
|
||||
import li.cil.oc.common.Slot
|
||||
import li.cil.oc.common.inventory.ComponentInventory
|
||||
@ -69,6 +71,16 @@ class Tablet(val parent: Delegator) extends Delegate {
|
||||
|
||||
// ----------------------------------------------------------------------- //
|
||||
|
||||
override protected def tooltipExtended(stack: ItemStack, tooltip: util.List[String]): Unit = {
|
||||
if (KeyBindings.showExtendedTooltips) {
|
||||
val info = new ItemUtils.TabletData(stack)
|
||||
// Ignore/hide the screen.
|
||||
info.items.drop(1).collect {
|
||||
case Some(component) => tooltip.add("- " + component.getDisplayName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override def isDamageable = true
|
||||
|
||||
override def damage(stack: ItemStack) = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user