Vorlage:Item infobox/infoboxView: Unterschied zwischen den Versionen

Aus Terraria Wiki
Wechseln zu: Navigation, Suche
K (Kleinen Fehler mit types behoben.)
Zeile 1: Zeile 1:
 
<includeonly><!--
 
<includeonly><!--
   
-->{{item/options|smallicons=y}}{{eicons/options|small=y}}<!--
+
-->{{options/snap|item|for_item_infobox_infoboxView}}{{options/set|item|smallicons=y}}<!--
 
-->{{eicons/options|small=y}}<!--
   
 
--><div class="infobox item {{#if:{{#var:ii:ext:float}}|float-{{#var:ii:ext:float}}}}" style="{{#if:{{#var:ii:ext:boxwidth}}|width:{{#var:ii:ext:boxwidth}};}}{{#var:ii:ext:css}};{{#var:ii:ext:style}}"><!--
 
--><div class="infobox item {{#if:{{#var:ii:ext:float}}|float-{{#var:ii:ext:float}}}}" style="{{#if:{{#var:ii:ext:boxwidth}}|width:{{#var:ii:ext:boxwidth}};}}{{#var:ii:ext:css}};{{#var:ii:ext:style}}"><!--
Zeile 51: Zeile 52:
 
-->{{#if:{{#var:ii:hammer}}{{#var:ii:pick}}{{#var:ii:axe}}|<!--
 
-->{{#if:{{#var:ii:hammer}}{{#var:ii:pick}}{{#var:ii:axe}}|<!--
 
--><ul class="toolpower"><!--
 
--><ul class="toolpower"><!--
--><li title="{{l10n|item_infobox|pickaxe_power}}" {{#if:{{#var:ii:pick}}||class="zero"}}>[[File:Pickaxe icon.png|16px|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:pick}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:pick}}}}|{{#var:ii:pick|0}}%}}}}</li><!--
+
--><li title="{{l10n|item_infobox|pickaxe_power}}" class="{{#if:{{#var:ii:pick}}||zero}} pickaxe">[[File:Pickaxe mask.png|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:pick}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:pick}}}}|{{#var:ii:pick|0}}%}}}}</li><!--
--><li title="{{l10n|item_infobox|hammer_power}}" {{#if:{{#var:ii:hammer}}||class="zero"}}>[[File:Hammer icon.png|16px|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:hammer}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:hammer}}}}|{{#var:ii:hammer|0}}%}}}}</li><!--
+
--><li title="{{l10n|item_infobox|hammer_power}}" class="{{#if:{{#var:ii:hammer}}||zero}} hammer">[[File:Hammer mask.png|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:hammer}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:hammer}}}}|{{#var:ii:hammer|0}}%}}}}</li><!--
--><li title="{{l10n|item_infobox|axe_power}}" {{#if:{{#var:ii:axe}}||class="zero"}}>[[File:Axe icon.png|16px|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:axe}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:axe}}}}|{{#var:ii:axe|0}}%}}}}</li><!--
+
--><li title="{{l10n|item_infobox|axe_power}}" class="{{#if:{{#var:ii:axe}}||zero}} axe">[[File:Axe mask.png|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:axe}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:axe}}}}|{{#var:ii:axe|0}}%}}}}</li><!--
 
--></ul><!--
 
--></ul><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:pickreq}}|<!--
 
-->{{#if:{{#var:ii:pickreq}}|<!--
 
--><ul class="toolpower"><!--
 
--><ul class="toolpower"><!--
--><li title="{{l10n|item_infobox|pickreq}}">[[File:Pickaxe icon.png|16px|link=]] {{percent|{{#var:ii:pickreq}}%}}</li><!--
+
--><li title="{{l10n|item_infobox|pickreq}}">[[File:Pickaxe icon.png|16px|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:pickreq}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:pickreq}}}}|{{#var:ii:pickreq|0}}%}}}}</li><!--
 
--></ul><!--
 
--></ul><!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#if:{{#var:ii:hammerreq}}|<!--
 
-->{{#if:{{#var:ii:hammerreq}}|<!--
 
--><ul class="toolpower"><!--
 
--><ul class="toolpower"><!--
--><li title="{{l10n|item_infobox|hammerreq}}">[[File:Hammer icon.png|16px|link=]] {{percent|{{#var:ii:hammerreq}}%}} {{note|small=y|{{l10n|item_infobox|hammerreq_note}}}}</li><!--
+
--><li title="{{l10n|item_infobox|hammerreq}}">[[File:Hammer icon.png|16px|link=]] {{percent|{{#iferror:{{#expr:{{#var:ii:hammerreq}}+1}}|{{inline block|css=text-align:left;|{{#var:ii:hammerreq}}}}|{{#var:ii:hammerreq|0}}%}}}} {{note|small=y|{{l10n|item_infobox|hammerreq_note}}}}</li><!--
 
--></ul><!--
 
--></ul><!--
 
-->}}<!--
 
-->}}<!--
Zeile 72: Zeile 73:
 
--><td><div class="tags">{{#lstmap:{{#var:ii:types}}|/|@@@@|<!--
 
--><td><div class="tags">{{#lstmap:{{#var:ii:types}}|/|@@@@|<!--
 
--><esc><!--
 
--><esc><!--
-->{{#vardefine:_typepage|{{#or:{{l10n|item_infobox|typepage:{{lcfirst:@@@@}}}}|{{tr|{{ucfirst:@@@@}}|de|link=y}}}}}}<!--
+
-->{{#vardefine:_typepage|{{#or:{{l10n|item_infobox|typepage:@@@@}}|{{tr|{{ucfirst:@@@@}}|link=y}}}}}}<!--
-->{{#vardefine:_typetext|{{#or:{{l10n|item_infobox|type:{{lcfirst:@@@@}}}}|{{tr|{{ucfirst:@@@@}}|de}}}}}}<!--
+
-->{{#vardefine:_typetext|{{#or:{{l10n|item_infobox|type:@@@@}}|{{tr|{{ucfirst:@@@@}}}}}}}}<!--
 
-->{{nowrap|class=tag|{{ifexists|{{#var:_typepage}}|[[{{#var:_typepage}}|{{#var:_typetext}}]]|{{#var:_typetext}}}}}}<!--
 
-->{{nowrap|class=tag|{{ifexists|{{#var:_typepage}}|[[{{#var:_typepage}}|{{#var:_typetext}}]]|{{#var:_typetext}}}}}}<!--
 
--></esc><!--
 
--></esc><!--
Zeile 211: Zeile 212:
 
--><tr><!--
 
--><tr><!--
 
--><th>{{l10n|item_infobox|th:velocity}}</th><!--
 
--><th>{{l10n|item_infobox|th:velocity}}</th><!--
--><td>{{formatnum:{{#var:ii:velocity}}}}<!--
+
--><td><!--
-->{{#ifeq:{{#var:ii:velocity}}|{{#var:ii:rawVelocity}}||<!-- if there is extraUpdates
+
-->{{formatnum:{{#var:ii:velocity}}}}<!--
  +
-->{{#ifexpr:{{#var:ii:extraUpdates|0}}>0|<!--
 
-->{{#if:{{#var:ii:useammo}}|<!--
 
-->{{#if:{{#var:ii:useammo}}|<!--
 
--><small>&#32;{{l10n|item_infobox|velocityignoreammo}}</small><!--
 
--><small>&#32;{{l10n|item_infobox|velocityignoreammo}}</small><!--
Zeile 278: Zeile 280:
 
--><td>{{buff|id={{#var:ii:mobilebuff}}{{#var:ii:idbuff}}|class=break}}</td><!--
 
--><td>{{buff|id={{#var:ii:mobilebuff}}{{#var:ii:idbuff}}|class=break}}</td><!--
 
-->|<!--
 
-->|<!--
--><td>{{item|{{#var:ii:bufflink|{{#var:ii:buff}}}}|{{tr|{{#var:ii:buff}}|de}}|class=break}}</td><!--
+
--><td>{{item|{{#var:ii:bufflink|{{#var:ii:buff}}}}|{{tr|{{#var:ii:buff}}}}|class=break}}</td><!--
 
-->}}<!--
 
-->}}<!--
 
--></tr><!--
 
--></tr><!--
Zeile 334: Zeile 336:
 
--><ul class="infobox-{{#if:{{#var:ii:ext:projectileblock}}|block|inline}}"><!--
 
--><ul class="infobox-{{#if:{{#var:ii:ext:projectileblock}}|block|inline}}"><!--
 
-->{{#lstmap:{{#var:ii:idprojectile}}|,|@@@@|<esc><li><!--
 
-->{{#lstmap:{{#var:ii:idprojectile}}|,|@@@@|<esc><li><!--
--><div class="name">{{#vardefineecho:_pname|{{tr|{{getProjectileInfo|@@@@|name}}}}}}</div><!--
+
--><div class="name">{{#vardefineecho:_pname|{{ProjectileNameFromId|@@@@}}}}</div><!-- //ProjectileNameFromId is i18nready, so no {{tr}} here.
 
--><div class="image">[[File:{{getProjectileInfo|@@@@|image}}|{{#var:_pname}}|link=]]</div><!--
 
--><div class="image">[[File:{{getProjectileInfo|@@@@|image}}|{{#var:_pname}}|link=]]</div><!--
 
--></li></esc>|}}<!--
 
--></li></esc>|}}<!--
Zeile 393: Zeile 395:
 
--></div><!--END div.infobox
 
--></div><!--END div.infobox
   
  +
-->{{options/restore|item|for_item_infobox_infoboxView}}<!--
-->{{item/options|reset}}{{eicons/options|reset}}<!--
 
  +
-->{{eicons/options|reset}}<!--
   
 
--></includeonly><!--
 
--></includeonly><!--

Version vom 11. Oktober 2020, 23:33 Uhr

Internal subtemplate. Handles the output of the default "infobox" view of {{item infobox}}.