Module:PlantDetails: Difference between revisions

From Eco - English Wiki
[unchecked revision][checked revision]
(Remove old data and add new data)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
local p = {}
local p = {}


-- Grabs args from the parent frame
local Utils = require('Module:Utils')
-- Trims and parses the args into a table, then returns the table
 
function norm()
function p.listPlants(frame)
    local origArgs = mw.getCurrentFrame():getParent().args
     local args = Utils.normaliseArgs(frame)
     local args = {}
     return renderPlantList(args.type)
   
    for k, v in pairs( origArgs ) do
        v = mw.text.trim( tostring( v ) )
        if v ~= '' then
            args[k] = v
        end
    end
   
     return args
end
end


 
function renderPlantList(plantType)
-- Main entry point for the Module
     local plantData = require( "Module:PlantData" )
function p.main()
     local plantList
    -- get args from the Template
     if plantType == 'Tree' then
     local args = norm()
         plantList = plantData.tree_names
      
-- 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
     else
         speciesData = require( "Module:TreeData" )
         plantList = plantData.plant_names
        speciesTable = speciesData.trees[species]
     end
     end
 
    local plants = ''
     -- checks if species can be found in plant data or tree data based on what was requested
     for _, plant in ipairs(plantList) do
    if speciesTable == {} then
         plants = plants.."* [["..plant.."]]\n"
         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
     end
    return plants
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
-- p.listPlants = renderPlantList


-- Build an Infobox_Plant
-- Main entry point for the Module
-- string used to build the infobox
function p.main(frame)
     local infobox = '{| class=\"infobox\"\n'
    -- get args from the Template
     local args = Utils.normaliseArgs(frame)
      
      
    -- name of the plant/tree
if args.plant == nil or args.plant == '' then
    infobox = infobox .. '|- style=\"color: white; background-color: dodgerblue; text-align: center;\"\n| colspan=\"2\" | \'\'\'<big>' .. species .. '</big>\'\'\'\n'
        return '\'plant\' must be specified.'
    end
     -- the sub heading plant or tree
     infobox = infobox .. '|- style=\"text-align: center; color: white; background-color: '
     -- assign variables for plant
if check == 'plant' then
     local plant = args.plant
infobox = infobox .. 'limegreen;\"\n| colspan=\"2\" | \'\'\'Plant\'\'\'[[Category:Plants]]\n'
    else
infobox = infobox .. 'olive;\"\n| colspan=\"2\" | \'\'\'Tree\'\'\'[[Category:Trees]]\n'
    end
    
    
-- Plants Image
    -- load list of recipes
local checkImage = {'_Plant.png','_Plant.jpg','_Plant.jpeg','_Tree.png','_Tree.jpg','_Tree.jpeg'}
    local plantData = require( "Module:PlantData" )
local image = ''  
    local plantTable = plantData.plants[plant]
local speciesimagename = string.gsub(species, ' ', '')
    if plantTable == nil then
return plant .. ' could not be found in Module:PlantData.'
end   
for i,v in ipairs(checkImage) do
local wikibox = '=== Plant Properties===\n'
image = speciesimagename .. checkImage[i]
if mw.title.makeTitle('File', image).file.exists then
if plantTable.isDecorative == 'Decorative' then
break
wikibox = wikibox .. 'This plant is decorative only. \n'
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
end
   
if plantTable.isWater == 'Underwater' then
infobox = infobox .. '|-\n| colspan=\"2\" style=\"padding: 10px;\" | [[File:' .. image .. '|center|border|240px]]\n'
wikibox = wikibox .. 'This plant grows underwater. \n'
   
