Difference between revisions of "ConvertRating/Single"
From Sega Retro
m (Text replacement - "Category:Sega Retro templates" to "Category:Templates") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
|1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} | |1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}} | ||
+ | |||
+ | |0-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/6)}}}} | ||
|1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | |1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | ||
Line 25: | Line 27: | ||
|1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | |1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}} | ||
+ | |||
+ | |-1-6={{#vardefine:displayRating|{{#var:value}}}}{{#vardefine:score|{{#expr:100-(({{#var:value}}-1)*20)}}}} | ||
|0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}} | |0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}} | ||
Line 157: | Line 161: | ||
|#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}} | |#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}} | ||
}}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion. | }}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion. | ||
− | [[Category: | + | [[Category:Templates]]</noinclude> |
Latest revision as of 13:13, 1 January 2022
Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.