Update server

This commit is contained in:
Dominic Zimmer 2020-07-08 01:41:36 +02:00
parent d35b7e7f62
commit f18da2263b

View File

@ -4,7 +4,7 @@ state = {}
ores = {}
thelog = {"", "", "", "", "", "", "", ""}
logsize = 8
logsize = 6
logpos = 1
curjob = 69
@ -26,7 +26,7 @@ function drawState()
print(" [ Server Control Panel ]")
print(" First Job: "..tostring(firstjob))
print(" Current Job: "..tostring(curjob))
print(" Fuel consumed: "..tostring(totalfuel).." ("..tostring(math.floor(totalfuel/80))..")")
print(" Fuel consumed: "..tostring(totalfuel).." ("..tostring(math.ceil(totalfuel/80))..")")
print()
n1 = tostring(getOres("minecraft:coal_ore"))
n2 = tostring(getOres("minecraft:iron_ore"))
@ -46,8 +46,8 @@ function drawState()
print(" Z C "..n11.." "..n12)
print()
print("Log:")
for i = (logpos + logsize - 1), logpos, -1 do
print(thelog[i % logsize])
for i = logpos, (logpos + logsize - 1) do
print(thelog[((i-1) % logsize)+1]) -- map from 0..n-1 to 1..n
end
end