Difference between revisions of "Template:SimpleItembox/ComponentRow"

From Space Engineers Wiki
Jump to: navigation, search
m (Made Hack text smaller)
(Component amount number formatting)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
-->{{#if: {{#show: {{{1}}}|?Component{{{2}}}#-}}|<!--
+
-->{{#if: {{#show:{{{1}}}|?Component{{{2}}}#-}}|<!--
 +
  --><div style="display: flex; justify-content: space-between; align-items:center; order:{{{2}}}"><!--
 +
COMPONENT ICON
 +
    -->[[File:{{#show:{{#show:{{{1}}}<!--
 +
      -->|?Component{{{2}}}#-}}|?Icon#-|default=No Image Icon.png}}<!--
 +
      -->|32px<!--
 +
      -->|link={{#if: {{#show:{{#show:{{{1}}}|?Component{{{2}}}#-}}|?Main article#-}}<!--
 +
          -->|{{#show:{{#show:{{{1}}}|?Component{{{2}}}#-}}|?Main article#-}}{{lang}}<!--
 +
          -->|{{#show:{{{1}}}|?Component{{{2}}}#-}}<!--
 +
        -->}}<!--
 +
    -->]]<!--
 +
COMPONENT ICON END
 +
COMPONENT NAME
 +
    --><span style="flex-grow: 1; margin-left: 0.25em"><!--
 +
      -->[[{{#if: {{#show:{{#show:{{{1}}}|?Component{{{2}}}#-}}|?Main article#-}}<!--
 +
          -->|{{#show:{{#show:{{{1}}}|?Component{{{2}}}#-}}|?Main article#-}}{{lang}}<!--
 +
          -->|{{#show:{{{1}}}|?Component{{{2}}}#-}}<!--
 +
        -->}}<!--
 +
        -->|{{translate|{{#show: {{{1}}}|?Component{{{2}}}#-}}}}<!--
 +
      -->]]<!--
 +
    --></span><!--
 +
COMPONENT NAME END
 +
COMPONENT AMOUNT
 +
    -->{{#show:{{{1}}}|?Component{{{2}}}Amount|default=0}}<!--
 +
COMPONENT AMOUNT END
 +
  --></div><!--
 
HACK LINE
 
HACK LINE
    -->{{#ifeq: {{#show: {{{1}}}|?Component{{{2}}}#-}}|Computer|<!--
+
  -->{{#ifeq: {{#show:{{{1}}}|?Component{{{2}}}#-}}|Mod:Vanilla/Component/Computer|<!-- Place the Hack line after the Computer component
      -->{{#ifeq: {{#show: {{{1}}}|?CriticalComponent#-}}|{{{2}}}||<!-- Only show the hack line if it is not in the same place as the Functional line
+
    -->{{#ifexpr: {{#show:{{{1}}}|?CriticalComponent#-}} - 1 = {{{2}}}||<!-- Only show the hack line if it is not in the same place as the Functional line
        --><div style="order:{{#show: {{{1|SmallHydrogenTankSmall}}}|?CriticalComponent#-}}; display: flex; align-items: center"><!--
+
      --><div style="order:{{{2}}}; display: flex; align-items: center; max-height: 2px"><!--
 +
      --><hr style="height: 2px; background-color: #486d82; flex-grow: 1"/><!--
 +
        --><span style="line-height: 0.5em; font-size: 0.75em">&nbsp;{{SimpleItembox/Hack{{lang}}}}&nbsp;</span><!--
 
         --><hr style="height: 2px; background-color: #486d82; flex-grow: 1"/><!--
 
         --><hr style="height: 2px; background-color: #486d82; flex-grow: 1"/><!--
          --><span style="line-height: 0.5em; font-size: 0.75em">&nbsp;Hack&nbsp;</span><!--
+
      --></div><!--
          --><hr style="height: 2px; background-color: #486d82; flex-grow: 1"/><!--
 
        --></div><!--
 
      -->}}<!--
 
 
     -->}}<!--
 
     -->}}<!--
 +
  -->}}<!--
 
HACK LINE END
 
HACK LINE END
  --><div style="display: flex; justify-content: space-between; align-items:center; order:{{{2}}}"><!--
 
    --><div><!--
 
      -->{{icon|{{#show: {{{1}}}|?Component{{{2}}}#-|default=No Image}}|small}}<!--
 
        -->[[{{#show: {{{1}}} | ?Component{{{2}}}#-|default=No Item}}{{lang}} |<!--
 
        -->&nbsp;{{translate|{{#show: {{{1}}}|?Component{{{2}}}#-|default=No Item}}}}]]<!--
 
      --></div><!--
 
      -->{{#show: {{{1}}}|?Component{{{2}}}Amount#-|default=0}}<!--
 
    --></div><!--
 
 
-->}}<!--
 
-->}}<!--
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>
 
{{Under Construction}}
 
 
<pre>{{SimpleItembox/ComponentRow|Page|Index}}</pre>
 
<pre>{{SimpleItembox/ComponentRow|Page|Index}}</pre>
  
<div style="max-width: 320px">{{SimpleItembox/ComponentRow|SmallHydrogenTankSmall|1}}</div>
+
<div style="max-width: 320px">{{SimpleItembox/ComponentRow|Mod:Vanilla/CubeBlock/SmallHydrogenTankSmall|1}}</div></noinclude>
 
 
</noinclude>
 

Latest revision as of 18:15, 18 May 2020

{{SimpleItembox/ComponentRow|Page|Index}}
Steel Plate Icon.pngSteel Plate1