191 end |
194 end |
192 if params["waypointradius"] ~= nil then |
195 if params["waypointradius"] ~= nil then |
193 wpRad = math.max(40, math.floor(tonumber(params["waypointradius"]))) |
196 wpRad = math.max(40, math.floor(tonumber(params["waypointradius"]))) |
194 if type(wpRad) ~= "number" then |
197 if type(wpRad) ~= "number" then |
195 wpRad = 450 |
198 wpRad = 450 |
|
199 end |
|
200 end |
|
201 if params["maxwaypoints"] ~= nil then |
|
202 wpLimit = math.max(2, math.floor(tonumber(params["maxwaypoints"]))) |
|
203 if type(wpLimit) ~= "number" then |
|
204 wpLimit = 8 |
196 end |
205 end |
197 end |
206 end |
198 end |
207 end |
199 |
208 |
200 function RebuildTeamInfo() |
209 function RebuildTeamInfo() |
658 loc("A Hedgewars mini-game"), |
667 loc("A Hedgewars mini-game"), |
659 loc("Touch all waypoints as fast as you can!"), 2, 4000) |
668 loc("Touch all waypoints as fast as you can!"), 2, 4000) |
660 |
669 |
661 SetAmmoTexts(amSkip, nil, nil, nil) |
670 SetAmmoTexts(amSkip, nil, nil, nil) |
662 else |
671 else |
|
672 local infoString |
|
673 if wpLimit > 2 then |
|
674 infoString = string.format(loc("Place 2-%d waypoints using the waypoint placement tool."), wpLimit) |
|
675 else |
|
676 infoString = loc("Place 2 waypoints using the waypoint placement tool.") |
|
677 end |
663 ShowMission(loc("Racer"), |
678 ShowMission(loc("Racer"), |
664 loc("Waypoint placement phase"), |
679 loc("Waypoint placement phase"), infoString, 2, 4000) |
665 loc("Place 2-8 waypoints using the available tools."), 2, 4000) |
|
666 AddAmmo(CurrentHedgehog, amAirAttack, 4000) |
680 AddAmmo(CurrentHedgehog, amAirAttack, 4000) |
667 SetWeapon(amAirAttack) |
681 SetWeapon(amAirAttack) |
668 end |
682 end |
669 end |
683 end |
670 |
684 |