Content deleted Content added
Hail12Pink (talk | contribs) raw recipe fixed |
Hail12Pink (talk | contribs) 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]) |