--- a/share/hedgewars/Data/Scripts/TargetPractice.lua Wed Dec 19 01:47:41 2018 +0100
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua Wed Dec 19 05:50:02 2018 +0100
@@ -55,6 +55,7 @@
----- snip -----
]=]
+HedgewarsScriptLoad("/Scripts/Utils.lua")
HedgewarsScriptLoad("/Scripts/Locale.lua")
local player = nil
@@ -167,7 +168,8 @@
_G.onGameStart = function()
SendHealthStatsOff()
- ShowMission(params.missionTitle, loc("Aiming practice"), params.goalText, -params.ammoType, 5000)
+ local recordInfo = getReadableChallengeRecord("Highscore")
+ ShowMission(params.missionTitle, loc("Aiming practice"), params.goalText .. "|" .. recordInfo, -params.ammoType, 5000)
SetTeamLabel(params.teamName, "0")
spawnTarget()
end
@@ -317,5 +319,7 @@
end
SendStat(siPointType, loc("point(s)"))
SendStat(siPlayerKills, tostring(end_score_overall), loc(params.teamName))
+ -- Update highscore
+ updateChallengeRecord("Highscore", end_score_overall)
end
end