diff -r 2c3fb87ad1c5 -r 2113296b7a29 share/hedgewars/Data/Scripts/SpeedShoppa.lua --- a/share/hedgewars/Data/Scripts/SpeedShoppa.lua Wed Dec 19 01:47:41 2018 +0100 +++ b/share/hedgewars/Data/Scripts/SpeedShoppa.lua Wed Dec 19 05:50:02 2018 +0100 @@ -21,6 +21,7 @@ ]=] +HedgewarsScriptLoad("/Scripts/Utils.lua") HedgewarsScriptLoad("/Scripts/Locale.lua") --[[ @@ -115,7 +116,8 @@ _G.onGameStart = function() SendHealthStatsOff() - ShowMission(params.missionTitle, loc("Challenge"), params.goalText, -amRope, 5000) + local append = getReadableChallengeRecord("TimeRecord") + ShowMission(params.missionTitle, loc("Challenge"), params.goalText .. "|" .. append, -amRope, 5000) -- / SetTeamLabel(params.teamName, string.format(loc("%d/%d"), cratesCollected, #crates)) for i=1,#crates do @@ -176,6 +178,7 @@ SendStat(siPlayerKills, tostring(time), params.teamName) SendStat(siCustomAchievement, string.format(loc("You have finished the challenge in %.3f s."), (time/1000))) SetTurnTimeLeft(0) + updateChallengeRecord("TimeRecord", time) else SendStat(siGameResult, loc("Challenge failed!")) SendStat(siPointType, loc("crate(s)"))