From 1b67f9fd395181094dc2d77512ea6e232c65675b Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Mon, 2 Feb 2015 11:21:25 +0100 Subject: [PATCH] Show the correct medal --- index | 16 ++++++++-------- lib/print_medal | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/index b/index index c162e65..1af0782 100755 --- a/index +++ b/index @@ -179,7 +179,7 @@ then && maxtimestamp=$timestamp for stat in ${nextsilver[timestamp]} do - tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]} silver)" ) tableline+=( '
' ) (( ++count == lvlsilver[level] - silvercount )) && break 2 done @@ -189,7 +189,7 @@ then do (( count >= lvlsilver[level] - silvercount )) && break 1 (( count < lvlsilver[level] - silvercount )) && never=1 - tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upsilver[$stat]} silver)" ) tableline+=( '
' ) (( count++ )) done @@ -210,7 +210,7 @@ then && maxtimestamp=$timestamp for stat in ${nextgold[timestamp]} do - tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]} gold)" ) tableline+=( '
' ) (( ++count == lvlgold[level] - goldcount )) && break 2 done @@ -220,7 +220,7 @@ then do (( count >= lvlgold[level] - goldcount )) && break 1 (( count < lvlgold[level] - goldcount )) && never=1 - tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upgold[$stat]} gold)" ) tableline+=( '
' ) (( count++ )) done @@ -241,7 +241,7 @@ then && maxtimestamp=$timestamp for stat in ${nextplatinum[timestamp]} do - tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]} platinum)" ) tableline+=( '
' ) (( ++count == lvlplatinum[level] - platinumcount )) && break 2 done @@ -251,7 +251,7 @@ then do (( count >= lvlplatinum[level] - platinumcount )) && break 1 (( count < lvlplatinum[level] - platinumcount )) && never=1 - tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upplatinum[$stat]} platinum)" ) tableline+=( '
' ) (( count++ )) done @@ -272,7 +272,7 @@ then && maxtimestamp=$timestamp for stat in ${nextblack[timestamp]} do - tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]} black)" ) tableline+=( '
' ) (( ++count == lvlblack[level] - blackcount )) && break 2 done @@ -282,7 +282,7 @@ then do (( count >= lvlblack[level] - blackcount )) && break 1 (( count < lvlblack[level] - blackcount )) && never=1 - tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]})" ) + tableline+=( "$(print_medal $timestamp $stat ${upblack[$stat]} black)" ) tableline+=( '
' ) (( count++ )) done diff --git a/lib/print_medal b/lib/print_medal index 0ed5c62..bba52a8 100644 --- a/lib/print_medal +++ b/lib/print_medal @@ -5,6 +5,7 @@ print_medal() { timestamp=$1 \ stat=$2 \ percent=$3 \ + level=$4 \ if (( timestamp )) then @@ -22,7 +23,7 @@ print_medal() { href="?hist&start=$start&end=$end#$stat"> $stat silver  ($thisdate)