Module:Buildup: Difference between revisions

TheMilkMan (talk | contribs)
Trying to resolve modules that rely on Names being broken now that Silver's Werewolf form has a nil name.
TheMilkMan (talk | contribs)
Previous edit only sort of worked, trying this instead.
Line 119: Line 119:
         local is_disabled = hero["IsDisabled"] == true
         local is_disabled = hero["IsDisabled"] == true
          
          
         if not is_dev and not is_disabled and hero["Weapon"] then
         if not is_dev and not is_disabled and hero["Weapon"] and hero["Name"] then
             local val = calculate_bps(hero, bb)
             local val = calculate_bps(hero, bb)
              
              
Line 138: Line 138:
         -- Helper to strip "The " from names just for sorting
         -- Helper to strip "The " from names just for sorting
         local function clean_sort_name(name)
         local function clean_sort_name(name)
        if type(name) ~= "string" then
        return ""
    end
             if string.sub(name, 1, 4) == "The " then
             if string.sub(name, 1, 4) == "The " then
                 return string.sub(name, 5)
                 return string.sub(name, 5)