mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
resolved register simplification
This commit is contained in:
parent
86615b03ff
commit
792cb46ce6
@ -522,15 +522,11 @@ local function init(parent, id)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
-- enable/disable controls based on group assignment (start button is separate)
|
-- enable/disable controls based on group assignment (start button is separate)
|
||||||
-- REGISTER_NOTE: register to parent element for brevity
|
burn_rate.register(u_ps, "auto_group_id", function (gid)
|
||||||
burn_control.register(u_ps, "auto_group_id", function (gid)
|
if gid == 0 then burn_rate.enable() else burn_rate.disable() end
|
||||||
if gid == 0 then
|
end)
|
||||||
burn_rate.enable()
|
set_burn_btn.register(u_ps, "auto_group_id", function (gid)
|
||||||
set_burn_btn.enable()
|
if gid == 0 then set_burn_btn.enable() else set_burn_btn.disable() end
|
||||||
else
|
|
||||||
burn_rate.disable()
|
|
||||||
set_burn_btn.disable()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- can't change group if auto is engaged regardless of if this unit is part of auto control
|
-- can't change group if auto is engaged regardless of if this unit is part of auto control
|
||||||
|
Loading…
x
Reference in New Issue
Block a user