--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua Wed Dec 19 01:47:41 2018 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua Wed Dec 19 05:50:02 2018 +0100
@@ -1,3 +1,4 @@
+HedgewarsScriptLoad("/Scripts/Utils.lua")
HedgewarsScriptLoad("/Scripts/Locale.lua")
HedgewarsScriptLoad("/Scripts/Achievements.lua")
@@ -46,13 +47,14 @@
SendHealthStatsOff()
+ local recordInfo = getReadableChallengeRecord("Lowscore")
ShowMission (
loc("RC Plane Challenge"),
loc("Challenge"),
loc("Collect or destroy all the health crates.") .. "|" ..
loc("Compete to use as few planes as possible!") .. "|" ..
- "", -amRCPlane, 4000
+ recordInfo, -amRCPlane, 4000
)
SetTeamLabel(loc("Wannabe Flyboys"), "0")
@@ -408,6 +410,7 @@
SendStat(siCustomAchievement, string.format(loc("You have used %d RC planes."), planesUsed))
end
SaveMissionVar("Won", "true")
+ updateChallengeRecord("Lowscore", planesUsed)
if(totalMissiles > 1) then
SendStat(siCustomAchievement, string.format(loc("You have dropped %d missiles."), totalMissiles))