Module:Utilities: Difference between revisions

Sur (talk | contribs)
m Bugfixed no_wrap param being handled wrong. Undo revision 13807 by Sur (talk)
Sur (talk | contribs)
m get_slot_color nil cases now also check for blank
Line 153: Line 153:
-- Validate arguments
-- Validate arguments
if slot == nil then return "'slot' parameter must be provided" end
if slot == nil or slot == "" then return "'slot' parameter must be provided" end
if color_format == nil then color_format = "hex" end
if color_format == nil or color_format == "" then color_format = "hex" end
if no_wrap == nil or no_wrap == 'false' then no_wrap = false else no_wrap = true end
if no_wrap == nil or no_wrap == 'false' or no_wrap == "" then no_wrap = false else no_wrap = true end
if debug_mode == nil or debug_mode == 'false' then debug_mode = false end
if debug_mode == nil or debug_mode == 'false' or debug_mode == "" then debug_mode = false end
local slot_data = slot_colors[slot]
local slot_data = slot_colors[slot]