Difference between revisions of "Template:FluidGauge"

From Industrial-Craft-Wiki
Jump to navigation Jump to search
m (More dropped brackets)
m (This might be important)
Line 1: Line 1:
<includeonly>
<includeonly>
{{#ifexist: File:Tank {{{tank|}}}.png|{{#ifeq:{{#expr:{{{fill|0}}} > {{{max|10000}}}}}|1|<div style="left:{{{left}}}px; top:{{#expr:{{{top|92}}}-{{{height|94}}}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px; clip:rect({{{height|94}}}px,{{{width|24}}}px,{{#expr:{{{height|94}}}*2}}px,0px);">[[Image:Tank {{{tank}}}.png|{{{width|24}}}px|link={{{link|{{{tank}}}}}}|alt=]]</div>
{{#ifexist: File:Tank {{{tank|}}}.png|{{#ifeq:{{#expr:{{{fill|0}}} > {{{max|10000}}}}}|1|<div style="left:{{{left}}}px; top:{{#expr:{{{top|92}}}-{{{height|94}}}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px; clip:rect({{{height|94}}}px,{{{width|24}}}px,{{#expr:{{{height|94}}}*2}}px,0px);">[[Image:Tank {{{tank}}}.png|{{{width|24}}}px|link={{{link|{{{tank}}}}}}|alt=]]</div>
|<div style="left:{{{left}}}px; top:{{#expr:{{{top|92}}}-({{#expr:{{{height|94}}}/{{{max|10000}}}}}*{{{fill|0}}})}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px; clip:rect({{#expr:0+({{#expr:{{{height|94}}}/{{{max|10000}}}}}*{{{fill|0}}})}}px,{{{width|24}}}px,{{#expr:{{{height|94}}}+({{#expr:0+({{#expr:{{{height|94}}}/{{{max|10000}}}}}*{{{fill|0}}}}})}}px,0px);">[[Image:Tank {{{tank}}}.png|{{{width|24}}}px|link={{{link|{{{tank}}}}}}|alt=]]</div>}}
|<div style="left:{{{left}}}px; top:{{#expr:{{{top|92}}}-({{#expr:{{{height|94}}}/{{{max|10000}}}}}*{{{fill|0}}})}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px; clip:rect({{#expr:0+({{#expr:{{{height|94}}}/{{{max|10000}}}}}*{{{fill|0}}})}}px,{{{width|24}}}px,{{#expr:{{{height|94}}}+({{#expr:0+({{#expr:{{{height|94}}}/{{{max|10000}}}}})*{{{fill|0}}}}})}}px,0px);">[[Image:Tank {{{tank}}}.png|{{{width|24}}}px|link={{{link|{{{tank}}}}}}|alt=]]</div>}}
|<div style="left:{{{left}}}px; top:{{{top|92}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px;">[[Image:Tank Empty.png|{{{width|24}}}px|link=|alt=]]</div>}}
|<div style="left:{{{left}}}px; top:{{{top|92}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px;">[[Image:Tank Empty.png|{{{width|24}}}px|link=|alt=]]</div>}}
|<div style="left:{{{left}}}px; top:{{{top|92}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px;">[[Image:Tank Empty.png|{{{width|24}}}px|link=|alt=]]</div>}}
|<div style="left:{{{left}}}px; top:{{{top|92}}}px; position:absolute; width:{{{width|24}}}px; height:{{{height|94}}}px;">[[Image:Tank Empty.png|{{{width|24}}}px|link=|alt=]]</div>}}

Revision as of 18:58, 23 September 2014


Template-info.png Documentation
Lua logo.png This template uses Module:Grid, a script written in Lua.
Please see wikipedia:wp:Lua and mw:Extension:Scribunto to learn more.

Fluid Gauge is used for making tanks. The fields available are:

  • left - (Required) To position the tank relative to the left side of the template
  • top - (Required) To position the tank relative to the top of the template
  • width - (Default - 24) Sets the width of the tank
  • height - (Default - 94) Sets the height of the tank
  • tank - (Default - None) Sets the fluid inside the tank
  • fill - (Default - 0) Sets how full the tanks is
  • max - (Default - 10000) Sets, in milli-buckets, how full a tank can get
  • link - (Optional) Provides the option to set a link if you click on the tank

If you have any problems, talk to Chocohead NagAdditions  :)

The above documentation is transcluded from Template:FluidGauge/doc. (edit | history)