blob: 66671f18d1f8c058e2433c51de9d81142e940e6a [file] [log] [blame] [raw]
package li.cil.oc.server.component
import li.cil.oc.Settings
import li.cil.oc.api.Network
import li.cil.oc.api.machine.{Arguments, Callback, Context}
import li.cil.oc.api.network.Visibility
import li.cil.oc.common.component
import li.cil.oc.common.item.TabletWrapper
class Tablet(val tablet: TabletWrapper) extends component.ManagedComponent {
val node = Network.newNode(this, Visibility.Network).
withComponent("tablet").
withConnector(Settings.get.bufferTablet).
create()
// ----------------------------------------------------------------------- //
@Callback(doc = """function():boolean -- Whether the local bus interface is enabled.""")
def getPitch(context: Context, args: Arguments): Array[AnyRef] = result(tablet.holder.rotationPitch)
}