equal
deleted
inserted
replaced
115 end |
115 end |
116 |
116 |
117 _G.onGameStart = function() |
117 _G.onGameStart = function() |
118 SendHealthStatsOff() |
118 SendHealthStatsOff() |
119 ShowMission(params.missionTitle, loc("Challenge"), params.goalText, -amRope, 5000) |
119 ShowMission(params.missionTitle, loc("Challenge"), params.goalText, -amRope, 5000) |
|
120 -- <crates collected>/<total number of crates> |
|
121 SetTeamLabel(params.teamName, string.format(loc("%d/%d"), cratesCollected, #crates)) |
120 for i=1,#crates do |
122 for i=1,#crates do |
121 spawnCrate(crates[i].x, crates[i].y) |
123 spawnCrate(crates[i].x, crates[i].y) |
122 end |
124 end |
123 params.extra_onGameStart() |
125 params.extra_onGameStart() |
124 end |
126 end |
128 gameStarted = true |
130 gameStarted = true |
129 end |
131 end |
130 _G.onGearDelete = function(gear) |
132 _G.onGearDelete = function(gear) |
131 if GetGearType(gear) == gtCase and not hogHurt and not timeOut then |
133 if GetGearType(gear) == gtCase and not hogHurt and not timeOut then |
132 cratesCollected = cratesCollected + 1 |
134 cratesCollected = cratesCollected + 1 |
|
135 -- <crates collected>/<total number of crates> |
|
136 SetTeamLabel(params.teamName, string.format(loc("%d/%d"), cratesCollected, #crates)) |
133 PlaySound(sndShotgunReload) |
137 PlaySound(sndShotgunReload) |
134 if cratesCollected == #crates then |
138 if cratesCollected == #crates then |
135 endTime = TurnTimeLeft |
139 endTime = TurnTimeLeft |
136 finalize() |
140 finalize() |
137 else |
141 else |