Template:Infobox block: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
edit was lost with session data; delete some whitespace and get one I missed
minor fixes
Line 1: Line 1:
<table class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right; border: 1px solid #AAAAAA; margin-left:0.5em">
<table class="infobox" cellpadding="4" style="width: 22em; font-size: 90%; float:right; border: 1px solid #AAAAAA; margin-left:0.5em">
  <tr>
  <tr>
   <td align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; font-weight: bold;">{{{name|{{BASEPAGENAME}}}}}</td>
   <td align="center" colspan=2 bgcolor="#CCCCCC" style="font-size:120%; font-weight: bold;">{{{name|{{BASEPAGENAME}}}}}</td>
  </tr>
  </tr>
  <tr valign="top">
  <tr valign="top">
Line 8: Line 8:
{{Block/row|label=Type|field={{{type|?}}}}}
{{Block/row|label=Type|field={{{type|?}}}}}
{{#switch:{{lc:{{{type}}}}}|solid block|solid|block =
{{#switch:{{lc:{{{type}}}}}|solid block|solid|block =
{{Block/row|label=Requirements|field={{#switch:{{lc:{{{dirt}}}}}|yes=Sunlight and dirt|no=None|sand=Sunlight and sand|#default={{{dirt|?}}}}} }}
{{Block/row|label=Requirements|field={{#switch:{{lc:{{{dirt}}}}}|yes=Sunlight and dirt|no=None|sand=Sunlight and sand|#default={{{dirt|?}}}}} }}
}}
}}
{{Block/row|label=Physics|field={{{gravity|?}}}}}
{{Block/row|label=Physics|field={{{gravity|?}}}}}
{{Block/row|label=Transparency|field={{{transparent|?}}}}}
{{Block/row|label=Transparency|field={{{transparent|?}}}}}
{{Block/row|label=Luminance|field={{{light|?}}}}}
{{Block/row|label=Luminance|field={{{light|?}}}}}
{{Block/row|label=Tool{{#if:{{{tool2|}}}|s}}|field={{#switch:{{lc:{{{tool|{{{Tool}}}}}}}}
{{Block/row|label=Tool{{#if:{{{tool2|}}}|s}}|field=[[{{#switch:{{lc:{{{tool|}}}}}<!---
|pick|pickaxe=[[File:Use-pickaxe.png]]<!--
--->|pick|pickaxe=File:Use-pickaxe.png<!--
--->|spade|shovel=[[File:Use-spade.png]]<!--
--->|spade|shovel=File:Use-spade.png<!--
--->|axe=[[File:Use-axe.png]]<!--
--->|axe=File:Use-axe.png<!--
--->|hoe|ho=[[File:Use-hoe.png]]<!--
--->|hoe|ho=File:Use-hoe.png<!--
--->|n/a|none=N/A<!--
--->|n/a|none=N/A<!--
--->|#default=?}}<!--
--->|#default=?}}|50px]]<!--
--->{{#switch:{{lc:{{{tool2}}} }}|<!--
--->[[{{#switch:{{lc:{{{tool2}}}}}|<!--
--->|pick|pickaxe=[[File:Use-pickaxe.png]]<!--
--->|pick|pickaxe=File:Use-pickaxe.png<!--
--->|spade|shovel=[[File:Use-spade.png]]<!--
--->|spade|shovel=File:Use-spade.png<!--
--->|axe=[[File:Use-axe.png]]<!--
--->|axe=File:Use-axe.png<!--
--->|hoe|ho=[[File:Use-hoe.png]]<!--
--->|hoe=File:Use-hoe.png<!--
--->|#default= }}{{#switch:{{{tool|{{{Tool|{{{tool2}}}}}}}}}
--->|#default=   }}|50px]]{{#switch:{{{tool|{{{tool2}}}}}}|[[file:use-spade.png]]|[[file:use-axe.png]]|[[file:use-hoe.png]]|[[file:use-spade.png]]=[[Category:Improper Parameter Use]]}}}}
|[[file:use-spade.png]]
{{#if:{{{Tool|}}}|[[Category:Improper Parameter Use]]}}
|[[file:use-axe.png]]
|[[file:use-hoe.png]]
|[[file:use-spade.png]]=[[Category:Improper Parameter Use]]}}
}}
{{#switch:{{lc:{{{type}}}}}|fluid =
{{#switch:{{lc:{{{type}}}}}|fluid =
{{Block/row|label=Speed of fluid movement:|field={{{fluidspeed|?}}}}}
{{Block/row|label=Speed of fluid movement:|field={{{fluidspeed|?}}}}}
Line 39: Line 35:
The original data values setup, used if datadec is a field
The original data values setup, used if datadec is a field


---->{{{datadec|?}}} <sub>dec</sub> ({{{datahex|{{dec-hex|{{{datadec|0}}}}}}}} <sub>hex</sub>)|<!--
---->{{{datadec|?}}} <sub>dec</sub> ({{{datahex|{{dec-hex|{{{datadec|0}}}}}}}} <sub>hex</sub>)|<!--


The new formatting
The new formatting
Line 68: Line 64:
| transparent =  
| transparent =  
| light =  
| light =  
| Tool =
| tool =
| datadec =  
| datadec =  
| datahex =  
| datahex =  

Revision as of 07:29, 25 September 2010

Template:Block/rowTemplate:Block/rowTemplate:Block/rowTemplate:Block/rowTemplate:Block/rowTemplate:Block/row
Infobox block
File:No image.png

Documentation

These usage notes will not be included in articles bearing this template.

This template provides a uniform design for block pages.

{{Block
| name = 
| image = 
| type = 
| gravity = 
| dirt = 
| transparent = 
| light = 
| tool =
| datadec = 
| datahex = 
}}
Parameter Function Default value
name Name of the block {{BASEPAGENAME}}
image Image of the block (should be approx. 150x150px) No image.png
type Type(solid block, solid, block, or fluid) ?
gravity Affected by gravity? ?
dirt Requires sunlight/dirt? ?
transparent Allows light to pass through? ?
light Emits Light? ?
tool Tool to use ?
datadec Decimal Data Value ?
datahex Hexadecimal Data Value ?
data Data Value (overrides dec and hex values) datadec and datahex