mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
fixed wrong matching of components
This commit is contained in:
parent
e584af09e3
commit
288c059599
@ -13,7 +13,7 @@ trait AbstractBusAware extends TileEntity with ComponentInventory with IBusDevic
|
|||||||
def getInterfaces(side: Int) =
|
def getInterfaces(side: Int) =
|
||||||
if (hasAbstractBusCard) {
|
if (hasAbstractBusCard) {
|
||||||
components collect {
|
components collect {
|
||||||
case abstractBus: component.AbstractBus => abstractBus.busInterface
|
case Some(abstractBus: component.AbstractBus) => abstractBus.busInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else null
|
else null
|
||||||
@ -25,7 +25,8 @@ trait AbstractBusAware extends TileEntity with ComponentInventory with IBusDevic
|
|||||||
def getZCoord = z
|
def getZCoord = z
|
||||||
|
|
||||||
protected def hasAbstractBusCard = components exists {
|
protected def hasAbstractBusCard = components exists {
|
||||||
case _: component.AbstractBus => true
|
case Some(_: component.AbstractBus) => true
|
||||||
|
case _ => false
|
||||||
}
|
}
|
||||||
|
|
||||||
override protected def onItemAdded(slot: Int, stack: ItemStack) {
|
override protected def onItemAdded(slot: Int, stack: ItemStack) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user