Module:Sandbox/DD4235/Ribbon devices
Appearance
rd = {}
-- To future user adding entries:
-- Don't forget to put a comma after every entry (except the last one) in ALL tables
rd.nameTable = {
}
rd.awardTable = {
["oak"] = {[1]="File:Bronze oakleaf-3d.svg",[5]="File:Silver oakleaf-3d.svg"},
["service-star"] = {[1]="File:Bronze-service-star-3d.png",[5]="File:Silver-service-star-3d.png"},
["award-star"] = {[1]="File:Award-star-gold-3d.svg",[5]="File:Award-star-silver-3d.png"}
}
rd.otherTable = {
["fmf"] = "File:Fleet Marine Force Combat Operations Insignia.svg"
}
rd.ribbon = function(arg)
-- Check inputs and specify defaults
assert(arg.name or arg.ribbon,"Must specify input 'name' or input 'ribbon'.")
assert(not (arg.name and arg.ribbon),"Cannot specify both 'name' and 'ribbon' values.")
assert((type(arg.name)=="string") or (type(arg.ribbon)=="string"),"Either 'name' or 'ribbon' must be a string.")
if not arg.type then arg.type="null" end
if not arg.number then arg.number=0 end
if not arg.other_devices then arg.other_devices="null" end
if not arg.alt then arg.alt="" end
if not arg.width then arg.width=106 end
-- Define some stuff
size = width/106 -- 106 is the default width (size=1); size is a multiplyer to apply to ALL dimensions and coordinates
outString = "" -- Eventually, this string will be filled with the HTML output
outString = "<pre>\n" -- Comment out this line when you DONT want the <pre> tag. Also comment out last half of return line
outString = outString.."Test"
-- Figure out where the image actually IS
--if name then imgFile =
return outString .. "</pre>\n"
end
return rd