Template talk:Rare
Jump to navigation
Jump to search
sort
parameter
The parameter is not working as expected: Using it puts the rarity levels 10 and 11 directly after 1, before 2. The following could fix that:
// prepending a 0 in front of the number; converting rainbow/q to 12/13, respectively -->{{#if:{{{sort|}}}|data-sort-value={{#switch:{{#var:_rarity}}<!-- -->|-1 = -01<!-- -->|0|1|2|3|4|5|6|7|8|9 = 0{{#var:_rarity}}<!-- -->|10|11 = {{#var:_rarity}}<!-- -->|rainbow = 12<!-- -->|q|quest = 13<!-- -->|#default = {{#var:_rarity}}<!-- -->}}<!-- end of switch -->{{!}}<!-- -->}}<!-- end of if
This would have to be placed after the definition of the two variables. The current second line would have to be deleted then, of course.--Rye greenwood (talk) 15:08, 7 October 2018 (UTC)
- I can't reproduce that, it works as expected for me:
Color Tier -1 0 1 2 3 4 5 6 7 8 9 10 11 Amber(-11) rainbow(-12)
- You're right, I must have messed something up. Sorry! --Rye greenwood (talk) 14:50, 10 October 2018 (UTC)