share/hedgewars/Data/Maps/ClimbHome/map.lua
changeset 14578 50f511588635
parent 14475 2113296b7a29
child 14590 c5f18710a184
equal deleted inserted replaced
14577:221380cdee7e 14578:50f511588635
   446                 SendStat(siGraphTitle, loc("Your height over time"))
   446                 SendStat(siGraphTitle, loc("Your height over time"))
   447                 SendStat(siCustomAchievement, string.format(loc("%s reached home in %.3f seconds. Congratulations!"), GetHogName(CurrentHedgehog), finishTime))
   447                 SendStat(siCustomAchievement, string.format(loc("%s reached home in %.3f seconds. Congratulations!"), GetHogName(CurrentHedgehog), finishTime))
   448                 updateChallengeRecord("TimeRecord", rawFinishTime, false)
   448                 updateChallengeRecord("TimeRecord", rawFinishTime, false)
   449                 SendStat(siCustomAchievement, string.format(loc("%s bravely climbed up to a dizzy height of %d to reach home."), GetHogName(CurrentHedgehog), getActualHeight(RecordHeight)))
   449                 SendStat(siCustomAchievement, string.format(loc("%s bravely climbed up to a dizzy height of %d to reach home."), GetHogName(CurrentHedgehog), getActualHeight(RecordHeight)))
   450                 updateChallengeRecord("Highscore", getActualHeight(RecordHeight))
   450                 updateChallengeRecord("Highscore", getActualHeight(RecordHeight))
   451                 SendStat(siPointType, loc("seconds"))
   451                 SendStat(siPointType, "!TIME")
   452                 SendStat(siPlayerKills, tostring(roundedFinishTime), GetHogTeamName(CurrentHedgehog))
   452                 SendStat(siPlayerKills, tostring(rawFinishTime), GetHogTeamName(CurrentHedgehog))
   453 
   453 
   454                 EndGame()
   454                 EndGame()
   455                 onAchievementsDeclaration()
   455                 onAchievementsDeclaration()
   456                 YouWon = true
   456                 YouWon = true
   457             end
   457             end
   691     else
   691     else
   692         SendStat(siCustomAchievement, string.format(text, RecordHeightHogName))
   692         SendStat(siCustomAchievement, string.format(text, RecordHeightHogName))
   693     end
   693     end
   694 
   694 
   695     updateChallengeRecord("Highscore", actualHeight)
   695     updateChallengeRecord("Highscore", actualHeight)
   696     SendStat(siPointType, loc("points"))
   696     SendStat(siPointType, "!POINTS")
   697     SendStat(siPlayerKills, actualHeight, GetHogTeamName(CurrentHedgehog))
   697     SendStat(siPlayerKills, actualHeight, GetHogTeamName(CurrentHedgehog))
   698     EndGame()
   698     EndGame()
   699     onAchievementsDeclaration()
   699     onAchievementsDeclaration()
   700 end
   700 end
   701 
   701 
   747             SendStat(siCustomAchievement, string.format(text, loser.name))
   747             SendStat(siCustomAchievement, string.format(text, loser.name))
   748         end
   748         end
   749     end
   749     end
   750     checkAwards()
   750     checkAwards()
   751     for i = #ranking, 1, -1 do
   751     for i = #ranking, 1, -1 do
   752 	SendStat(siPointType, loc("points"))
   752 	SendStat(siPointType, "!POINTS")
   753         SendStat(siPlayerKills, tostring(ranking[i].score), ranking[i].name)
   753         SendStat(siPlayerKills, tostring(ranking[i].score), ranking[i].name)
   754     end
   754     end
   755 end
   755 end
   756 
   756 
   757 function checkAwards()
   757 function checkAwards()