Module:Utilities: Difference between revisions

Sur (talk | contribs)
m deep_copy > p.deep_copy
Sur (talk | contribs)
m get_slot_color initial
Line 100: Line 100:
     end
     end
     return copy
     return copy
end
local slot_category_to_color = {
["Weapon"] = "c97a03", --orange
["Armor"] = "659818", --green
["Tech"] = "8b56b4" --purple/pink
}
function p.get_slot_color(slot)
if type(slot) == 'table' and slot.args then
frame = slot
slot = frame.args[1]
end
if slot == nil then
return "'slot' parameter must be provided"
end
local color = slot_category_to_color[slot]
if color == nil then
return "'slot' " .. slot .. " is not in slot_category_to_color map"
end
return color
end
end


return p
return p