updated
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
local function getValue()
|
||||
return environment.getRadiation().radiation
|
||||
local function getValue(env)
|
||||
local value = env.getRadiation()
|
||||
local stringValue = value.radiation .. value.unit
|
||||
return stringValue
|
||||
end
|
||||
|
||||
local function watch()
|
||||
@@ -16,11 +18,12 @@ local function shutdown()
|
||||
end
|
||||
|
||||
local function report()
|
||||
local value = getValue()
|
||||
local color = colors.black
|
||||
monitor.setBackgroundColor(color)
|
||||
|
||||
setNewLine()
|
||||
monitor.write("Radiation Level: " .. tostring(value))
|
||||
monitor.write("Internal Radiation Level: " .. getValue(internalEnvironment))
|
||||
setNewLine()
|
||||
monitor.write("External Radiation Level: " .. getValue(externalEnvironment))
|
||||
end
|
||||
return { report = report, watch = watch, startUp = startUp, shutdown = shutdown }
|
||||
Reference in New Issue
Block a user