Editing Module:Infobox Animal

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 56: Line 56:
     -- Idle Speed
     -- Idle Speed
     if animalTable.wanderingSpeed ~= nil then
     if animalTable.wanderingSpeed ~= nil then
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Idle Speed:\n|' .. valueColumnStyle .. '| ' .. animalTable.wanderingSpeed .. 'm/s \n'
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Idle Speed:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.wanderingSpeed, 'm/s') .. '\n'
     end         
     end         


Line 63: Line 63:
         -- 12em seems to be enough for the other column to scale up to fill the remaining space.
         -- 12em seems to be enough for the other column to scale up to fill the remaining space.
         -- With this the longest line "Attack Damage:" fits on one line.
         -- With this the longest line "Attack Damage:" fits on one line.
         infobox = infobox .. '|-\n| Eats:\n|' .. longValueColumnStyle .. '| ' .. animalTable.foodSources .. '\n'
         infobox = infobox .. '|-\n| Eats:\n|' .. longValueColumnStyle .. '| ' .. AnimalUtils.formatFoodSources(animalTable.foodSources) .. '\n'
     end     
     end     
      
      
     -- Climbing
     -- Climbing
     if animalTable.climbHeight ~= nil then
     if animalTable.climbHeight ~= nil then
         infobox = infobox .. '|--' .. alternateRowColor .. '\n| Climb Height:\n|' .. valueColumnStyle .. '| ' .. animalTable.climbHeight .. 'm \n'
         infobox = infobox .. '|--' .. alternateRowColor .. '\n| Climb Height:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.climbHeight, 'm') .. '\n'
     end     
     end     
      
      
     -- Carbon Released
     -- Carbon Released
     if animalTable.carbonRelease ~= nil then
     if animalTable.carbonRelease ~= nil then
         infobox = infobox .. '|-\n| Carbon Released:\n|' .. valueColumnStyle .. '| ' .. animalTable.carbonRelease .. 'ppm \n'
         infobox = infobox .. '|-\n| Carbon Released:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.carbonRelease, 'ppm') .. '\n'
     end     
     end     
      
      
Line 94: Line 94:
     -- Running Speed
     -- Running Speed
     if animalTable.speed ~= nil then
     if animalTable.speed ~= nil then
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Flee Speed:\n|' .. valueColumnStyle .. '| ' .. animalTable.speed .. 'm/s \n'
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Flee Speed:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.speed, 'm/s') .. '\n'
     end         
     end         


     -- Attack Chance
     -- Attack Chance
     if animalTable.chanceToAttack ~= nil then
     if animalTable.chanceToAttack ~= nil then
         infobox = infobox .. '|-\n| Attack Chance:\n|' .. valueColumnStyle .. '| ' .. tonumber(animalTable.chanceToAttack)*100 .. ' % \n'
         infobox = infobox .. '|-\n| Attack Chance:\n|' .. valueColumnStyle .. '| ' .. tonumber(Unit._unit(animalTable.chanceToAttack))*100 .. ' % \n'
     end
     end
      
      
Line 109: Line 109:
     -- Detect Range
     -- Detect Range
     if animalTable.detectRange ~= nil then
     if animalTable.detectRange ~= nil then
         infobox = infobox .. '|-\n| Detect Range:\n|' .. valueColumnStyle .. '| ' .. animalTable.detectRange .. 'm \n'
         infobox = infobox .. '|-\n| Detect Range:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.detectRange, 'm') .. '\n'
     end
     end


     -- Attack Range
     -- Attack Range
     if animalTable.attackRange ~= nil then
     if animalTable.attackRange ~= nil then
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Attack Range:\n|' .. valueColumnStyle .. '| ' .. animalTable.attackRange .. 'm \n'
         infobox = infobox .. '|-' .. alternateRowColor .. '\n| Attack Range:\n|' .. valueColumnStyle .. '| ' .. Unit._unit(animalTable.attackRange, 'm') .. '\n'
     end         
     end         
      
      
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: