Модуль:Песочница/Pok: различия между версиями

мНет описания правки
мНет описания правки
Строка 76: Строка 76:
      
      
     local prob = ""
     local prob = ""
 
    local probValue = nil
     if content.weight then
     if content.weight then
         content.prob = content.weight / 100
         probValue = content.weight / 100
     end
     end


     if content.prob then
     if probValue then
         prob = string.format(" <div>%s%%</div>", content.prob * 100 >= 1 and math.floor(content.prob * 100) or content.prob * 100)
         prob = string.format(" <div>%s%%</div>", probValue * 100 >= 1 and math.floor(probValue * 100) or probValue * 100)
     end
     end