Editing Module:Infobox Plant

From Eco - English Wiki

Your changes will be displayed to readers once an authorized user accepts them. (help)

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 speciesEN = speciesTable.untranslated
local speciesimagename = string.gsub(species, ' ', '')
local speciesimagename = string.gsub(speciesEN, ' ', '')
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 == 'plant' then  
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 == 'tree' then  
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|250x250px]]\n'
   
   
-- 'General' section header
-- 'General' section header
Line 158: Line 156:
end
end
--XP Per Harvest
--Experience Per Harvest
if speciesTable.experiencePerHarvest ~= nil then
if speciesTable.experiencePerHarvest ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Base XP Per Harvest:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.experiencePerHarvest .. ' \n'
infobox = infobox .. '|- valign=\"center\"\n| Base Experience Per Harvest:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.experiencePerHarvest .. ' \n'
end
end
Line 178: Line 176:
-- Ideal Temp
-- Ideal Temp
if speciesTable.idealTempMin ~= nil then
if speciesTable.idealTempMin ~= nil then
speciesTable.idealTempMin = speciesTable.idealTempMin*40-10
speciesTable.idealTempMin = speciesTable.idealTempMin*40
            speciesTable.idealTempMax = speciesTable.idealTempMax*40-10
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
speciesTable.idealMoistureMin = speciesTable.idealMoistureMin*100
speciesTable.idealMoistureMax = speciesTable.idealMoistureMax*100
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 192: Line 187:
-- Max Pollution Density
-- Max Pollution Density
if speciesTable.maxPollutionDensity ~= nil then
if speciesTable.maxPollutionDensity ~= nil then
speciesTable.maxPollutionDensity = speciesTable.maxPollutionDensity*100
peciesTable.maxPollutionDensity = speciesTable.maxPollutionDensity*100
infobox = infobox .. '|- valign=\"center\"\n|Max Ground Pollution:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.maxPollutionDensity .. ' %\n'
infobox = infobox .. '|- valign=\"center\"\n|Max Ground Pollution:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.maxPollutionDensity .. ' %\n'
end
end
Line 213: Line 208:
end
end
if speciesTable.potassiumHalfSpeed ~= nil then
if speciesTable.potassiumHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: green; valign: center;\"\n| Potassium:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.potassiumHalfSpeed .. '\n'
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
Please note that all contributions to Eco - English Wiki are considered to be released under the CC BY-NC-SA 4.0 (see Eco:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)

Template used on this page: