full line clear, slower ramp (60 steps), safe ascii chars
This commit is contained in:
+4
-4
@@ -262,7 +262,7 @@ function reactorControl()
|
|||||||
if currentFlow ~= targetOutput then
|
if currentFlow ~= targetOutput then
|
||||||
local diff = targetOutput - currentFlow
|
local diff = targetOutput - currentFlow
|
||||||
local absDiff = math.abs(diff)
|
local absDiff = math.abs(diff)
|
||||||
local step = math.min(absDiff, math.max(5000, absDiff / 20))
|
local step = math.min(absDiff, math.max(1000, absDiff / 60))
|
||||||
if diff > 0 then
|
if diff > 0 then
|
||||||
local fieldPercent = math.ceil(ri.fieldStrength / ri.maxFieldStrength * 10000) * 0.01
|
local fieldPercent = math.ceil(ri.fieldStrength / ri.maxFieldStrength * 10000) * 0.01
|
||||||
if fieldPercent >= 20 then
|
if fieldPercent >= 20 then
|
||||||
@@ -490,8 +490,8 @@ function updateReactorInfo()
|
|||||||
local currentFlow = fluxgate.getSignalLowFlow()
|
local currentFlow = fluxgate.getSignalLowFlow()
|
||||||
local outputText
|
local outputText
|
||||||
if currentFlow ~= targetOutput then
|
if currentFlow ~= targetOutput then
|
||||||
local arrow = currentFlow < targetOutput and " ▲" or " ▼"
|
local dir = currentFlow < targetOutput and " +" or " -"
|
||||||
outputText = f.format_int(currentFlow).." → "..f.format_int(targetOutput).." rf/t"..arrow
|
outputText = f.format_int(currentFlow).." > "..f.format_int(targetOutput).." rf/t"..dir
|
||||||
else
|
else
|
||||||
outputText = f.format_int(currentFlow).." rf/t"
|
outputText = f.format_int(currentFlow).." rf/t"
|
||||||
end
|
end
|
||||||
@@ -517,7 +517,7 @@ function drawUpdatedText(x, y, label, value, color, labelColor)
|
|||||||
local key = label
|
local key = label
|
||||||
if lastValues[key] ~= value then
|
if lastValues[key] ~= value then
|
||||||
labelColor = labelColor or colors.white
|
labelColor = labelColor or colors.white
|
||||||
f.draw_text_lr(mon, x, y, 3, " ", " ", colors.white, color, colors.black)
|
f.draw_line(mon, x, y, monX - x, colors.black)
|
||||||
f.draw_text_lr(mon, x, y, 3, label, value, labelColor, color, colors.black)
|
f.draw_text_lr(mon, x, y, 3, label, value, labelColor, color, colors.black)
|
||||||
lastValues[key] = value
|
lastValues[key] = value
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user