Difference between revisions of "Template:FluidGauge"

From Industrial-Craft-Wiki
Jump to navigation Jump to search
m (I'll probably get this working eventually)
m (Completely new idea)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="fluid-meter tooltip" data-amount="{{{Amount|0}}}"  
<div class="fluid-meter tooltip" data-amount="{{{Amount|0}}}"  
 
data-image="{{filepath:{{#if: {{{Fluid-image|}}}|{{{Fluid-image}}}|Grid_{{{Fluid}}}.png}}}}"  
<!-- Fluid Image -->
data-tooltip="{{formatnum:{{#expr: {{{Amount|0}}} * 1000}}}}mB of {{{Fluid}}}"  
data-image="[[File:Grid_{{{Fluid|}}}.png]]"
style="{{#ifexpr:{{{height|94}}}=94|height:94px;
data-image="{{filepath:Grid_{{{Fluid|}}}.png}}" -->
|height:120px;}}
data-image="{{filepath:{{#if: {{{Fluid-image|}}}|{{{Fluid-image}}}|Grid_{{{Fluid}}}.png}}}}"
{{#if:{{{bottom|}}}|bottom:{{{bottom}}}px;}}
 
{{#if:{{{top|}}}|top:{{{top}}}px;}}
<!-- Make tooltip for fluid -->
{{#if:{{{left|}}}|left:{{{left}}}px;}}
data-tooltip="{{formatnum:{{#expr: {{{Amount|0}}} * 1000}}}}mB of {{{Fluid}}}" style="height{{{height|94}}}px;>
{{#if:{{{right|}}}|right:{{{right}}}px;}}">
 
<div class="gauge">
<div class="tankLiquidImage" style="position:absolute"><span class="tankUsage" style="display:none">{{{Amount|5000}}}</span>[[File:{{#if:{{{img|}}}|{{{img}}}|Grid {{uc:{{#sub:{{{Fluid|water}}}|0|1}}}}{{#sub:{{{Fluid|water}}}|1}} }}.png]]</div>
</div>
 
{{#ifexpr:{{{height|94}}}=94|[[File:GUI tank {{{width|24}}} 94.png|link={{{Fluid|}}}]]|[[File:GUI tank {{{width|24}}} {{{height|}}}.png|link={{{Fluid|}}}]]}}
<!-- Determine where about in the template the tank will sit
{{#if:{{{bottom|}}}|bottom:{{{bottom}}}px;}}{{#if:{{{top|}}}|top:{{{top}}}px;}}{{#if:{{{left|}}}|left:{{{left}}}px;}}{{#if:{{{right|}}}|right:{{{right}}}px;}}"> -->
 
<!-- Give tank it's tank like appearance :) -->
<div class="gauge"></div>
[[File:GUI tank_{{{width|24}}}_{{{height|94}}}.png|link={{{Fluid|}}}]]
</div>
</div>
</includeonly>
</includeonly>
 
{{documentation}}
 
<!-- Add this back later {{documentation}} -->

Revision as of 17:12, 1 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)