Editing Module:Infobox Plant
From Eco - English Wiki
Your changes will be displayed to readers once an authorized user accepts them. (help)
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 82: | Line 82: | ||
local checkImage = {'_Plant.png','_Plant.jpg','_Plant.jpeg','_Tree.png','_Tree.jpg','_Tree.jpeg'} | local checkImage = {'_Plant.png','_Plant.jpg','_Plant.jpeg','_Tree.png','_Tree.jpg','_Tree.jpeg'} | ||
local image = '' | local image = '' | ||
local speciesimagename = string.gsub(species, ' ', '') | |||
local speciesimagename = string.gsub( | |||
for i,v in ipairs(checkImage) do | for i,v in ipairs(checkImage) do | ||
Line 92: | Line 91: | ||
if table.getn(checkImage) == i then | if table.getn(checkImage) == i then | ||
image = 'NoImage.png' | image = 'NoImage.png' | ||
if check == ' | if check == 'Plant' then | ||
image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. speciesimagename .. '_Plant.png|[[Category:Pages_with_missing_plant]]' | image = image .. '|64px|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. speciesimagename .. '_Plant.png|[[Category:Pages_with_missing_plant]]' | ||
end | end | ||
if check == ' | if check == 'Tree' then | ||
image = image .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. speciesimagename .. '_Tree.png|[[Category:Pages_with_missing_tree]]' | image = image .. '|64px|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. speciesimagename .. '_Tree.png|[[Category:Pages_with_missing_tree]]' | ||
end | end | ||
end | end | ||
end | end | ||
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|border|240px]]\n' | |||
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|border| | |||
-- 'General' section header | -- 'General' section header | ||
Line 178: | Line 176: | ||
-- Ideal Temp | -- Ideal Temp | ||
if speciesTable.idealTempMin ~= nil then | if speciesTable.idealTempMin ~= nil then | ||
speciesTable.idealTempMin = speciesTable.idealTempMin*40 | speciesTable.idealTempMin = speciesTable.idealTempMin*40 | ||
infobox = infobox .. '|- valign=\"center\"\n| Ideal Temperature Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | infobox = infobox .. '|- valign=\"center\"\n| Ideal Temperature Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | ||
end | end | ||
Line 185: | Line 182: | ||
-- Ideal Moisture | -- Ideal Moisture | ||
if speciesTable.idealMoistureMin ~= nil then | if speciesTable.idealMoistureMin ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| Ideal Moisture Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n' | infobox = infobox .. '|- valign=\"center\"\n| Ideal Moisture Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n' | ||
end | end | ||
Line 213: | Line 208: | ||
end | end | ||
if speciesTable.potassiumHalfSpeed ~= nil then | if speciesTable.potassiumHalfSpeed ~= nil then | ||
infobox = infobox .. '|- style=\"color: | infobox = infobox .. '|- style=\"color: limegreen; valign: center;\"\n| Potassium:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.potassiumHalfSpeed .. '\n' | ||
end | end | ||
if speciesTable.soilMoistureHalfSpeed ~= nil then | if speciesTable.soilMoistureHalfSpeed ~= nil then |