Module:TAMNAMS: Difference between revisions

Ganaram inukshuk (talk | contribs)
Updated to shorter prefixes
Ganaram inukshuk (talk | contribs)
If an empty string is entered into the verify prefix/abbrev functions for a mos outside the tamnams named range, it'll default to mos/m
Line 293: Line 293:
if mos_prefix == "NONE" or mos_prefix == "none" then  
if mos_prefix == "NONE" or mos_prefix == "none" then  
mos_prefix = ""
mos_prefix = ""
elseif mos_prefix == "" then
mos_prefix = "mos"
end
end
return mos_prefix
return mos_prefix
Line 303: Line 305:
function p.verify_abbrev(input_mos, mos_abbrev)
function p.verify_abbrev(input_mos, mos_abbrev)
local mos_abbrev = p.lookup_abbrev(input_mos) or mos_abbrev or "m"
local mos_abbrev = p.lookup_abbrev(input_mos) or mos_abbrev or "m"
if mos_prefix == "NONE" or mos_prefix == "none" then  
if mos_abbrev == "NONE" or mos_abbrev == "none" then  
mos_abbrev = ""
mos_abbrev = ""
elseif mos_abbrev == "" then
mos_abbrev = "m"
end
end
return mos_abbrev
return mos_abbrev
Line 901: Line 905:


function p.tester()
function p.tester()
local mos_modes = mos.modes_by_brightness(mos.new(5,2))
return p.verify_prefix(mos.new(5,3), "")
local output_ = ""
for i = 1, #mos_modes do
output_ = output_ .. mos_modes[i] .. " " .. p.mode_udp(mos_modes[i], mos.new(5,2)) .. "\n"
end
output_ = output_ .. "LLsLsAs" .. " " .. p.mode_udp("LLsLsAs", mos.new(5,2))
--return p.mode_rotation_udps("LsLLsAs", mos.new(5, 2), "m", true)
--return p.degree_quality({4, -1}, mos.new(5,2), "ABBREV", 'm')
return p.find_ancestor_info(mos.new(7,12), 10)
end
end


return p
return p