Difference between revisions of "Template:Ib"

From StarMade Wiki
m
m (Replaced content with "{{#if:{{{2|}}}|{{#switch: {{{2}}} |Ctrling|CtrlBy|Item= {{DbSub|{{{1}}}|{{{2}}}|0}} |{{DbParser|{{{1}}}|{{{2}}}|{{{3}}}}} }}|{{iblink|{{{1}}}}}}}<!-- --><noinclude>{{Docum...")
(Tag: Replaced)
Line 2: Line 2:
 
|Ctrling|CtrlBy|Item= {{DbSub|{{{1}}}|{{{2}}}|0}}
 
|Ctrling|CtrlBy|Item= {{DbSub|{{{1}}}|{{{2}}}|0}}
 
|{{DbParser|{{{1}}}|{{{2}}}|{{{3}}}}}
 
|{{DbParser|{{{1}}}|{{{2}}}|{{{3}}}}}
}}|<div class="tooltipbox">[[File:{{Db|{{{1}}}|link}}.png|20px|link={{Db|{{{1}}}|link}}]][[{{Db|{{{1}}}|link}}|{{Db|{{{1}}}|link}}]]<div class="info">{{blockboxlayout <!--
+
}}|{{iblink|{{{1}}}}}}}<!--
-->|bodystyle    = width: 19em; text-align: left; font-size: 88%; line-height: 1.5em; float: {{#if:{{{3|}}}|{{{3}}}|right}};<!--
 
-->|titlestyle      = text-align: center; font-size: 125%; font-weight: bold; padding: 5px;<!--
 
-->|headerstyle = text-align: center; padding: 0em; height: 1.8em;<!--
 
-->|labelstyle    = text-align: right; font-weight: bold; vertical-align: top; padding: 0.1em 0.5em; <!--
 
-->|datastyle      = text-align: left; padding: 0em 2em; <!--
 
-->|chessstyle      = background-color:#18181F; <!--
 
-->|imagestyle  = text-align: center; padding: 0em; height: 1.8em;<!--
 
-->|title                =  {{DbParser|{{{1}}}|name}}<!--
 
-->|titlelink        =  {{DbParser|{{{1}}}|link}}<!--
 
-->|imagelink          =  {{DbParser|{{{1}}}|link}}  <!-- extension is set in layout : png
 
-->|overimage    ={{#ifeq:{{DbParser|{{{1}}}|Deprecated}}|true|-ms-transform: rotate(45deg); -webkit-transform: rotate(45deg); transform: rotate(45deg);color:DarkRed; top: 60px; left: 50px; font-weight:bold; text-align:right; opacity: 0.7; font-size: 15px;">BLOCK OBSOLETE !}}<!--
 
-->|imageoption= 150px<!--
 
-->|caption        = <!--
 
-->|captionstyle= <!-- :::old deprecated display,  see above overimage::::
 
-->|label1  =<!--{{#ifeq:{{DbParser|{{{1}}}|Deprecated}}|false|<font style="color:DarkGreen;">Block </font>|<font style="color:DarkRed;">Block</font>}}
 
-->|data1  =<!-- {{#ifeq:{{DbParser|{{{1}}}|Deprecated}}|false|<font style="color:DarkGreen;"> In game </font>|<font style="color:DarkRed;">obsolete !</font>}}
 
-->|label2  = Hit Points<!--
 
-->|data2    ={{DbParser|{{{1}}}|Hp}}<!--
 
-->|label3  = Armor<!--
 
-->|data3    = {{DbParser|{{{1}}}|Armor}}<!--
 
-->|label4  = Ahp<!--
 
-->|data4    = {{DbParser|{{{1}}}|Ahp}}<!--
 
-->|label5  = Shp<!--
 
-->|data5    = {{DbParser|{{{1}}}|Shp}}<!--
 
-->|label6  = Mass<!--
 
-->|data6    = {{DbParser|{{{1}}}|Mass}}<!--
 
-->|label7  = Heat Armor<!--
 
-->|data7    = {{DbParser|{{{1}}}|Heat}}<!--
 
-->|label8  = Kinetic Armor<!--
 
-->|data8    = {{DbParser|{{{1}}}|Kinetic}}<!--
 
-->|label9  = EM Armor<!--
 
-->|data9    = {{DbParser|{{{1}}}|EM}}<!--
 
-->|label10  = Luminosity<!--
 
-->|data10    = {{DbParser|{{{1}}}|Light}}<!--
 
-->|label11  = Id<!--
 
-->|data11    = {{DbParser|{{{1}}}|Id}}<!--
 
-->|label20  = cat<!--
 
-->|data20    ={{#if:{{DbParser|{{{1}}}|cat}}|[[:Category:{{DbParser|{{{1}}}|cat}}]]}}<!--
 
-->|label21  = cat2<!--
 
-->|data21    ={{#if:{{DbParser|{{{1}}}|cat2}}|[[:Category:{{DbParser|{{{1}}}|cat2}}]]}}<!--
 
-->|label22  = cat3<!--
 
-->|data22    ={{#if:{{DbParser|{{{1}}}|cat3}}|[[:Category:{{DbParser|{{{1}}}|cat3}}]]}}<!--
 
-->|label23  = cat4<!--
 
-->|data23    ={{#if:{{DbParser|{{{1}}}|cat4}}|[[:Category:{{DbParser|{{{1}}}|cat4}}]]}}}}</div></div>}}<!--
 
 
--><noinclude>{{Documentation}}</noinclude>
 
--><noinclude>{{Documentation}}</noinclude>

Revision as of 14:48, 27 July 2018

20px[[|]]
LuminosityNo
[view] [edit] [history] [[[:Template:Purge]]] 50px Template documentation

ib allow to get specific information of a block in database.

Usage

{{ib|Name}} 
or {{ib|Name|type}} 
or {{ib|Name|image|size(optional)}}

display an older version :
{{ib|~version|Name|type)}} (don't forget the "~" before the verrsion number)
ie : {{ib|~0.200.335|Teal Crystal Armor|Armor}}


'''Version :''' (optional) use "~" and the number of version (stored in database) ie : ~0.200.335
'''Name :''' In game block name
'''type :''' the value you query (Hp, armor, name, etc...)

No type return a link + icon of the block name

ie : for the block Ship Core if i use ib that display Ship Core.pngShip Core if i dont put any type


type return the value of block name

Ship core have 100hp, value of armor is Noand light color : 1.0,1.0,1.0,1.0

image size(optional) : number in pixel

...|image|40}}   = Ship Core.png               and without number, original       ....|image}}   = {{{3}}}px

badtype return a list of all type available

i. e : Unknow Badtype : link, Id, Factory, Animated, Armor, Ahp, Shp, Transparency, InShop, ReactorHp, Mass, Hp, Heat, Kinetic,EM, cat, cat2, cat3, cat4, Placable, BlockStyle, Light, Depreciated, LightColor, Item(table), CtrlBy(table), Ctrling(table), Shop(InShop+Price), Price, Desc, BlockResourceType, FactoryBakeTime, Chamber(table), Volume, InRecipe, MainCtrl, SupportCtrl, EffectCtrl, ExpAbsorb