Modul:Infobox Plant: Unterschied zwischen den Versionen
[unmarkierte Version] | [unmarkierte Version] |
Keine Bearbeitungszusammenfassung |
Missed a few conversion %s |
||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 92: | Zeile 92: | ||
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 .. '|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 .. '|link=https://wiki.play.eco/index.php?title=Special:Upload&wpDestFile=' .. speciesimagename .. '_Tree.png|[[Category:Pages_with_missing_tree]]' | ||
end | end | ||
Zeile 105: | Zeile 105: | ||
-- 'General' section header | -- 'General' section header | ||
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Allgemeines\'\'\'\n' | ||
--Harvestable plant | --Harvestable plant | ||
Zeile 111: | Zeile 111: | ||
-- speciesTable.seedDrop ~= nil or | -- speciesTable.seedDrop ~= nil or | ||
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then | speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Erntbar:\n| style=\"text-align: right; padding: 3px;\" | Ya \n' | ||
end | end | ||
--Underwater plant | --Underwater plant | ||
if speciesTable.isWater ~= nil then | if speciesTable.isWater ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Unterwasseranlage:\n| style=\"text-align: right; padding: 3px;\" | Ya \n' | ||
end | end | ||
--Decorative Plant | --Decorative Plant | ||
if speciesTable.isDecorative ~= nil then | if speciesTable.isDecorative ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Dekorative Pflanze:\n| style=\"text-align: right; padding: 3px;\" | Ya \n' | ||
end | end | ||
--Plant Height | --Plant Height | ||
if speciesTable.height ~= nil then | if speciesTable.height ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Pflanzenhöhe:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.height .. ' m \n' | ||
end | end | ||
Zeile 133: | Zeile 133: | ||
-- speciesTable.seedDrop ~= nil or | -- speciesTable.seedDrop ~= nil or | ||
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then | speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then | ||
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Landwirtschaft\'\'\'\n' | ||
-- 'Harvesting' sub section header | -- 'Harvesting' sub section header | ||
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Ernte\'\'\'\n' | ||
-- Harvested Tool | -- Harvested Tool | ||
if speciesTable.harvestTool ~= nil then | if speciesTable.harvestTool ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Erntewerkzeug:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.harvestTool .. ' \n' | ||
end | end | ||
Zeile 150: | Zeile 150: | ||
-- Harvested Item | -- Harvested Item | ||
if speciesTable.resourceItem ~= nil then | if speciesTable.resourceItem ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Geernteter Gegenstand:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.resourceItem .. '\n' | ||
end | end | ||
--Plant Calorie Value | --Plant Calorie Value | ||
if speciesTable.calorieValue ~= nil then | if speciesTable.calorieValue ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Pflanzenkalorienwert:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.calorieValue .. ' \n' | ||
end | end | ||
--XP Per Harvest | --XP Per Harvest | ||
if speciesTable.experiencePerHarvest ~= nil then | if speciesTable.experiencePerHarvest ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Basis-XP pro Ernte:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.experiencePerHarvest .. ' \n' | ||
end | end | ||
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Ideale Bedingungen\'\'\'\n' | ||
-- Ideal Growth Rate | -- Ideal Growth Rate | ||
if speciesTable.idealGrowthRate ~= nil then | if speciesTable.idealGrowthRate ~= nil then | ||
speciesTable.idealGrowthRate = speciesTable.idealGrowthRate*100 | speciesTable.idealGrowthRate = speciesTable.idealGrowthRate*100 | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Ideale Wachstumsrate:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.idealGrowthRate .. ' % \n' | ||
end | end | ||
Zeile 173: | Zeile 173: | ||
if speciesTable.idealDeathRate ~= nil then | if speciesTable.idealDeathRate ~= nil then | ||
speciesTable.idealDeathRate = speciesTable.idealDeathRate*100 | speciesTable.idealDeathRate = speciesTable.idealDeathRate*100 | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Ideale Sterblichkeitsrate:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.idealDeathRate .. ' % \n' | ||
end | end | ||
Zeile 179: | Zeile 179: | ||
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| | speciesTable.idealTempMax = speciesTable.idealTempMax*40 | ||
infobox = infobox .. '|- valign=\"center\"\n| Idealer Temperaturbereich:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | |||
end | end | ||
-- Ideal Moisture | -- Ideal Moisture | ||
if speciesTable.idealMoistureMin ~= nil then | if speciesTable.idealMoistureMin ~= nil then | ||
infobox = infobox .. '|- valign=\"center\"\n| | speciesTable.idealMoistureMin = speciesTable.idealMoistureMin*40 | ||
speciesTable.idealMoistureMax = speciesTable.idealMoistureMax*40 | |||
infobox = infobox .. '|- valign=\"center\"\n| Idealer Feuchtigkeitsbereich:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n' | |||
end | end | ||
Zeile 190: | Zeile 193: | ||
if speciesTable.maxPollutionDensity ~= nil then | if speciesTable.maxPollutionDensity ~= nil then | ||
speciesTable.maxPollutionDensity = speciesTable.maxPollutionDensity*100 | speciesTable.maxPollutionDensity = speciesTable.maxPollutionDensity*100 | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n|Maximale Bodenverschmutzung:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.maxPollutionDensity .. ' %\n' | ||
end | end | ||
Zeile 196: | Zeile 199: | ||
if speciesTable.pollutionTolerance ~= nil then | if speciesTable.pollutionTolerance ~= nil then | ||
speciesTable.pollutionTolerance = speciesTable.pollutionTolerance*100 | speciesTable.pollutionTolerance = speciesTable.pollutionTolerance*100 | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Verschmutzungstoleranz:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.pollutionTolerance .. ' %\n' | ||
end | end | ||
Zeile 202: | Zeile 205: | ||
if speciesTable.nitrogenHalfSpeed ~= nil or speciesTable.phosphorusHalfSpeed ~= nil or speciesTable.potassiumHalfSpeed ~= nil or speciesTable.soilMoistureHalfSpeed ~= nil then | if speciesTable.nitrogenHalfSpeed ~= nil or speciesTable.phosphorusHalfSpeed ~= nil or speciesTable.potassiumHalfSpeed ~= nil or speciesTable.soilMoistureHalfSpeed ~= nil then | ||
-- 'Minimum Soil Nutrients' Mini section header | -- 'Minimum Soil Nutrients' Mini section header | ||
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Minimale Bodennährstoffe\'\'\'\n' | ||
if speciesTable.nitrogenHalfSpeed ~= nil then | if speciesTable.nitrogenHalfSpeed ~= nil then | ||
infobox = infobox .. '|- style=\"color: red; valign: center;\"\n| | infobox = infobox .. '|- style=\"color: red; valign: center;\"\n| Stickstoff:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.nitrogenHalfSpeed .. '\n' | ||
end | end | ||
if speciesTable.phosphorusHalfSpeed ~= nil then | if speciesTable.phosphorusHalfSpeed ~= nil then | ||
infobox = infobox .. '|- style=\"color: darkorange; valign: center;\"\n| | infobox = infobox .. '|- style=\"color: darkorange; valign: center;\"\n| Phosphor:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.phosphorusHalfSpeed .. '\n' | ||
end | end | ||
if speciesTable.potassiumHalfSpeed ~= nil then | if speciesTable.potassiumHalfSpeed ~= nil then | ||
infobox = infobox .. '|- style=\"color: green; valign: center;\"\n| | infobox = infobox .. '|- style=\"color: green; valign: center;\"\n| Kalium:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.potassiumHalfSpeed .. '\n' | ||
end | end | ||
if speciesTable.soilMoistureHalfSpeed ~= nil then | if speciesTable.soilMoistureHalfSpeed ~= nil then | ||
speciesTable.soilMoistureHalfSpeed = speciesTable.soilMoistureHalfSpeed*100 | speciesTable.soilMoistureHalfSpeed = speciesTable.soilMoistureHalfSpeed*100 | ||
infobox = infobox .. '|- style=\"color: dodgerblue; valign: center;\"\n| | infobox = infobox .. '|- style=\"color: dodgerblue; valign: center;\"\n| Bodenfeuchtigkeit:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.soilMoistureHalfSpeed .. ' ppm \n' | ||
end | end | ||
end | end | ||
Zeile 220: | Zeile 223: | ||
-- 'Effects on Environment' section header | -- 'Effects on Environment' section header | ||
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Auswirkungen auf die Umwelt\'\'\'\n' | ||
--Carbon release | --Carbon release | ||
if speciesTable.carbonRelease ~= nil then | if speciesTable.carbonRelease ~= nil then | ||
local absoluteCarbon = string.sub(speciesTable.carbonRelease , 2) | local absoluteCarbon = string.sub(speciesTable.carbonRelease , 2) | ||
infobox = infobox .. '|- valign=\"center\"\n| | infobox = infobox .. '|- valign=\"center\"\n| Kohlenstoff absorbiert:\n| style=\"text-align: right; padding: 3px;\" | ' .. absoluteCarbon .. ' ppm \n' | ||
end | end | ||
Aktuelle Version vom 6. Oktober 2020, 01:14 Uhr
Dokumentation[Quelltext bearbeiten]
Dieses Modul bietet die Back-End-Funktionalität der Vorlage: Infobox_Plant.
Wenn die Vorlage übergeben wird, wird eine Infobox mit Details aus den folgenden Modulen erstellt:
Translating Module[Quelltext bearbeiten]
This Module is a copy of the EN Module of the same name.
RULES FOR TRANSLATING THE LUA MODULES
IF IN DOUBT ASK IN DISCORD
IF ONLY 99.99% SURE ASK IN DISCORD
'string' --Anything using single quotes is a string HARDCODED in this file, these should be translated where appropriate.
'|- Valign \n' -- EXCEPTION if it looks like HTML styling,
local variable -- don't edit or change variable names
speciesTable.idealGrowthRate -- don't edit names of getters or methods
Kredit[Quelltext bearbeiten]
Die von Pradoxzon erstellte Original-Infobox (jetzt als Infobox_Item bekannt) wurde dann von Nesphit und TreeNuts0 bearbeitet. Fyre (FishAus) und Scotty (ZeelNightwolf) haben das Infobox_Item weiter bearbeitet. Sie wurden dann dupliziert und als Basis für Infobox_Skill, Infobox_Plant und Infobox_Animal verwendet.
local p = {}
-- Grabs args from the parent frame
-- Trims and parses the args into a table, then returns the table
function norm()
local origArgs = mw.getCurrentFrame():getParent().args
local args = {}
for k, v in pairs( origArgs ) do
v = mw.text.trim( tostring( v ) )
if v ~= '' then
args[k] = v
end
end
return args
end
-- Main entry point for the Module
function p.main()
-- get args from the Template
local args = norm()
-- create values outside of if statements to ensure they are available to whole function
local species = ''
local check = ''
-- assign variables for plant or tree whatever is passed. Plant has priority so if both are passed only plant will continue.
if args.plant ~= nil then
species = args.plant
check = 'plant'
elseif args.tree ~= nil then
species = args.tree
check = 'tree'
end
-- check to see if species was actually passed in
if species == '' then
return 'plant or tree must be specified.'
end
local speciesData = {}
local speciesTable = {}
-- checks if plant and assigns correct modules based on check
if check == 'plant' then
speciesData = require( "Module:PlantData" )
speciesTable = speciesData.plants[species]
else
speciesData = require( "Module:TreeData" )
speciesTable = speciesData.trees[species]
end
-- checks if species can be found in plant data or tree data based on what was requested
if speciesTable == {} then
if check == 'plant' then
return species .. ' could not be found in Module:PlantData.'
else
return species .. ' could not be found in Module:TreeData.'
end
end
-- From now on using speciesTable."KeyValue" will return the value from that key. for most things a check for species type is not necessary
-- Build an Infobox_Plant
-- string used to build the infobox
local infobox = '{| class=\"infobox\"\n'
-- name of the plant/tree
infobox = infobox .. '|- style=\"color: white; background-color: #1165AF; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. species .. '</big>\'\'\'\n'
-- the sub heading plant or tree
infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: '
if check == 'plant' then
infobox = infobox .. 'seagreen;\"\n| colspan=\"2\" | \'\'\'Pflanze\'\'\'[[Category:Pflanze]]\n'
else
infobox = infobox .. 'olivedrab;\"\n| colspan=\"2\" | \'\'\'Bäume\'\'\'[[Category:Bäume]]\n'
end
-- Plants Image
local checkImage = {'_Plant.png','_Plant.jpg','_Plant.jpeg','_Tree.png','_Tree.jpg','_Tree.jpeg'}
local image = ''
local speciesEN = speciesTable.untranslated
local speciesimagename = string.gsub(speciesEN, ' ', '')
for i,v in ipairs(checkImage) do
image = speciesimagename .. checkImage[i]
if mw.title.makeTitle('File', image).file.exists then
break
end
if table.getn(checkImage) == i then
image = 'NoImage.png'
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]]'
end
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]]'
end
end
end
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|border|250x250px]]\n'
-- 'General' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Allgemeines\'\'\'\n'
--Harvestable plant
if
-- speciesTable.seedDrop ~= nil or
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Erntbar:\n| style=\"text-align: right; padding: 3px;\" | Ya \n'
end
--Underwater plant
if speciesTable.isWater ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Unterwasseranlage:\n| style=\"text-align: right; padding: 3px;\" | Ya \n'
end
--Decorative Plant
if speciesTable.isDecorative ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Dekorative Pflanze:\n| style=\"text-align: right; padding: 3px;\" | Ya \n'
end
--Plant Height
if speciesTable.height ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Pflanzenhöhe:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.height .. ' m \n'
end
-- 'Agriculture' section header
if
-- speciesTable.seedDrop ~= nil or
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Landwirtschaft\'\'\'\n'
-- 'Harvesting' sub section header
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Ernte\'\'\'\n'
-- Harvested Tool
if speciesTable.harvestTool ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Erntewerkzeug:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.harvestTool .. ' \n'
end
-- Harvested Seed
-- if speciesTable.seedDrop ~= nil and speciesTable.seedMax ~= '0.0' then
-- infobox = infobox .. '|- valign=\"center\"\n| Harvested Seed:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.seedDrop .. '\n'
-- end
-- Harvested Item
if speciesTable.resourceItem ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Geernteter Gegenstand:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.resourceItem .. '\n'
end
--Plant Calorie Value
if speciesTable.calorieValue ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Pflanzenkalorienwert:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.calorieValue .. ' \n'
end
--XP Per Harvest
if speciesTable.experiencePerHarvest ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Basis-XP pro Ernte:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.experiencePerHarvest .. ' \n'
end
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Ideale Bedingungen\'\'\'\n'
-- Ideal Growth Rate
if speciesTable.idealGrowthRate ~= nil then
speciesTable.idealGrowthRate = speciesTable.idealGrowthRate*100
infobox = infobox .. '|- valign=\"center\"\n| Ideale Wachstumsrate:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.idealGrowthRate .. ' % \n'
end
-- Ideal Death Rate
if speciesTable.idealDeathRate ~= nil then
speciesTable.idealDeathRate = speciesTable.idealDeathRate*100
infobox = infobox .. '|- valign=\"center\"\n| Ideale Sterblichkeitsrate:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.idealDeathRate .. ' % \n'
end
-- Ideal Temp
if speciesTable.idealTempMin ~= nil then
speciesTable.idealTempMin = speciesTable.idealTempMin*40
speciesTable.idealTempMax = speciesTable.idealTempMax*40
infobox = infobox .. '|- valign=\"center\"\n| Idealer Temperaturbereich:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n'
end
-- Ideal Moisture
if speciesTable.idealMoistureMin ~= nil then
speciesTable.idealMoistureMin = speciesTable.idealMoistureMin*40
speciesTable.idealMoistureMax = speciesTable.idealMoistureMax*40
infobox = infobox .. '|- valign=\"center\"\n| Idealer Feuchtigkeitsbereich:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealMoistureMin .. ' - ' .. speciesTable.idealMoistureMax .. '\n'
end
-- Max Pollution Density
if speciesTable.maxPollutionDensity ~= nil then
speciesTable.maxPollutionDensity = speciesTable.maxPollutionDensity*100
infobox = infobox .. '|- valign=\"center\"\n|Maximale Bodenverschmutzung:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.maxPollutionDensity .. ' %\n'
end
-- Pollution Tolerance
if speciesTable.pollutionTolerance ~= nil then
speciesTable.pollutionTolerance = speciesTable.pollutionTolerance*100
infobox = infobox .. '|- valign=\"center\"\n| Verschmutzungstoleranz:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.pollutionTolerance .. ' %\n'
end
-- Ground nutrients
if speciesTable.nitrogenHalfSpeed ~= nil or speciesTable.phosphorusHalfSpeed ~= nil or speciesTable.potassiumHalfSpeed ~= nil or speciesTable.soilMoistureHalfSpeed ~= nil then
-- 'Minimum Soil Nutrients' Mini section header
infobox = infobox .. '|- style=\"text-align: center;\"\n| colspan=\"2\" | \'\'\'Minimale Bodennährstoffe\'\'\'\n'
if speciesTable.nitrogenHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: red; valign: center;\"\n| Stickstoff:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.nitrogenHalfSpeed .. '\n'
end
if speciesTable.phosphorusHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: darkorange; valign: center;\"\n| Phosphor:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.phosphorusHalfSpeed .. '\n'
end
if speciesTable.potassiumHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: green; valign: center;\"\n| Kalium:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.potassiumHalfSpeed .. '\n'
end
if speciesTable.soilMoistureHalfSpeed ~= nil then
speciesTable.soilMoistureHalfSpeed = speciesTable.soilMoistureHalfSpeed*100
infobox = infobox .. '|- style=\"color: dodgerblue; valign: center;\"\n| Bodenfeuchtigkeit:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.soilMoistureHalfSpeed .. ' ppm \n'
end
end
end
-- 'Effects on Environment' section header
infobox = infobox .. '|- style=\"background-color: #4688C0; text-align: center;\"\n| colspan=\"2\" | \'\'\'Auswirkungen auf die Umwelt\'\'\'\n'
--Carbon release
if speciesTable.carbonRelease ~= nil then
local absoluteCarbon = string.sub(speciesTable.carbonRelease , 2)
infobox = infobox .. '|- valign=\"center\"\n| Kohlenstoff absorbiert:\n| style=\"text-align: right; padding: 3px;\" | ' .. absoluteCarbon .. ' ppm \n'
end
infobox = infobox .. '|}'
return infobox
end
return p