×
Create a new article
Write your page title here:
We currently have 277 articles on Waste Of Space Wiki. Type your article name above or create one of the articles listed here!



    Waste Of Space Wiki

    Module:GetPartInfo: Difference between revisions

    Content deleted Content added
    mNo edit summary
    m Fixed an annoying bug that caused poor formatting on the configuration section of the part template
     
    (39 intermediate revisions by the same user not shown)
    Line 153: Line 153:
    if entryType == "number" then
    if entryType == "number" then
    formatted = formatted .. "\n\n * "..entryName.."<sup>(number)[" .. range[1] .. " - " .. range[2] .. "]</sup>"
    formatted = formatted .. " \n* "..entryName.."<sup>(number)[" .. range[1] .. " - " .. range[2] .. "]</sup>"
    elseif entryType == "boolean" then
    elseif entryType == "boolean" then
    formatted = formatted .. "\n\n *"..entryName.."<sup>(boolean)</sup> "
    formatted = formatted .. " \n* "..entryName.."<sup>(boolean)</sup> "
    elseif entryType == "string" then
    elseif entryType == "string" then
    formatted = formatted .. "\n\n *"..entryName.."<sup>(string)</sup> "
    formatted = formatted .. " \n* "..entryName.."<sup>(string)</sup> "
    elseif entryType == "Selection" then
    elseif entryType == "Selection" then
    formatted = formatted .. "\n\n *"..entryName.."<sup>(selection)</sup> "
    formatted = formatted .. " \n* "..entryName.."<sup>(selection)</sup> "
    elseif entryType == "Coordinate" then
    elseif entryType == "Coordinate" then
    formatted = formatted .. "\n\n *"..entryName.."<sup>(coordinate)</sup> "
    formatted = formatted .. " \n* "..entryName.."<sup>(coordinate)</sup> "
    elseif entryType == "NumberRange" then
    elseif entryType == "NumberRange" then
    formatted = formatted .. "\n\n *"..entryName.."<sup>(numberRange)["..default[1].." - "..default[2] .. "]</sup>"
    formatted = formatted .. " \n* "..entryName.."<sup>(numberRange)["..default[1].." - "..default[2] .. "]</sup>"
    end
    end
    end
    end
    Line 243: Line 243:
    if field == "DefaultColor" then
    if field == "DefaultColor" then
    local rgb = (rgbtable[1] * 0x10000) + (rgbtable[2] * 0x100) + rgbtable[3]
    local rgb = (rgbtable[1] * 0x10000) + (rgbtable[2] * 0x100) + rgbtable[3]
    local webcolor = "#" .. string.format("%x", rgb)
    local webcolor = string.format("%x", rgb)

    if string.len(webcolor) < 6 then
    webcolor = webcolor .. "00"
    while string.len(webcolor) < 6 do
    webcolor = "0" .. webcolor
    end
    end

    webcolor = "#" .. webcolor


    if rgbtable[1] > 76.5 or rgbtable[2] > 76.5 or rgbtable[3] > 76.5 then
    if rgbtable[1] > 76.5 or rgbtable[2] > 76.5 or rgbtable[3] > 76.5 then
    ccat = ccat .. '<span style="color:' .. webcolor .. '">     ⏺</span>'
    ccat = ccat .. '<big><span style="color:' .. webcolor .. '">   ⬢</span></big>'
    else
    else
    ccat = ccat .. ' <span style="color:' .. webcolor .. '; text-shadow: 0px 0px 2px silver">     ⏺</span>'
    ccat = ccat .. '<big><span style="color:' .. webcolor .. '; text-shadow: 0px 0px 2px DimGray">   ⬢</span></big>'
    end
    end
    end
    end


    return ccat
    return ccat

    elseif field == "Consumes" or field == "Outputs" then
    local t = ""
    if Parts[itemName][field] then
    for i, v in pairs(Parts[itemName][field]) do
    t = t .. v
    if string.find(v, ",") then
    t = t .. "/s"
    end
    t = t .. "\n"
    end
    else
    t = "/"
    end

    return t


    elseif Parts[itemName][field] then
    elseif Parts[itemName][field] then
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Jo857294 • 20 hours ago
  • 116.111.185.163 • 13 days ago
  • 116.111.185.163 • 13 days ago
  • 116.111.185.163 • 13 days ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.