end
-- 'General' section header
if plantTable.scytheKills =='Yes' then
infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'General\'\'\'\n'
wikibox = wikibox .. '[[Scythe|Scything]] this plant will kill it. \n'
end
wikibox = wikibox .. '\n===Environmental Conditions===\n'
wikibox = wikibox .. '{| class=\"wikitable\"\n'
-- Temperature row
wikibox = wikibox .. '| rowspan="4" | Temperature Ranges \n'
wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealTempMin .. '\n'
wikibox = wikibox .. '| rowspan="2" | Ideal Range: The plant\'s preferred temperature range. Temperatures in this range won\'t inhibit population growth or reduce yield.\n'
wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealTempMax .. '\n'
wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeTempMin .. '\n'
wikibox = wikibox .. '| rowspan="2" | Extreme Range : The temperature range that can support this plant (albeit at reduced efficiency if the temperature is not also within the ideal range). Temperatures outside this range prohibit reproduction entirely and prevent any yield at all. \n'
wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeTempMax .. '\n'
-- Moisture row
wikibox = wikibox .. '|- \n| rowspan="4" | Moisture Ranges \n'
wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealMoistureMin .. '\n'
wikibox = wikibox .. '| rowspan="2" |  Ideal Range: The plant\'s preferred moisture range.  Moisture in this range won\'t inhibit population growth or reduce yield.\n'
wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealMoistureMax .. '\n'
wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeMoistureMin .. '\n'
wikibox = wikibox .. '| rowspan="2" | Extreme Range : The moisture range that can support this plant (albeit at reduced efficiency if the moisture is not also within the ideal range).  Moisture outside this range prohibits reproduction entirely and prevent any yield at all. \n'
wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeMoistureMax .. '\n'
-- Salt row
wikibox = wikibox .. '|- \n| rowspan="4" | Salt Ranges \n'
wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealSaltMin .. '\n'
wikibox = wikibox .. '| rowspan="2" | Ideal Range: The plant\'s preferred sale range.  Salt in this range won\'t inhibit population growth or reduce yield.\n'
wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealSaltMax .. '\n'
wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeSaltMin .. '\n'
wikibox = wikibox .. '| rowspan="2" | Extreme Range : The salt range that can support this plant (albeit at reduced efficiency if the salt is not also within the ideal range).  Salt outside this range prohibits reproduction entirely and prevent any yield at all. \n'
wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeSaltMax .. '\n'
--Harvestable plant
-- Soil Restrictions
if  
wikibox = wikibox .. '|- \n| rowspan="4" | Soil Conditions \n'
-- speciesTable.seedDrop ~= nil or
if plantTable.nitrogenHalfSpeed == nil then
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then
wikibox = wikibox .. '| Nitrogen minimum : None \n'
infobox = infobox .. '|- valign=\"center\"\n| Harvestable:\n| style=\"text-align: right;\" | Yes \n'
else
wikibox = wikibox .. '| Nitrogen minimum : ' .. plantTable.nitrogenHalfSpeed .. '\n'
end
wikibox = wikibox .. '| rowspan="4" | Any nutirent dropping below its minimum will reduce the growth of the plant to half speed\n'
if plantTable.phosphorusHalfSpeed == nil then
wikibox = wikibox .. '|- \n| Phosphorus minimum : None \n'
else
wikibox = wikibox .. '|- \n| Phosphorus minimum : ' .. plantTable.phosphorusHalfSpeed .. '\n'
end
if plantTable.potassiumHalfSpeed == nil then
wikibox = wikibox .. '|- \n| Potassium minimum : None \n'
else
wikibox = wikibox .. '|- \n| Potassium minimum  : ' .. plantTable.potassiumHalfSpeed .. '\n'
end
if plantTable.soilMoistureHalfSpeed == nil then
wikibox = wikibox .. '|- \n| Soil Moisture minimum : None \n'
else
wikibox = wikibox .. '|- \n| Soil Moisture minimum : ' .. plantTable.soilMoistureHalfSpeed .. '\n'
end
end
wikibox = wikibox .. '|}\n\n'
--Underwater plant
wikibox = wikibox .. '===Plant Harvest===\n'
if speciesTable.isWater ~= nil then
wikibox = wikibox .. '{| class=\"wikitable\"\n'
infobox = infobox .. '|- valign=\"center\"\n| Underwater Plant:\n| style=\"text-align: right;\" | Yes \n'
end
--Decorative Plant
-- Growth Details
if speciesTable.isDecorative ~= nil then
wikibox = wikibox .. '|- \n| rowspan="3" | Growth Stages \n'
infobox = infobox .. '|- valign=\"center\"\n| Decorative Plant:\n| style=\"text-align: right;\" | Yes \n'
wikibox = wikibox .. '| Mature in ' .. plantTable.maturity .. ' days\n'
wikibox = wikibox .. '| How many days it takes for this plant to mature \n'
wikibox = wikibox .. '|- \n| Pickable at ' .. plantTable.pickableAtPercent .. '% growth\n'
wikibox = wikibox .. '| The percent it is possible to pick this plant \n'
if plantTable.killOnHarvest == 'Yes' then
wikibox = wikibox .. '|- \n| Harvesting Kills \n'
wikibox = wikibox .. '| This plant must be replanted from seeds after harvesting \n'
else
wikibox = wikibox .. '|- \n| Returns to ' .. plantTable.postHarvestGrowth .. '% growth\n'
wikibox = wikibox .. '| This plant will return to an immature state on harvesting \n'
end
end
--Plant Height
-- Resource Yields
if speciesTable.height ~= nil then
wikibox = wikibox .. '|- \n| rowspan="3" | Resource Yield \n'
infobox = infobox .. '|- valign=\"center\"\n| Harvest Tool Required:\n| style=\"text-align: right;\" | ' .. height .. ' \n'
wikibox = wikibox .. '| Minimum yield : ' .. plantTable.resourceMin .. '\n'
end
wikibox = wikibox .. '| The minimum yield from harvesting this plant at maturity \n'
wikibox = wikibox .. '|- \n| Maximum Yield : ' .. plantTable.resourceMax .. '\n'
wikibox = wikibox .. '| The maximum yield from harvesting this plant at maturity \n'
wikibox = wikibox .. '|- \n| Yield Bonus : ' .. plantTable.resourceBonus .. '% growth\n'
wikibox = wikibox .. '| The growth at which you get a yield bonus from the minimum \n'
wikibox = wikibox .. '|}\n\n'
    -- 'Agriculture' section header
