mirror of
https://github.com/kepler155c/opus
synced 2025-05-15 05:44:10 +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
|
return ot
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Util.reduce(t, fn, acc)
|
||||||
|
for _, v in pairs(t) do
|
||||||
|
fn(acc, v)
|
||||||
|
end
|
||||||
|
return acc
|
||||||
|
end
|
||||||
|
|
||||||
function Util.size(list)
|
function Util.size(list)
|
||||||
if type(list) == 'table' then
|
if type(list) == 'table' then
|
||||||
local length = 0
|
local length = 0
|
||||||
|
@ -206,7 +206,7 @@ function page.grid:getDisplayValues(row)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if row.fuel then
|
if row.fuel then
|
||||||
row.fuel = Util.toBytes(row.fuel)
|
row.fuel = row.fuel > 0 and Util.toBytes(row.fuel) or ''
|
||||||
end
|
end
|
||||||
if row.distance then
|
if row.distance then
|
||||||
row.distance = Util.round(row.distance, 1)
|
row.distance = Util.round(row.distance, 1)
|
||||||
|
@ -80,15 +80,6 @@ end
|
|||||||
local function createShellEnv(sDir)
|
local function createShellEnv(sDir)
|
||||||
local tEnv = setmetatable(Util.shallowCopy(sandboxEnv), { __index = _G })
|
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
|
local package
|
||||||
|
|
||||||
package = {
|
package = {
|
||||||
@ -106,7 +97,6 @@ local function createShellEnv(sDir)
|
|||||||
preload = { },
|
preload = { },
|
||||||
loaders = {
|
loaders = {
|
||||||
function( name )
|
function( name )
|
||||||
_G._p = _ENV
|
|
||||||
if package.preload[name] then
|
if package.preload[name] then
|
||||||
return package.preload[name]
|
return package.preload[name]
|
||||||
else
|
else
|
||||||
|
@ -79,6 +79,7 @@ local function getListing(path, recursive)
|
|||||||
return list
|
return list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
Event.on('modem_message', function(_, _, dport, dhost, request)
|
Event.on('modem_message', function(_, _, dport, dhost, request)
|
||||||
if dport == 80 and dhost == computerId and type(request) == 'table' then
|
if dport == 80 and dhost == computerId and type(request) == 'table' then
|
||||||
if request.method == 'GET' then
|
if request.method == 'GET' then
|
||||||
@ -111,3 +112,4 @@ Event.on('modem_message', function(_, _, dport, dhost, request)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user