×
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
    raw recipe fixed
    working on config support
    Line 139: Line 139:
    elseif field == "Durability" then
    elseif field == "Durability" then
    return Parts[itemName]["Durability"] or 3
    return Parts[itemName]["Durability"] or 3
    elseif field == "Configurables" then
    local configData = Parts[itemName]["ConfigData"]

    local formatted = ""

    for _, entry in pairs(configData) do
    local entryName = entry[1]
    local entryType = entry[2]
    local default = entry[3]
    local range = entry[4]
    local description = entry[5]



    if entryType == "number" then
    formatted = formatted .. "\n * "..entryName.." <sup>(number) [" .. range[1] .. "-" .. range[2] .. "] [default '"..default.."']</sup>"
    elseif entryType == "boolean" then
    formatted = formatted .. "\n * "..entryName.." <sup>(boolean) [default '"..tostring(default).."']</sup>"
    elseif entryType == "string" then
    formatted = formatted .. "\n * "..entryName.." <sup>(string)</sup>"
    elseif entryType == "selectable" then
    formatted = formatted .. "\n * "..entryName.." <sup>(selectable)</sup>"
    end
    end

    return string.sub(formatted, 2)
    elseif Parts[itemName] and Parts[itemName][field] then
    elseif Parts[itemName] and Parts[itemName][field] then
    return tostring(Parts[itemName][field])
    return tostring(Parts[itemName][field])
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • OKEMOWENDI • 11 hours ago
  • Jo857294 • 9 days ago
  • 116.111.185.163 • 22 days ago
  • 116.111.185.163 • 22 days ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.