wikibox = wikibox .. '===Environmental Effects===\n'
if
wikibox = wikibox .. '{| class=\"wikitable\"\n'
-- speciesTable.seedDrop ~= nil or
speciesTable.resourceItem ~= nil or speciesTable.requireHarvestable ~= nil then
infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'Agriculture\'\'\'\n'
-- Harvested Tool
if speciesTable.harvestTool ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Harvest Tool Required:\n| style=\"text-align: right;\" | ' .. 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;\" | ' .. speciesTable.seedDrop .. '\n'
-- end
-- Harvested Item
if speciesTable.resourceItem ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Harvested Item:\n| style=\"text-align: right;\" | ' .. speciesTable.resourceItem .. '\n'
end
--Plant Calorie Value
if speciesTable.calorieValue ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Plant Calorie Value:\n| style=\"text-align: right;\" |' .. calorieValue .. ' \n'
end
--Experience Per Harvest
-- Soil Effects
if speciesTable.experiencePerHarvest ~= nil then
wikibox = wikibox .. '| rowspan="4" | Nutrients Depleted \n'
infobox = infobox .. '|- valign=\"center\"\n| Base Experience Per Harvest:\n| style=\"text-align: right;\" |' .. experiencePerHarvest .. ' \n'
if plantTable.nitrogenContent == nil then
end
wikibox = wikibox .. '| Nitrogen absorbed : None \n'
 
else
-- Ideal Growth Rate
wikibox = wikibox .. '| Nitrogen absorbed : ' .. plantTable.nitrogenContent .. '\n'
if speciesTable.idealGrowthRate ~= nil then
end
infobox = infobox .. '|- valign=\"center\"\n| Ideal Growth Rate:\n| style=\"text-align: right;\" |' .. idealGrowthRate .. ' \n'
wikibox = wikibox .. '| rowspan="4" | The amount of nutrients an adult plant absorbs from the soil\n'
end
if plantTable.phosphorusContent == nil then
 
