share/hedgewars/Data/Scripts/TargetPractice.lua
changeset 14594 825fe522f4f1
parent 14593 c3bbe56156e5
child 14648 be8af70adf2c
equal deleted inserted replaced
14593:c3bbe56156e5 14594:825fe522f4f1
   100 			(default: "Destroy all targets within the time!")
   100 			(default: "Destroy all targets within the time!")
   101 	- shootText:	A string which says how many times the player shot, ā€œ%dā€ is replaced
   101 	- shootText:	A string which says how many times the player shot, ā€œ%dā€ is replaced
   102 			by the number of shots. (default: "You have shot %d times.")
   102 			by the number of shots. (default: "You have shot %d times.")
   103 	- useRadar	Whether to use target radar (small circles that mark the position
   103 	- useRadar	Whether to use target radar (small circles that mark the position
   104 			of the next target). (default: true). Note: Still needs to be unlocked.
   104 			of the next target). (default: true). Note: Still needs to be unlocked.
   105 	- radarTint:	RGBA color of the target radar  (default: 0x8080FFFF). Use this field
   105 	- radarTint:	RGBA color of the target radar  (default: 0xFF3030FF). Use this field
   106 			if the target radar would be hard to see against the background.
   106 			if the target radar would be hard to see against the background.
   107 ]]
   107 ]]
   108 
   108 
   109 
   109 
   110 local getTargetsScore = function()
   110 local getTargetsScore = function()
   114 function TargetPracticeMission(params)
   114 function TargetPracticeMission(params)
   115 	if params.goalText == nil then params.goalText = loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission.") end
   115 	if params.goalText == nil then params.goalText = loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission.") end
   116 	if params.shootText == nil then params.shootText = loc("You have shot %d times.") end
   116 	if params.shootText == nil then params.shootText = loc("You have shot %d times.") end
   117 	if params.clanColor == nil then params.clanColor = -1 end
   117 	if params.clanColor == nil then params.clanColor = -1 end
   118 	if params.wind == nil then params.wind = 0 end
   118 	if params.wind == nil then params.wind = 0 end
   119 	if params.radarTint == nil then params.radarTint = 0x8080FFFF end
   119 	if params.radarTint == nil then params.radarTint = 0xFF3030FF end
   120 	if params.useRadar == nil then params.useRadar = true end
   120 	if params.useRadar == nil then params.useRadar = true end
   121 
   121 
   122 	local solid, artillery
   122 	local solid, artillery
   123 	if params.solidLand == true then solid = gfSolidLand else solid = 0 end
   123 	if params.solidLand == true then solid = gfSolidLand else solid = 0 end
   124 	if params.artillery == true then artillery = gfArtillery else artillery = 0 end
   124 	if params.artillery == true then artillery = gfArtillery else artillery = 0 end