Merge branch 'develop-1.8' of https://github.com/kepler155c/opus into develop-1.8

This commit is contained in:
kepler155c@gmail.com
2019-10-28 20:02:14 -06:00
4 changed files with 7 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ local parentShell = _ENV.shell
_ENV.shell = { }
local fs = _G.fs
local settings = _G.settings
local shell = _ENV.shell
local sandboxEnv = setmetatable({ }, { __index = _G })
@@ -673,6 +674,10 @@ local history = History.load('usr/.shell_history', 25)
term.setBackgroundColor(_colors.backgroundColor)
term.clear()
if settings.get("motd.enabled") then
shell.run("motd")
end
while not bExit do
if config.displayDirectory then
term.setTextColour(_colors.directoryTextColor)

View File

@@ -100,6 +100,7 @@ function UI.Form:validateField(field)
end
end
if field.validate == 'numeric' then
field.value = field.value or ''
if #tostring(field.value) > 0 then
if not tonumber(field.value) then
return false, 'Invalid number'