mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
41579f85bc
@ -1,7 +1,7 @@
|
|||||||
minecraft.version=1.6.4
|
minecraft.version=1.6.4
|
||||||
forge.version=9.11.1.964
|
forge.version=9.11.1.964
|
||||||
oc.version=1.3.0
|
oc.version=1.3.0
|
||||||
oc.subversion=beta.1
|
oc.subversion=rc.1
|
||||||
ccl.version=1.0.0.62
|
ccl.version=1.0.0.62
|
||||||
fmp.version=1.0.0.250
|
fmp.version=1.0.0.250
|
||||||
maven.url=file:///var/www/users/fnuecke/maven.cil.li
|
maven.url=file:///var/www/users/fnuecke/maven.cil.li
|
@ -531,43 +531,51 @@ object TextBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ServerProxy(val owner: TextBuffer) extends Proxy {
|
class ServerProxy(val owner: TextBuffer) extends Proxy {
|
||||||
|
// TODO This is a to prevent a NPE reported in #350.
|
||||||
|
// It is a workaround at best, as this is treating the symptons, and not
|
||||||
|
// the cause - which seems to be that the TickHandler used for adding nodes
|
||||||
|
// to the network may fail to run before the tile entities' update is
|
||||||
|
// performed -- even though it is marked to run at the start of the tick.
|
||||||
|
// I have no idea why that would be, however, so this has to do for now.
|
||||||
|
private def isValid = owner.node != null && owner.node.address != null
|
||||||
|
|
||||||
override def onScreenColorChange() {
|
override def onScreenColorChange() {
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferColorChange(owner.node.address, owner.data.foreground, owner.data.background, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferColorChange(owner.node.address, owner.data.foreground, owner.data.background, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenCopy(col: Int, row: Int, w: Int, h: Int, tx: Int, ty: Int) {
|
override def onScreenCopy(col: Int, row: Int, w: Int, h: Int, tx: Int, ty: Int) {
|
||||||
super.onScreenCopy(col, row, w, h, tx, ty)
|
super.onScreenCopy(col, row, w, h, tx, ty)
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferCopy(owner.node.address, col, row, w, h, tx, ty, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferCopy(owner.node.address, col, row, w, h, tx, ty, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenDepthChange(depth: ColorDepth) {
|
override def onScreenDepthChange(depth: ColorDepth) {
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferDepthChange(owner.node.address, depth, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferDepthChange(owner.node.address, depth, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenFill(col: Int, row: Int, w: Int, h: Int, c: Char) {
|
override def onScreenFill(col: Int, row: Int, w: Int, h: Int, c: Char) {
|
||||||
super.onScreenFill(col, row, w, h, c)
|
super.onScreenFill(col, row, w, h, c)
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferFill(owner.node.address, col, row, w, h, c, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferFill(owner.node.address, col, row, w, h, c, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenPaletteChange(index: Int) {
|
override def onScreenPaletteChange(index: Int) {
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferPaletteChange(owner.node.address, index, owner.getPaletteColor(index), owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferPaletteChange(owner.node.address, index, owner.getPaletteColor(index), owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenResolutionChange(w: Int, h: Int) {
|
override def onScreenResolutionChange(w: Int, h: Int) {
|
||||||
super.onScreenResolutionChange(w, h)
|
super.onScreenResolutionChange(w, h)
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferResolutionChange(owner.node.address, w, h, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferResolutionChange(owner.node.address, w, h, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def onScreenSet(col: Int, row: Int, s: String, vertical: Boolean) {
|
override def onScreenSet(col: Int, row: Int, s: String, vertical: Boolean) {
|
||||||
super.onScreenSet(col, row, s, vertical)
|
super.onScreenSet(col, row, s, vertical)
|
||||||
owner.owner.markChanged()
|
owner.owner.markChanged()
|
||||||
ServerPacketSender.sendTextBufferSet(owner.node.address, col, row, s, vertical, owner.owner)
|
if (isValid) ServerPacketSender.sendTextBufferSet(owner.node.address, col, row, s, vertical, owner.owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
override def keyDown(character: Char, code: Int, player: EntityPlayer) {
|
override def keyDown(character: Char, code: Int, player: EntityPlayer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user