Difference between revisions of "Template:ProducesTable"
From A Wiki in the Desert
Line 5: | Line 5: | ||
| {{ #arraysize:produces }} | | {{ #arraysize:produces }} | ||
| | | | ||
− | {{#vardefine:count_produced|{{#ask: [[-Has subobject::{{ #arrayindex: produces | {{ #var:i }} }}]] [[producer::{{FULLPAGENAME}}]] |?count#= |mainlabel=- }}}} | + | {{#vardefine:count_produced|{{#ask: [[-Has subobject::{{ #arrayindex: produces | {{ #var:i }} }}]] [[producer::{{FULLPAGENAME}}]] |?count#= |mainlabel=- }}}}{{#vardefine:time|{{#ask: [[-Has subobject::{{ #arrayindex: produces | {{ #var:i }} }}]] [[producer::{{FULLPAGENAME}}]] |?time#= |mainlabel=- }}}} |
− | |||
* {{#var:count_produced}} - {{ #arrayindex: produces | {{ #var:i }} }} - {{#var:time}}s{{#arraydefine:requirements|{{#ask: | * {{#var:count_produced}} - {{ #arrayindex: produces | {{ #var:i }} }} - {{#var:time}}s{{#arraydefine:requirements|{{#ask: | ||
[[-Has subobject::{{ #arrayindex: produces | {{ #var:i }} }}]] [[requires::+]]| link=none |limit = 1000 | [[-Has subobject::{{ #arrayindex: produces | {{ #var:i }} }}]] [[requires::+]]| link=none |limit = 1000 | ||
Line 13: | Line 12: | ||
| {{ #arraysize:requirements }} | | {{ #arraysize:requirements }} | ||
| | | | ||
− | {{#vardefine:count_required|{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?count#= |mainlabel=- }}}} | + | {{#vardefine:count_required|{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?count#= |mainlabel=- }}}}{{#vardefine:item_required|{{#ask: [[{{ #arrayindex: requirements | {{ #var:j }} }}]] |?requires#= |mainlabel=- }}}} |
− | |||
** {{ #expr: {{#var:count_produced}}*{{#var:count_required}}round0}} - {{#var:item_required}} | ** {{ #expr: {{#var:count_produced}}*{{#var:count_required}}round0}} - {{#var:item_required}} | ||
}} | }} | ||
}} | }} |