mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
making slots in server racks default to different sides; ensuring virtual keyboards of servers are only visible locally
This commit is contained in:
parent
3ff43ce1f5
commit
af1e76ca8c
@ -2,8 +2,8 @@ package li.cil.oc.common.component
|
||||
|
||||
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||
import li.cil.oc.api.network.{Node, Visibility}
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.common.item
|
||||
import li.cil.oc.common.tileentity
|
||||
import li.cil.oc.server.component
|
||||
import li.cil.oc.server.{PacketSender => ServerPacketSender}
|
||||
import li.cil.oc.util.ExtendedNBT._
|
||||
@ -17,6 +17,8 @@ class Terminal(val rack: tileentity.Rack, val number: Int) extends Buffer.Owner
|
||||
val keyboard = if (buffer.node != null) {
|
||||
buffer.node.setVisibility(Visibility.Neighbors)
|
||||
new component.Keyboard {
|
||||
node.setVisibility(Visibility.Neighbors)
|
||||
|
||||
override def isUseableByPlayer(p: EntityPlayer) = {
|
||||
val stack = p.getCurrentEquippedItem
|
||||
Items.multi.subItem(stack) match {
|
||||
|
@ -19,7 +19,7 @@ import stargatetech2.api.bus.IBusDevice
|
||||
class Rack extends Hub with PowerBalancer with Inventory with Rotatable with BundledRedstoneAware with AbstractBusAware with IBusDevice with Analyzable {
|
||||
val servers = Array.fill(getSizeInventory)(None: Option[component.Server])
|
||||
|
||||
val sides = Array.fill(servers.length)(ForgeDirection.UNKNOWN)
|
||||
val sides = Array(ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.DOWN)
|
||||
|
||||
val terminals = (0 until servers.length).map(new common.component.Terminal(this, _)).toArray
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user