mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 23:38:04 -04:00
Merge branch 'master-MC1.10' into master-MC1.11
This commit is contained in:
commit
2ead42ee72
@ -34,7 +34,7 @@ function print(...)
|
|||||||
local stdout = io.stdout
|
local stdout = io.stdout
|
||||||
local pre = ""
|
local pre = ""
|
||||||
for i = 1, args.n do
|
for i = 1, args.n do
|
||||||
stdout:write(pre, tostring(args[i]))
|
stdout:write(pre, (assert(tostring(args[i]), "'tostring' must return a string to 'print'")))
|
||||||
pre = "\t"
|
pre = "\t"
|
||||||
end
|
end
|
||||||
stdout:write("\n")
|
stdout:write("\n")
|
||||||
|
@ -35,8 +35,16 @@ end
|
|||||||
|
|
||||||
-- [Line;ColumnH Move cursor to screen location v,h
|
-- [Line;ColumnH Move cursor to screen location v,h
|
||||||
-- [Line;Columnf ^ same
|
-- [Line;Columnf ^ same
|
||||||
rules[{"%[", "%d+", ";", "%d+", "[Hf]"}] = function(window, _, y, _, x)
|
-- [;H Move cursor to upper left corner
|
||||||
set_cursor(window, tonumber(x), tonumber(y))
|
-- [;f ^ same
|
||||||
|
rules[{"%[", "%d*", ";", "%d*", "[Hf]"}] = function(window, _, y, _, x)
|
||||||
|
set_cursor(window, tonumber(x) or 1, tonumber(y) or 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- [H move cursor to upper left corner
|
||||||
|
-- [f ^ same
|
||||||
|
rules[{"%[[Hf]"}] = function(window)
|
||||||
|
set_cursor(window, 1, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [K clear line from cursor right
|
-- [K clear line from cursor right
|
||||||
@ -63,14 +71,6 @@ rules[{"%[", "[012]?", "J"}] = function(window, _, n)
|
|||||||
window.gpu.fill(1 + window.dx, y + window.dy, window.width, rep, " ")
|
window.gpu.fill(1 + window.dx, y + window.dy, window.width, rep, " ")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [H move cursor to upper left corner
|
|
||||||
-- [;H ^ same
|
|
||||||
-- [f ^ same
|
|
||||||
-- [;f ^ same
|
|
||||||
rules[{"%[;?", "[Hf]"}] = function(window)
|
|
||||||
set_cursor(window, 1, 1)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- [6n get the cursor position [ EscLine;ColumnR Response: cursor is at v,h ]
|
-- [6n get the cursor position [ EscLine;ColumnR Response: cursor is at v,h ]
|
||||||
rules[{"%[", "6", "n"}] = function(window)
|
rules[{"%[", "6", "n"}] = function(window)
|
||||||
-- this solution puts the response on stdin, but it isn't echo'd
|
-- this solution puts the response on stdin, but it isn't echo'd
|
||||||
|
@ -256,8 +256,10 @@ object PacketSender {
|
|||||||
val x = (xz >> 8).toByte
|
val x = (xz >> 8).toByte
|
||||||
val z = xz.toByte
|
val z = xz.toByte
|
||||||
pb.writeShort(xz)
|
pb.writeShort(xz)
|
||||||
pb.writeInt(t.volume(x + z * t.width))
|
val rangeStart: Int = x + z * t.width
|
||||||
pb.writeInt(t.volume(x + z * t.width + t.width * t.width))
|
val rangeFinal: Int = x + z * t.width + t.width * t.width
|
||||||
|
pb.writeInt(t.volume(rangeStart max 0 min t.volume.length - 1))
|
||||||
|
pb.writeInt(t.volume(rangeFinal max 0 min t.volume.length - 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
pb.sendToPlayersNearTileEntity(t)
|
pb.sendToPlayersNearTileEntity(t)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user