wikibox = wikibox .. '|- \n| Phosphorus absorbed : None \n'
-- Ideal Death Rate
else
if speciesTable.idealDeathRate ~= nil then
wikibox = wikibox .. '|- \n| Phosphorus absorbed : ' .. plantTable.phosphorusContent .. '\n'
infobox = infobox .. '|- valign=\"center\"\n| Ideal Death Rate:\n| style=\"text-align: right;\" |' .. idealDeathRate .. ' \n'
end
end
if plantTable.potassiumContent == nil then
 
wikibox = wikibox .. '|- \n| Potassium absorbed : None \n'
-- Ideal Temp
else
if speciesTable.idealTempMin ~= nil then
wikibox = wikibox .. '|- \n| Potassium absorbed  : ' .. plantTable.potassiumContent .. '\n'
infobox = infobox .. '|- valign=\"center\"\n| Ideal Temperature Range:\n| style=\"text-align: right;\" | ' .. speciesTable.idealTempMin .. ' -  ' .. speciesTable.idealTempMax .. '\n'
end
end
if plantTable.soilMoistureContent == nil then
wikibox = wikibox .. '|- \n| Soil Moisture absorbed : None \n'
-- Ideal Moisture
else
if speciesTable.idealMoistureMin ~= nil then
wikibox = wikibox .. '|- \n| Soil Moisture absorbed : ' .. plantTable.soilMoistureContent .. '\n'
infobox = infobox .. '|- valign=\"center\"\n| Ideal Moisture Range:\n| style=\"text-align: right;\" | ' .. speciesTable.idealMoistureMin .. ' -  ' .. speciesTable.idealMoistureMax .. '\n'
end
-- Ground nutrients
if speciesTable.nitrogenHalfSpeed ~= nil or speciesTable.phosphorusHalfSpeed ~= nil or speciesTable.potassiumHalfSpeed ~= nil or speciesTable.soilMoistureHalfSpeed ~= nil then
infobox = infobox .. '|-\n| Minimum Soil Nutrients:\n| style=\"text-align: right;\" | \n'
if speciesTable.nitrogenHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: red; valign: center;\"\n| Nitrogen:\n| style=\"text-align: right;\" | ' .. speciesTable.nitrogenHalfSpeed .. '\n'
end
if speciesTable.phosphorusHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: darkorange; valign: center;\"\n| Phosphorous:\n| style=\"text-align: right;\" | ' .. speciesTable.phosphorusHalfSpeed .. '\n'
end
if speciesTable.potassiumHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: gold; valign: center;\"\n| Potassium:\n| style=\"text-align: right;\" | ' .. speciesTable.potassiumHalfSpeed .. '\n'
end
if speciesTable.soilMoistureHalfSpeed ~= nil then
infobox = infobox .. '|- style=\"color: teal; valign: center;\"\n| Soil Moisture:\n| style=\"text-align: right;\" | ' .. speciesTable.soilMoistureHalfSpeed .. '\n'
end
end
end
end
-- 'Other' section header
-- Overcrowding Effects
infobox = infobox .. '|- style=\"background-color: #4B9130; text-align: center;\"\n| colspan=\"2\" | \'\'\'Polution\'\'\'\n'
wikibox = wikibox .. '|- \n| rowspan="4" | Space Required \n'
if plantTable.consumedFertileGround == nil then
wikibox = wikibox .. '| Fertile ground occupied : None \n'
else
wikibox = wikibox .. '| Fertile ground occupied : ' .. plantTable.consumedFertileGround .. '\n'
end
wikibox = wikibox .. '| rowspan="4" | The amount of each space occupied by each plant\n'
if plantTable.consumedUnderwaterFertileGround == nil then
wikibox = wikibox .. '|- \n| Underwater fertile ground occupied : None \n'
else
wikibox = wikibox .. '|- \n| Underwater fertile ground occupied : ' .. plantTable.consumedUnderwaterFertileGround .. '\n'
end
if plantTable.consumedShrubSpace == nil then
wikibox = wikibox .. '|- \n| Shrub space occupied : None \n'
else
wikibox = wikibox .. '|- \n| Shrub space occupied : ' .. plantTable.consumedShrubSpace .. '\n'
end
if plantTable.consumedCanopySpace == nil then
wikibox = wikibox .. '|- \n| Canopy space occupied : None \n'
else
wikibox = wikibox .. '|- \n| Canopy space occupied : ' .. plantTable.consumedCanopySpace .. '\n'
end
wikibox = wikibox .. '|}\n\n'
--Carbon release
return wikibox
    if speciesTable.carbonRelease ~= nil then
        local absoluteCarbon = string.sub(speciesTable.carbonRelease , 2)
        infobox = infobox .. '|- valign=\"center\"\n| Carbon Absorbed:\n| style=\"text-align: right;\" | ' .. absoluteCarbon .. ' ppm \n'
    end
