Template:DataProp/doc: Difference between revisionsGive feedback
m update doc |
Document the optional Street Brawl variant parameter (with help from vergir-bot LLM) |
||
| Line 5: | Line 5: | ||
Dot notation is supported for nested properties (e.g. <code>Scale.Value</code>). Tables with a <code>Value</code> field are automatically unwrapped. | Dot notation is supported for nested properties (e.g. <code>Scale.Value</code>). Tables with a <code>Value</code> field are automatically unwrapped. | ||
An optional third parameter selects a game mode variant. Passing <code>Street Brawl</code> returns the value as changed for [[Street Brawl]]; properties that Street Brawl leaves alone fall back to the base value, so the parameter is safe to use on any property. Only abilities are affected. | |||
== Parameters == | == Parameters == | ||
| Line 23: | Line 25: | ||
"required": true, | "required": true, | ||
"example": "DPS, BaseHealthRegen, citadel_camera_fov" | "example": "DPS, BaseHealthRegen, citadel_camera_fov" | ||
}, | |||
"3": { | |||
"label": "Variant", | |||
"description": "Optional game mode variant. Accepts Street Brawl, ignoring case and spacing, and returns the value changed for Street Brawl. Properties that Street Brawl does not change fall back to the base value. Applies to abilities only.", | |||
"type": "string", | |||
"required": false, | |||
"example": "Street Brawl" | |||
} | } | ||
}, | }, | ||
"format": "inline", | "format": "inline", | ||
"paramOrder": ["1", "2"], | "paramOrder": ["1", "2", "3"], | ||
"description": "Retrieves a raw data value from abilities, heroes, items, or console variables." | "description": "Retrieves a raw data value from abilities, heroes, items, or console variables." | ||
} | } | ||
| Line 57: | Line 66: | ||
The default camera field of view is {{DataProp|Convar|citadel_camera_fov}}. | The default camera field of view is {{DataProp|Convar|citadel_camera_fov}}. | ||
=== Street Brawl === | |||
<code>Essence Bomb has a radius of {{DataProp|Essence Bomb|Radius}}m, or {{DataProp|Essence Bomb|Radius|Street Brawl}}m in Street Brawl.</code> | |||
Essence Bomb has a radius of {{DataProp|Essence Bomb|Radius}}m, or {{DataProp|Essence Bomb|Radius|Street Brawl}}m in Street Brawl. | |||
Street Brawl does not change Essence Bomb's damage, so the base value is returned: | |||
<code>{{DataProp|Essence Bomb|Damage|Street Brawl}}</code> | |||
{{DataProp|Essence Bomb|Damage|Street Brawl}} | |||
=== Errors === | === Errors === | ||
| Line 76: | Line 96: | ||
{{DataProp|Convar|fake_convar}} | {{DataProp|Convar|fake_convar}} | ||
If the variant is not recognised: | |||
<code>{{DataProp|Essence Bomb|Radius|Deathmatch}}</code> | |||
{{DataProp|Essence Bomb|Radius|Deathmatch}} | |||
<includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | <includeonly>[[Category:Data templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | ||