mirror of
https://github.com/LDDestroier/CC/
synced 2025-01-31 11:19:11 +00:00
Added "addSpeed" and "subtractSpeed"
Now you can determine just how fast the phosphors light up and die down!
This commit is contained in:
parent
56b6c01ec1
commit
5b8a4ee9af
@ -1,6 +1,15 @@
|
|||||||
local tArg = {...}
|
local tArg = {...}
|
||||||
local filename = tArg[1]
|
local filename = tArg[1]
|
||||||
|
|
||||||
|
local contrast = 2 -- lower value means higher contrast
|
||||||
|
local addSpeed = 4 -- higher value means brighter colors show up faster
|
||||||
|
local subtractSpeed = 2 -- higher value means darker colors take over faster
|
||||||
|
local tint = {
|
||||||
|
1,
|
||||||
|
0.7,
|
||||||
|
0.1,
|
||||||
|
}
|
||||||
|
|
||||||
if not fs.exists("windont.lua") then
|
if not fs.exists("windont.lua") then
|
||||||
print("'windont.lua' not found! Downloading...")
|
print("'windont.lua' not found! Downloading...")
|
||||||
local net = http.get("https://github.com/LDDestroier/CC/raw/master/windont/windont.lua")
|
local net = http.get("https://github.com/LDDestroier/CC/raw/master/windont/windont.lua")
|
||||||
@ -16,18 +25,13 @@ end
|
|||||||
|
|
||||||
local windont = require("windont")
|
local windont = require("windont")
|
||||||
|
|
||||||
|
windont.useSetVisible = true
|
||||||
|
|
||||||
local newTerm = windont.newWindow(1, 1, term.getSize())
|
local newTerm = windont.newWindow(1, 1, term.getSize())
|
||||||
local gstTerm = windont.newWindow(1, 1, term.getSize())
|
local gstTerm = windont.newWindow(1, 1, term.getSize())
|
||||||
newTerm.meta.alwaysRender = false
|
newTerm.meta.alwaysRender = false
|
||||||
gstTerm.meta.alwaysRender = false
|
gstTerm.meta.alwaysRender = false
|
||||||
|
|
||||||
local contrast = 2 -- lower value equals higher contrast
|
|
||||||
local tint = {
|
|
||||||
1,
|
|
||||||
0.7,
|
|
||||||
0.1,
|
|
||||||
}
|
|
||||||
|
|
||||||
local scr_x, scr_y = term.getSize()
|
local scr_x, scr_y = term.getSize()
|
||||||
|
|
||||||
local palette = {}
|
local palette = {}
|
||||||
@ -84,15 +88,15 @@ gstTerm.meta.metaTransformation = function(meta)
|
|||||||
meta.buffer[1][y][x] = CHAR
|
meta.buffer[1][y][x] = CHAR
|
||||||
|
|
||||||
if rv_bright[TXCOL] >= rv_bright[meta.buffer[2][y][x]] then
|
if rv_bright[TXCOL] >= rv_bright[meta.buffer[2][y][x]] then
|
||||||
meta.buffer[2][y][x] = TXCOL
|
meta.buffer[2][y][x] = bright[ math.min(rv_bright[meta.buffer[2][y][x]] + addSpeed, rv_bright[TXCOL]) ]
|
||||||
else
|
else
|
||||||
meta.buffer[2][y][x] = bright[ rv_bright[meta.buffer[2][y][x]] - 1 ]
|
meta.buffer[2][y][x] = bright[ math.max(rv_bright[meta.buffer[2][y][x]] - subtractSpeed, 1) ]
|
||||||
end
|
end
|
||||||
|
|
||||||
if rv_bright[BGCOL] >= rv_bright[meta.buffer[3][y][x]] then
|
if rv_bright[BGCOL] >= rv_bright[meta.buffer[3][y][x]] then
|
||||||
meta.buffer[3][y][x] = BGCOL
|
meta.buffer[3][y][x] = bright[ math.min(rv_bright[meta.buffer[3][y][x]] + addSpeed, rv_bright[BGCOL]) ]
|
||||||
else
|
else
|
||||||
meta.buffer[3][y][x] = bright[ rv_bright[meta.buffer[3][y][x]] - 1 ]
|
meta.buffer[3][y][x] = bright[ math.max(rv_bright[meta.buffer[3][y][x]] - subtractSpeed, 1) ]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user