Module:MOS mode degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
m offset went the wrong way
Ganaram inukshuk (talk | contribs)
Undo cell color changes as it didn't look right
Line 29: Line 29:
local is_root_mos = input_mos.nL == input_mos.ns
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 -- Offset chroma count since the small size is perfect
if chroma_count > 0 then
if chroma_count > 0 then
color = p.cell_color_lg_altered_size
color = p.cell_color_lg_altered_size