Bearbeiten von „Modul:Infobox Plant“
Aus Eco - Deutsches Wiki
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 74: | Zeile 74: | ||
infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: ' | infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: ' | ||
if check == 'plant' then | if check == 'plant' then | ||
infobox = infobox .. 'seagreen;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. 'seagreen;\"\n| colspan=\"2\" | \'\'\'Plant\'\'\'[[Category:Plants]]\n' | ||
else | else | ||
infobox = infobox .. 'olivedrab;\"\n| colspan=\"2\" | \'\'\' | infobox = infobox .. 'olivedrab;\"\n| colspan=\"2\" | \'\'\'Tree\'\'\'[[Category:Trees]]\n' | ||
end | end | ||
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\" | \'\'\'General\'\'\'\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| Harvestable:\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| Underwater Plant:\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| Decorative Plant:\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| Plant Height:\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\" | \'\'\'Agriculture\'\'\'\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\" | \'\'\'Harvesting\'\'\'\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| Harvest Tool:\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| Harvested Item:\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| Plant Calorie Value:\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| Base XP Per Harvest:\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\" | \'\'\'Ideal Conditions\'\'\'\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| Ideal Growth Rate:\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| Ideal Death Rate:\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| Ideal Temperature Range:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.idealTempMin .. ' - ' .. speciesTable.idealTempMax .. ' Celsius \n' | |||
infobox = infobox .. '|- valign=\"center\"\n| | |||
end | end | ||
-- 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| | |||
end | end | ||
Zeile 193: | Zeile 190: | ||
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|Max Ground Pollution:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.maxPollutionDensity .. ' %\n' | ||
end | end | ||
Zeile 199: | Zeile 196: | ||
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| Pollution Tolerance:\n| style=\"text-align: right; padding: 3px;\" |' .. speciesTable.pollutionTolerance .. ' %\n' | ||
end | end | ||
Zeile 205: | Zeile 202: | ||
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\" | \'\'\'Minimum Soil Nutrients\'\'\'\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| Nitrogen:\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| Phosphorous:\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| Potassium:\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| Soil Moisture:\n| style=\"text-align: right; padding: 3px;\" | ' .. speciesTable.soilMoistureHalfSpeed .. ' ppm \n' | ||
end | end | ||
end | end | ||
Zeile 223: | Zeile 220: | ||
-- '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\" | \'\'\'Effects on Environment\'\'\'\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| Carbon Absorbed:\n| style=\"text-align: right; padding: 3px;\" | ' .. absoluteCarbon .. ' ppm \n' | ||
end | end | ||