-- Max Pollution Density
if speciesTable.maxPollutionDensity ~= nil then
infobox = infobox .. '|- valign=\"center\"\n|Max Pollution Density:\n| style=\"text-align: right;\" |' .. maxPollutionDensity .. ' \n'
end
 
-- Pollution Tolerance
if speciesTable.pollutionTolerance ~= nil then
infobox = infobox .. '|- valign=\"center\"\n| Pollution Tolerance:\n| style=\"text-align: right;\" |' .. pollutionTolerance .. ' \n'
end
 
    infobox = infobox .. '|}'
    return infobox
end
end


return p
return p

Latest revision as of 22:05, 1 January 2024

Documentation[edit source]

This module provides the back end functionality of the Template:PlantDetails.

If the template is passed, this module creates a table using details from the following Modules:


local p = {}

local Utils = require('Module:Utils')

function p.listPlants(frame)
    local args = Utils.normaliseArgs(frame)
    return renderPlantList(args.type)
end

function renderPlantList(plantType)
    local plantData = require( "Module:PlantData" )
    local plantList
    if plantType == 'Tree' then
        plantList = plantData.tree_names
    else
        plantList = plantData.plant_names
    end
    local plants = ''
    for _, plant in ipairs(plantList) do
        plants = plants.."* [["..plant.."]]\n"
    end
    return plants
end

-- p.listPlants = renderPlantList

