share/hedgewars/Data/Scripts/SpeedShoppa.lua
changeset 13065 a297e06d1607
parent 13034 fe9c12209f15
child 13066 ad75ed9a1e15
--- a/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Fri Feb 23 22:43:34 2018 +0100
+++ b/share/hedgewars/Data/Scripts/SpeedShoppa.lua	Sat Feb 24 14:59:35 2018 +0100
@@ -117,6 +117,8 @@
 	_G.onGameStart = function()
 		SendHealthStatsOff()
 		ShowMission(params.missionTitle, loc("Challenge"), params.goalText, -amRope, 5000) 
+		-- <crates collected>/<total number of crates>
+		SetTeamLabel(params.teamName, string.format(loc("%d/%d"), cratesCollected, #crates))
 		for i=1,#crates do
 			spawnCrate(crates[i].x, crates[i].y)
 		end
@@ -130,6 +132,8 @@
 	_G.onGearDelete = function(gear)
 		if GetGearType(gear) == gtCase and not hogHurt and not timeOut then
 			cratesCollected = cratesCollected + 1
+			-- <crates collected>/<total number of crates>
+			SetTeamLabel(params.teamName, string.format(loc("%d/%d"), cratesCollected, #crates))
 			PlaySound(sndShotgunReload)
 			if cratesCollected == #crates then
 				endTime = TurnTimeLeft