Module:MOS intervals: Difference between revisions

Ganaram inukshuk (talk | contribs)
m Better header
Ganaram inukshuk (talk | contribs)
Fixed mosprefix lookup
Line 187: Line 187:
-- If left blank, try to find the appropriate mos prefix, or else defualt to "mos"
-- If left blank, try to find the appropriate mos prefix, or else defualt to "mos"
-- If not left blank, use the prefix passed in instead
-- If not left blank, use the prefix passed in instead
local mos_prefix = "mos"
local scale_sig = mos.as_string(input_mos)
if mos_prefix == "NONE" then
local mos_prefix = p.get_mos_prefix(scale_sig)
if frame.args['MOS Prefix'] == "NONE" then
mos_prefix = ""
mos_prefix = ""
elseif string.len(frame.args['MOS Prefix']) == 0 then
elseif string.len(frame.args['MOS Prefix']) > 0 then
mos_prefix_lookup = p.get_mos_prefix(scale_sig)
if string.len(mos_prefix_lookup) ~= 0 then
mos_prefix = mos_prefix_lookup
end
else
mos_prefix = frame.args['MOS Prefix']
mos_prefix = frame.args['MOS Prefix']
end
end