mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
updated element asserts for power indicator and incremented graphics version
This commit is contained in:
parent
de6d8a89ca
commit
e750ffe69d
@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
|
|||||||
|
|
||||||
local core = {}
|
local core = {}
|
||||||
|
|
||||||
core.version = "2.3.0"
|
core.version = "2.3.1"
|
||||||
|
|
||||||
core.flasher = flasher
|
core.flasher = flasher
|
||||||
core.events = events
|
core.events = events
|
||||||
|
@ -24,8 +24,9 @@ local element = require("graphics.element")
|
|||||||
---@param args power_indicator_args
|
---@param args power_indicator_args
|
||||||
---@return graphics_element element, element_id id
|
---@return graphics_element element, element_id id
|
||||||
local function power(args)
|
local function power(args)
|
||||||
element.assert(type(args.value) == "number", "value is a required field")
|
element.assert(type(args.label) == "string", "label is a required field")
|
||||||
element.assert(type(args.unit) == "string", "unit is a required field")
|
element.assert(type(args.unit) == "string", "unit is a required field")
|
||||||
|
element.assert(type(args.value) == "number", "value is a required field")
|
||||||
element.assert(util.is_int(args.width), "width is a required field")
|
element.assert(util.is_int(args.width), "width is a required field")
|
||||||
|
|
||||||
args.height = 1
|
args.height = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user