-- Main entry point for the Module
function p.main(frame)
    -- get args from the Template
    local args = Utils.normaliseArgs(frame)
    
	if args.plant == nil or args.plant == '' then
        return '\'plant\' must be specified.'
    end
	
    -- assign variables for plant
    local plant = args.plant
   
    -- load list of recipes
    local plantData = require( "Module:PlantData" )
    local plantTable = plantData.plants[plant]
    if plantTable == nil then
		return plant .. ' could not be found in Module:PlantData.'
	end    
	
	local wikibox = '=== Plant Properties===\n'
	
	if plantTable.isDecorative == 'Decorative' then
		wikibox = wikibox .. 'This plant is decorative only. \n'
	end
	if plantTable.isWater == 'Underwater' then
		wikibox = wikibox .. 'This plant grows underwater. \n'
	end
	if plantTable.scytheKills =='Yes' then
		wikibox = wikibox .. '[[Scythe|Scything]] this plant will kill it. \n'
	end
	
	wikibox = wikibox .. '\n===Environmental Conditions===\n'	
	wikibox = wikibox .. '{| class=\"wikitable\"\n'
	
	-- Temperature row
	wikibox = wikibox .. '| rowspan="4" | Temperature Ranges \n'
	wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealTempMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" |  Ideal Range: The plant\'s preferred temperature range.  Temperatures in this range won\'t inhibit population growth or reduce yield.\n'
	wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealTempMax .. '\n'
	wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeTempMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" | Extreme Range : The temperature range that can support this plant (albeit at reduced efficiency if the temperature is not also within the ideal range).  Temperatures outside this range prohibit reproduction entirely and prevent any yield at all. \n'
	wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeTempMax .. '\n'
	
	-- Moisture row
	wikibox = wikibox .. '|- \n| rowspan="4" | Moisture Ranges \n'
	wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealMoistureMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" |  Ideal Range: The plant\'s preferred moisture range.  Moisture in this range won\'t inhibit population growth or reduce yield.\n'
	wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealMoistureMax .. '\n'
	wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeMoistureMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" | Extreme Range : The moisture range that can support this plant (albeit at reduced efficiency if the moisture is not also within the ideal range).  Moisture outside this range prohibits reproduction entirely and prevent any yield at all. \n'
	wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeMoistureMax .. '\n'
	
	-- Salt row
	wikibox = wikibox .. '|- \n| rowspan="4" | Salt Ranges \n'
	wikibox = wikibox .. '| Ideal Minimum : ' .. plantTable.idealSaltMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" |  Ideal Range: The plant\'s preferred sale range.  Salt in this range won\'t inhibit population growth or reduce yield.\n'
	wikibox = wikibox .. '|- \n| Ideal Maximum : ' .. plantTable.idealSaltMax .. '\n'
	wikibox = wikibox .. '|- \n| Extreme Minimum  : ' .. plantTable.extremeSaltMin .. '\n'
	wikibox = wikibox .. '| rowspan="2" | Extreme Range : The salt range that can support this plant (albeit at reduced efficiency if the salt is not also within the ideal range).  Salt outside this range prohibits reproduction entirely and prevent any yield at all. \n'
	wikibox = wikibox .. '|- \n| Extreme Maximum : ' .. plantTable.extremeSaltMax .. '\n'	
	
	-- Soil Restrictions
	wikibox = wikibox .. '|- \n| rowspan="4" | Soil Conditions \n'
	if plantTable.nitrogenHalfSpeed == nil then
		wikibox = wikibox .. '| Nitrogen minimum : None \n'
	else
		wikibox = wikibox .. '| Nitrogen minimum : ' .. plantTable.nitrogenHalfSpeed .. '\n'
	end
	wikibox = wikibox .. '| rowspan="4" | Any nutirent dropping below its minimum will reduce the growth of the plant to half speed\n'
	if plantTable.phosphorusHalfSpeed == nil then
		wikibox = wikibox .. '|- \n| Phosphorus minimum : None \n'
	else
		wikibox = wikibox .. '|- \n| Phosphorus minimum : ' .. plantTable.phosphorusHalfSpeed .. '\n'
	end
	if plantTable.potassiumHalfSpeed == nil then
		wikibox = wikibox .. '|- \n| Potassium minimum : None \n'
	else
		wikibox = wikibox .. '|- \n| Potassium minimum  : ' .. plantTable.potassiumHalfSpeed .. '\n'
	end
	if plantTable.soilMoistureHalfSpeed == nil then
		wikibox = wikibox .. '|- \n| Soil Moisture minimum : None \n'
	else
		wikibox = wikibox .. '|- \n| Soil Moisture minimum : ' .. plantTable.soilMoistureHalfSpeed .. '\n'
	end
	wikibox = wikibox .. '|}\n\n'
	
	wikibox = wikibox .. '===Plant Harvest===\n'
	wikibox = wikibox .. '{| class=\"wikitable\"\n'
	
	-- Growth Details
	wikibox = wikibox .. '|- \n| rowspan="3" | Growth Stages \n'
	wikibox = wikibox .. '| Mature in ' .. plantTable.maturity .. ' days\n'
	wikibox = wikibox .. '| How many days it takes for this plant to mature \n'
	wikibox = wikibox .. '|- \n| Pickable at ' .. plantTable.pickableAtPercent .. '% growth\n'
	wikibox = wikibox .. '| The percent it is possible to pick this plant \n'
	if plantTable.killOnHarvest == 'Yes' then
		wikibox = wikibox .. '|- \n| Harvesting Kills \n'
		wikibox = wikibox .. '| This plant must be replanted from seeds after harvesting \n'
	else
		wikibox = wikibox .. '|- \n| Returns to ' .. plantTable.postHarvestGrowth .. '% growth\n'
		wikibox = wikibox .. '| This plant will return to an immature state on harvesting \n'
	end
	
	-- Resource Yields
	wikibox = wikibox .. '|- \n| rowspan="3" | Resource Yield \n'
	wikibox = wikibox .. '| Minimum yield : ' .. plantTable.resourceMin .. '\n'
	wikibox = wikibox .. '| The minimum yield from harvesting this plant at maturity \n'
	wikibox = wikibox .. '|- \n| Maximum Yield : ' .. plantTable.resourceMax .. '\n'
	wikibox = wikibox .. '| The maximum yield from harvesting this plant at maturity \n'
	wikibox = wikibox .. '|- \n| Yield Bonus : ' .. plantTable.resourceBonus .. '% growth\n'
	wikibox = wikibox .. '| The growth at which you get a yield bonus from the minimum \n'
	wikibox = wikibox .. '|}\n\n'
	
	wikibox = wikibox .. '===Environmental Effects===\n'
	wikibox = wikibox .. '{| class=\"wikitable\"\n'
	
	-- Soil Effects
	wikibox = wikibox .. '| rowspan="4" | Nutrients Depleted \n'
	if plantTable.nitrogenContent == nil then
		wikibox = wikibox .. '| Nitrogen absorbed : None \n'
	else
		wikibox = wikibox .. '| Nitrogen absorbed : ' .. plantTable.nitrogenContent .. '\n'
	end
	wikibox = wikibox .. '| rowspan="4" | The amount of nutrients an adult plant absorbs from the soil\n'
	if plantTable.phosphorusContent == nil then
		wikibox = wikibox .. '|- \n| Phosphorus absorbed : None \n'
	else
		wikibox = wikibox .. '|- \n| Phosphorus absorbed : ' .. plantTable.phosphorusContent .. '\n'
	end
	if plantTable.potassiumContent == nil then
		wikibox = wikibox .. '|- \n| Potassium absorbed : None \n'
	else
		wikibox = wikibox .. '|- \n| Potassium absorbed  : ' .. plantTable.potassiumContent .. '\n'
	end
	if plantTable.soilMoistureContent == nil then
		wikibox = wikibox .. '|- \n| Soil Moisture absorbed : None \n'
	else
		wikibox = wikibox .. '|- \n| Soil Moisture absorbed : ' .. plantTable.soilMoistureContent .. '\n'
	end
	
	-- Overcrowding Effects
	wikibox = wikibox .. '|- \n| rowspan="4" | Space Required \n'
	if plantTable.consumedFertileGround == nil then
		wikibox = wikibox .. '| Fertile ground occupied : None \n'
	else
		wikibox = wikibox .. '| Fertile ground occupied : ' .. plantTable.consumedFertileGround .. '\n'
	end
	wikibox = wikibox .. '| rowspan="4" | The amount of each space occupied by each plant\n'
	if plantTable.consumedUnderwaterFertileGround == nil then
		wikibox = wikibox .. '|- \n| Underwater fertile ground occupied : None \n'
	else
		wikibox = wikibox .. '|- \n| Underwater fertile ground occupied : ' .. plantTable.consumedUnderwaterFertileGround .. '\n'
	end
	if plantTable.consumedShrubSpace == nil then
		wikibox = wikibox .. '|- \n| Shrub space occupied : None \n'
	else
		wikibox = wikibox .. '|- \n| Shrub space occupied : ' .. plantTable.consumedShrubSpace .. '\n'
	end
	if plantTable.consumedCanopySpace == nil then
		wikibox = wikibox .. '|- \n| Canopy space occupied : None \n'
	else
		wikibox = wikibox .. '|- \n| Canopy space occupied : ' .. plantTable.consumedCanopySpace .. '\n'
	end
	wikibox = wikibox .. '|}\n\n'
	
	return wikibox
	
end

return p