blob: d6fc60d3a129d3e0b64dfcbc05eb7e6ccbb6912b [file] [log] [blame] [raw]
package li.cil.oc.server.components
import li.cil.oc.common.components.IScreen
import li.cil.oc.common.tileentity.TileEntityScreen
import li.cil.oc.server.PacketSender
class Screen(val owner: TileEntityScreen) extends IScreen with IComponent {
id = 1
def resolution_=(value: (Int, Int)) = {
val (w, h) = value
PacketSender.sendScreenResolutionChange(owner, w, h)
}
def set(col: Int, row: Int, s: String) =
PacketSender.sendScreenSet(owner, col, row, s)
def fill(col: Int, row: Int, w: Int, h: Int, c: Char) =
PacketSender.sendScreenFill(owner, col, row, w, h, c)
def copy(col: Int, row: Int, w: Int, h: Int, tx: Int, ty: Int) =
PacketSender.sendScreenCopy(owner, col, row, w, h, tx, ty)
}