disable red server

This commit is contained in:
kepler155c@gmail.com 2018-12-20 19:28:26 -05:00
parent 7d64b0c6db
commit 5d38c307b3
4 changed files with 10 additions and 11 deletions

View File

@ -296,6 +296,13 @@ function Util.filter(it, f)
return ot
end
function Util.reduce(t, fn, acc)
for _, v in pairs(t) do
fn(acc, v)
end
return acc
end
function Util.size(list)
if type(list) == 'table' then
local length = 0

View File

@ -206,7 +206,7 @@ function page.grid:getDisplayValues(row)
end
end
if row.fuel then
row.fuel = Util.toBytes(row.fuel)
row.fuel = row.fuel > 0 and Util.toBytes(row.fuel) or ''
end
if row.distance then
row.distance = Util.round(row.distance, 1)

View File

@ -80,15 +80,6 @@ end
local function createShellEnv(sDir)
local tEnv = setmetatable(Util.shallowCopy(sandboxEnv), { __index = _G })
--[[
package.path = "?;?.lua;?/init.lua;/rom/modules/main/?;/rom/modules/main/?.lua;/rom/modules/main/?/init.lua"
if turtle then
package.path = package.path..";/rom/modules/turtle/?;/rom/modules/turtle/?.lua;/rom/modules/turtle/?/init.lua"
elseif command then
package.path = package.path..";/rom/modules/command/?;/rom/modules/command/?.lua;/rom/modules/command/?/init.lua"
end
]]
local package
package = {
@ -106,7 +97,6 @@ local function createShellEnv(sDir)
preload = { },
loaders = {
function( name )
_G._p = _ENV
if package.preload[name] then
return package.preload[name]
else

View File

@ -79,6 +79,7 @@ local function getListing(path, recursive)
return list
end
--[[
Event.on('modem_message', function(_, _, dport, dhost, request)
if dport == 80 and dhost == computerId and type(request) == 'table' then
if request.method == 'GET' then
@ -111,3 +112,4 @@ Event.on('modem_message', function(_, _, dport, dhost, request)
end
end
end)
]]