A Wiki in the Desert
Log in

Difference between revisions of "Template:Require"

From A Wiki in the Desert
(Created page with "{{#arraydefine:p|{{trim|{{{3|}}}}}|unique, sort=desc}} {{#subobject: |count={{trim|{{{1}}}}} |requires={{trim|{{{2}}}}} |requires_property={{#arrayprint:p}}|+sep= }} {{trim...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#arraydefine:p|{{trim|{{{3|}}}}}|unique, sort=desc}}
+
<includeonly>{{#vardefine:count|{{trim | {{{1}}} }}}}{{#vardefine:base|{{trim | {{{2}}} }}}}{{#arraydefine:p|{{trim|{{{3|}}}}}|unique, sort=desc}}{{#subobject:|count={{#var:count}} |requires={{#var:base}} |verified={{{verified|false}}} |requires_property={{#arrayprint:p}}|+sep=}}{{#ifeq:{{{verified|}}}|true
{{#subobject:
+
|{{#var:count}} [[{{#var:base}}]]{{#ifexpr: {{#arraysize:p}} > 0|&nbsp;-&nbsp;}}{{#arrayprint:p}} <v/>
|count={{trim|{{{1}}}}}
+
|{{#var:count}} [[{{#var:base}}]]{{#ifexpr: {{#arraysize:p}} > 0|&nbsp;-&nbsp;}}{{#arrayprint:p}} <uv/>
|requires={{trim|{{{2}}}}}
+
}}</includeonly>
|requires_property={{#arrayprint:p}}|+sep=
+
<noinclude>
}}
+
<templatedata>
{{trim|{{{1}}}}} [[{{trim|{{{2}}}}}]] {{#ifexpr: {{#arraysize:p}} > 0| - {{#arrayprint:p}}}}
+
{
 +
"params": {
 +
"1": {
 +
"label": "Number",
 +
"description": "The number of this item that is required",
 +
"example": "1",
 +
"type": "number",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "Item",
 +
"description": "The base item that is required.",
 +
"example": "Treated Board",
 +
"required": true
 +
},
 +
"3": {
 +
"label": "Properties",
 +
"description": "The properties of the required item",
 +
"example": "Black"
 +
},
 +
"verified": {
 +
"label": "Verified",
 +
"description": "If the requirement has been verified or not",
 +
"example": "false",
 +
"type": "boolean",
 +
"default": "false",
 +
"suggested": true
 +
}
 +
},
 +
"description": "Defines a number of items as being a requirement of the object described by the page."
 +
}
 +
</templatedata>
 +
</noinclude>

Latest revision as of 18:10, 25 May 2021


Defines a number of items as being a requirement of the object described by the page.

Template parameters

ParameterDescriptionTypeStatus
Number1

The number of this item that is required

Example
1
Numberrequired
Item2

The base item that is required.

Example
Treated Board
Unknownrequired
Properties3

The properties of the required item

Example
Black
Unknownoptional
Verifiedverified

If the requirement has been verified or not

Default
false
Example
false
Booleansuggested