mirror of
https://github.com/kepler155c/opus
synced 2025-01-26 15:16:52 +00:00
disable red server
This commit is contained in:
parent
7d64b0c6db
commit
5d38c307b3
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
]]
|
||||
|
Loading…
Reference in New Issue
Block a user