Difference between revisions of "Template:InlineGrid"

From Industrial-Craft-Wiki
Jump to: navigation, search
(woo yeah it works (except for the numbers))
(added arg5/6 to clean up/ease text and links, better examples with actual code)
 
Line 1: Line 1:
{{#if: {{{1|}}}|<span class="tooltip" title="{{{2|{{{1}}}}}}">[[File:Grid {{{1}}}.png|{{{4|32}}}px|link={{#ifeq:{{{3|}}}|None||{{{3|{{{1}}}}}}}}|class=crafting-grid-image]]<!--removed number code for now, percentages completely {{#if: {{{number|}}} |<span class="secret-link crafting-grid-number">{{#ifeq:{{{3|}}}|None|{{{number}}}|[[{{{3|{{{1}}}}}}{{!}}{{{number}}}]]}}</span>}}--></span>|<!--Nothing has been provided-->}}<noinclude>===Simple documentation notes===
+
{{#if: {{{1|}}}|{{#ifeq: {{{5|}}}|fore|[[{{#if: {{{3|}}}|{{{3}}}{{!}}{{{6|{{{1}}}}}}|{{{1}}}{{!}}{{{6|{{{1}}}}}}}}]]&nbsp;|}}<span class="tooltip" title="{{{2|{{{1}}}}}}">[[File:Grid {{{1}}}.png|{{{4|32}}}px|link={{#ifeq:{{{3|}}}|None||{{{3|{{{1}}}}}}}}|class=crafting-grid-image]]</span>{{#ifeq: {{{5|}}}|aft|&nbsp;[[{{#if: {{{3|}}}|{{{3}}}{{!}}{{{6|{{{1}}}}}}|{{{1}}}{{!}}{{{6|{{{1}}}}}}}}]]|}}|<!--Nothing has been provided-->}}<noinclude>===Simple documentation notes===
  
InGr or InlineGrid basically copies Grid (and is an attempt to not be Gc-ing everything), but doesn't use the module, so everything is manual.  The numbering is also stripped out (for now).
+
'''Template:InlineGrid''' basically copies Grid (and is an attempt to not be Gc-ing everything), but doesn't use the module, so everything is manual.  The numbering is also stripped out (for now).
 
* Arg1 is the name, and maps to the image (and everything else unless specified).
 
* Arg1 is the name, and maps to the image (and everything else unless specified).
 
* Arg2 is the tooltip, include a \ for newline.
 
* Arg2 is the tooltip, include a \ for newline.
 
* Arg3 is the link - what to link to if not the default.
 
* Arg3 is the link - what to link to if not the default.
* Arg4 is the size in pixels.  (Comes before Arg3's first use in the code, but it's less commonly changed from the 32px default.)
+
* Arg4 is the size in pixels.  (Comes before Arg3's first use in the code, but it's less commonly changed from the 32px default.  I guess.)
 +
New features added 12 Dec 16:
 +
* Arg5 is how to style the accompanying text.  Accepts 'fore' or 'aft' with text based on Arg1 and link on Arg1/3.
 +
* Arg6 is an override for the displayed text in case you don't like Arg1.
  
Usage showing {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk}} inline functionality
 
 
Infobox test, for upgrades
 
 
{{Infobox
 
{{Infobox
 
|title=Macerator
 
|title=Macerator
Line 15: Line 15:
 
|invimage=Condenser
 
|invimage=Condenser
 
|upgrades={{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}
 
|upgrades={{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}{{InlineGrid|Overclocker upgrade}}{{InlineGrid|Transformer upgrade}}
}} </noinclude>
+
}}
 +
Usage showing {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk}} inline functionality
 +
* <code>{{InlineGrid{{!}}Chest{{!}}Itembox 5000\This thing is a piece of junk}}</code>
 +
 
 +
Usage showing foretext {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk|Non-IC Items|5=fore}} with alt link
 +
* <code>{{InlineGrid{{!}}Chest{{!}}Itembox 5000\This thing is a piece of junk{{!}}Non-IC Items{{!}}5=fore}}</code>
 +
 
 +
Same foretext {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk|Non-IC Items|5=fore|6=NOPE}} with alt link, but text override too
 +
* <code>{{InlineGrid{{!}}Chest{{!}}Itembox 5000\This thing is a piece of junk{{!}}Non-IC Items{{!}}5=fore{{!}}6=NOPE}}</code>
 +
 
 +
Afttext, no alt link, text override: {{InlineGrid|Chest|5=aft|6=NEWTEXT}}
 +
* <code>{{InlineGrid{{!}}Chest{{!}}5=aft{{!}}6=NEWTEXT}}</code>
 +
 
 +
Infobox test, for upgrades (showing no forced break from divs since this uses spans) -->
 +
</noinclude>

Latest revision as of 09:42, 12 December 2016

Simple documentation notes

Template:InlineGrid basically copies Grid (and is an attempt to not be Gc-ing everything), but doesn't use the module, so everything is manual. The numbering is also stripped out (for now).

  • Arg1 is the name, and maps to the image (and everything else unless specified).
  • Arg2 is the tooltip, include a \ for newline.
  • Arg3 is the link - what to link to if not the default.
  • Arg4 is the size in pixels. (Comes before Arg3's first use in the code, but it's less commonly changed from the 32px default. I guess.)

New features added 12 Dec 16:

  • Arg5 is how to style the accompanying text. Accepts 'fore' or 'aft' with text based on Arg1 and link on Arg1/3.
  • Arg6 is an override for the displayed text in case you don't like Arg1.
Macerator
Compressor ig.png
Grid Condenser.png
Properties
Type  ?
Tool  ?
Armor rating {{{armorrating}}}
Damage {{{damage}}}
Durability {{{durability}}}
Mining level {{{mininglevel}}}
Stackable Yes (64)
Flammable No
Danger {{{danger}}}
Protection {{{protection}}}
Storage {{{storageslots}}}
Liquid Storage {{{lstorage}}} mB
Upgrades
Grid Overclocker upgrade.pngGrid Transformer upgrade.pngGrid Overclocker upgrade.pngGrid Transformer upgrade.pngGrid Overclocker upgrade.pngGrid Transformer upgrade.pngGrid Overclocker upgrade.pngGrid Transformer upgrade.pngGrid Overclocker upgrade.pngGrid Transformer upgrade.pngGrid Overclocker upgrade.pngGrid Transformer upgrade.png
Previous tier {{{prevtier}}}
Next tier {{{nexttier}}}
Energy Consumption
Max EU Input {{{maxeu}}}
EU Use {{{eu_use}}} EU/t
EU Per Operation {{{eu_op}}}
EU Storage {{{storage}}} EU
EU Production {{{eu_produce}}} EU/t
Max EU Output {{{maxout}}}
Max Heat Input {{{maxhu}}} HU/t
Heat Use {{{hu_use}}} HU/t
Heat Production {{{hu_produce}}} HU/t
Max Kinetic Input {{{maxku}}} KU/t
Kinetic Use {{{ku_use}}} KU/t
Kinetic Production {{{ku_produce}}} KU/t
Technical Details
Operation Length {{{optime}}} Seconds
UU Cost {{{uu_cost}}}
First appearance {{{firstappearance}}}
Last appearance {{{lastappearance}}}
ID IC2:{{{id}}}
Flow Speed {{{fluidspeed}}} m/s
Player Speed {{{movespeed}}}

Usage showing Grid Chest.png inline functionality

  • {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk}}

Usage showing foretext Chest Grid Chest.png with alt link

  • {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk|Non-IC Items|5=fore}}

Same foretext NOPE Grid Chest.png with alt link, but text override too

  • {{InlineGrid|Chest|Itembox 5000\This thing is a piece of junk|Non-IC Items|5=fore|6=NOPE}}

Afttext, no alt link, text override: Grid Chest.png NEWTEXT

  • {{InlineGrid|Chest|5=aft|6=NEWTEXT}}

Infobox test, for upgrades (showing no forced break from divs since this uses spans) -->