Module:MOS mode degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
Adopt verify function
Ganaram inukshuk (talk | contribs)
Perfectable scale degrees now show white for the perfect size
Line 27: Line 27:
local is_period_interval = interval_step_count % period_step_count == 0
local is_period_interval = interval_step_count % period_step_count == 0
local is_root_mos = input_mos.nL == input_mos.ns
local is_bright_gen = interval_step_count % period_step_count == mos.bright_gen_step_count(input_mos)
local is_dark_gen  = interval_step_count % period_step_count == mos.dark_gen_step_count(input_mos)
local color = p.cell_color_none
local color = p.cell_color_none
if is_period_interval then
if is_period_interval then
if chroma_count > 0 then
color = p.cell_color_lg_altered_size
elseif chroma_count == 0 then
color = p.cell_color_none
elseif chroma_count < 0 then
color = p.cell_color_sm_altered_size
end
elseif not is_root_mos and is_bright_gen then
if chroma_count > 0 then
color = p.cell_color_lg_altered_size
elseif chroma_count == 0 then
color = p.cell_color_none
elseif chroma_count < 0 then
color = p.cell_color_sm_altered_size
end
elseif not is_root_mos and is_dark_gen then
local chroma_count = chroma_count - 1
if chroma_count > 0 then
if chroma_count > 0 then
color = p.cell_color_lg_altered_size
color = p.cell_color_lg_altered_size