Difference between revisions of "Template:WeaponRange"

From Space Engineers Wiki
Jump to: navigation, search
m (Usage example)
m (Added default range multiplier)
 
Line 1: Line 1:
<includeonly>{{#expr: {{#show:{{{1}}}|?RangeMultiplier#-n}} * {{#show:{{#show:{{{1}}}|?AmmoMagazine#-}}|?MaxTrajectory#-n}} round 0}}</includeonly><noinclude>
+
<includeonly>{{#expr: {{#show:{{{1}}}|?RangeMultiplier#-n|default=1}} * {{#show:{{#show:{{{1}}}|?AmmoMagazine#-}}|?MaxTrajectory#-n}} round 0}}</includeonly><noinclude>
 
Example usage: <pre><nowiki>Range: {{WeaponRange|Mod:Vanilla/Weapon/RifleGun}} m</nowiki></pre>
 
Example usage: <pre><nowiki>Range: {{WeaponRange|Mod:Vanilla/Weapon/RifleGun}} m</nowiki></pre>
 
Range: {{WeaponRange|Mod:Vanilla/Weapon/RifleGun}} m
 
Range: {{WeaponRange|Mod:Vanilla/Weapon/RifleGun}} m
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 17:45, 26 October 2020

Example usage:
Range: {{WeaponRange|Mod:Vanilla/Weapon/RifleGun}} m

Range: 800 m