Template:Action: Difference between revisions

From eMushpedia
Jump to navigation Jump to search
Apollo105 (talk | contribs)
Created page with "test"
 
Apollo105 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
test
<includeonly><onlyinclude><span class="mush-button">{{#if: {{{2|}}}
  | <!-- Number of AP -->
    {{#if: {{{3|}}}
      | <!-- Number + type -->
        {{{2}}}&nbsp;{{AP}}&nbsp;or&nbsp;{{AP|{{{3}}}}}&nbsp;{{{1}}}
      | <!-- Number w/o type -->
        {{{2}}}&nbsp;{{AP}}&nbsp;{{{1}}}
      }}
  | <!-- No number (the type is ignored) -->
    {{{1}}}
}}</span></onlyinclude></includeonly>
 
<noinclude>
<templatedata>
{
"params": {
"1": {
"label": "Action",
"description": "Name of the displayed action",
"required": true,
            "type": "string"
},
        "2": {
            "label": "Number of AP",
            "description": "Number of necessary action points (optional).",
            "required": false,
            "type": "number"
        },
        "3": {
            "label": "Type of",
            "description": "Type of AP (optional, if no number of AP is given).",
            "required": false,
            "type": "string"
        }
},
"description": "This template is used to display actions along with their cost in action points."
}
</templatedata>
</noinclude>
 
{| class="wikitable"
|+
! Code !! Result
|-
| <code><nowiki>{{Action|Examine}}</nowiki></code> || {{Action|Examine}}
|-
| <code><nowiki>{{Action|Take off|2}}</nowiki></code> || {{Action|Take off|2}}
|-
| <code><nowiki>{{Action|Graft|2|Garden}}</nowiki></code> || {{Action|Graft|2|Garden}}
|}
</noinclude>
 
 
[[Category:Templates]]

Latest revision as of 21:16, 17 April 2026


This template is used to display actions along with their cost in action points.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Action1

Name of the displayed action

Stringrequired
Number of AP2

Number of necessary action points (optional).

Numberoptional
Type of3

Type of AP (optional, if no number of AP is given).

Stringoptional


Code Result
{{Action|Examine}} Examine
{{Action|Take off|2}} Action Point Take off
{{Action|Graft|2|Garden}} Action Point or Gardening Point Graft